Electronic device, and method for controlling brightness of display in electronic device
An electronic device according to various embodiments comprises: a display; a camera module; a sensor module including a first sensor, which is disposed on the rear part of the electronic device and operates on the basis of light, and a second sensor, which is disposed on the front part of the electronic device and operates on the basis of light; and a processor including a first processor and a second processor, wherein the processor can be configured to control the brightness of the display on the basis of data received from the first sensor and data received from the second sensor when the camera module is in an inactive state, and control the brightness of the display on the basis of data received from the second sensor, and not on the basis of data received from the first sensor, when the camera module is in an active state.
1 . An electronic device comprising:
a display;
a camera module;
a sensor module including a first sensor disposed on a rear surface of the electronic device and operated based on light and a second sensor disposed on a front surface of the electronic device and operated based on light;
plurality of processors including a first processor and a second processor; and
memory storing instructions that, when executed by the plurality of processors, individually and/or collectively, cause the electronic device to:
determine whether the camera module is in an active state or an inactive state,
adjust a brightness of the display based on data received from the first sensor and data received from the second sensor based on determining the camera module is in the inactive state, and
adjust the brightness of the display based on data received from the second sensor and not based on data received from the first sensor based on determining the camera module is in the active state.
2 . The electronic device of claim 1 , wherein the first processor is a main processor, and
wherein the second processor includes an auxiliary processor including a sensor hub.
3 . The electronic device of claim 1 , wherein the first sensor includes:
a light receiving unit;
an analog-to-digital converter, ADC;
a first block for flicker detection, including a buffer for storing data of some section of data received from the ADC and a first communication interface for transmitting the data stored in the buffer to the first processor; and
a second block for detecting ambient light, including a second communication interface for transmitting the data received from the ADC to the second processor.
4 . The electronic device of claim 3 , wherein when the first sensor does not receive an activation signal of the camera module from the first processor, the first block of the first sensor is deactivated and the second block of the first sensor is activated, so that the data received from the ADC is configured to be transmitted to the second processor through the second communication interface.
5 . The electronic device of claim 3 , wherein when the first sensor receives an activation signal of the camera module from the first processor, the first block of the first sensor is activated, and the second block of the first sensor is deactivated, so that the data stored in the buffer is configured to be transmitted to the first processor through the first communication interface.
6 . The electronic device of claim 1 , wherein the second sensor includes:
a light receiving unit;
an analog-to-digital converter, ADC; and
a third communication interface for transmitting data received from the ADC to the second processor.
7 . The electronic device of claim 1 , wherein the instructions, when executed by the second processor, individually and/or collectively, cause the electronic device to:
compare the data received from the first sensor with the data received from the second sensor when the camera module is in the inactive state, and
upon identifying that the data received from the first sensor has a larger raw value than the data received from the second sensor, adjust the brightness of the display using the data received from the first sensor.
8 . The electronic device of claim 7 , wherein the instructions, when executed by the second processor, individually and/or collectively, cause the electronic device to, upon identifying that the data received from the second sensor has a larger raw value than the data received from the first sensor, adjust the brightness of the display using the data received from the second sensor.
9 . The electronic device of claim 1 , wherein the instructions, when executed by the second processor, individually and/or collectively, cause the electronic device to:
detect a folding state of the electronic device, and
upon identifying that a folding angle of the electronic device is equal to larger than a reference angle based on the folding state of the electronic device, transmit a signal capable of activating a second block for detecting ambient light included in the first sensor to the first sensor.
10 . The electronic device of claim 9 , wherein if when the first sensor receives the signal capable of activating the second block of the first sensor from the second processor and does not receive an activation signal of the camera module from the first processor, a first block for flicker detection included in the first sensor is deactivated, and the second block included in the first sensor is activated, so that the data of the first sensor is configured to be transmitted to the second processor.
11 . A method for adjusting a brightness of a display in an electronic device, the method comprising:
determining whether a camera module of the electronic device is in an active state or an inactive state;
adjusting the brightness of the display of the electronic device, based on data received from a first sensor disposed on a rear surface of the electronic device and operated based on light and data received from a second sensor disposed on a front surface of the electronic device and operated based on light based on determining the camera module of the electronic device is in the inactive state, by a processor of the electronic device; and
adjusting the brightness of the display based on data received from the second sensor and not based on data received from the first sensor based on determining the camera module is in the active state.
12 . The method of claim 11 , further comprising transmitting, to a second processor of the processor, data of the first sensor while a first block for flicker detection included in the first sensor is deactivated and a second block for detecting ambient light included in the first sensor is activated, when the first sensor does not receive an activation signal of the camera module from a first processor of the processor.
13 . The method of claim 11 , further comprising transmitting, to a first processor of the processor, data of the first sensor while a first block for flicker detection included in the first sensor is activated and a second block for detecting ambient light included in the first sensor is deactivated, when the first sensor receives an activation signal of the camera module from the first processor of the processor.
14 . The method of claim 11 , further comprising:
comparing the data received from the first sensor with the data received from the second sensor when the camera module is in the inactive state;
upon identifying that the data received from the first sensor has a larger raw value than the data received from the second sensor, adjusting the brightness of the display using the data received from the first sensor; and
upon identifying that the data received from the second sensor has a larger raw value than the data received from the first sensor, adjusting the brightness of the display using the data received from the second sensor.
15 . The method of claim 11 , further comprising:
detecting a folding state of the electronic device;
upon identifying that a folding angle of the electronic device is equal to or larger than a reference angle based on the folding state of the electronic device, transmitting a signal capable of activating a second block for detecting ambient light of the first sensor to the first sensor; and
transmitting, to a second processor of the processor, data received from an analog-to-digital converter, ADC, of the first sensor through a second communication interface of the second block while a first block for flicker detection included in the first sensor is deactivated, and the second block for detecting ambient light included in the first sensor is activated, when the first sensor receives a signal capable of activating the second block of the first sensor from the second processor and does not receive an activation signal of the camera module from a first processor of the processor.
16 . An electronic device comprising:
a display;
a camera module;
a sensor module including a first sensor disposed on a rear surface of the electronic device and operated based on light and a second sensor disposed on a front surface of the electronic device and operated based on light;
a plurality of processors including a first processor and a second processor; and
memory storing instructions that, when executed by the plurality of processors, individually and/or collectively, cause the electronic device to:
adjust a brightness of the display based on data having a larger value among data received from the first sensor and data received from the second sensor when the camera module is in an inactive state, and
adjust the brightness of the display based on data received from the second sensor and not based on data received from the first sensor when the camera module is in an active state.