白丝美女被狂躁免费视频网站,500av导航大全精品,yw.193.cnc爆乳尤物未满,97se亚洲综合色区,аⅴ天堂中文在线网官网

Method for detecting ambient light intensity, storage medium and electronic device

專利號(hào)
US11175824B2
公開日期
2021-11-16
申請(qǐng)人
GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP., LTD.(CN Guangdong)
發(fā)明人
Haiping Zhang; Yibao Zhou
IPC分類
G06F3/048; G06F3/0488; G09G3/20; G06F3/0484; G09G3/34
技術(shù)領(lǐng)域
ambient,light,intensity,display,screen,picture,preset,sensor,region,value
地域: Guangdong

摘要

The present disclosure provides a method for detecting ambient light intensity, a storage medium and an electronic device. The method for detecting ambient light intensity includes: controlling a preset region of a display screen of an electronic device to display a predetermined picture; obtaining an ambient light intensity value detected by the ambient light sensor; and controlling the display screen to respond according to the ambient light intensity value. The preset region is a region facing an ambient light sensor in the display screen. The predetermined picture is a pure color picture.

說明書

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is based on and claims priority to Chinese Patent Application No. 201711176966.0, filed on Nov. 22, 2017, the entire contents of which are incorporated herein by reference.

FIELD

The present disclosure relates to an electronic device technology field, and more particularly to a method for detecting ambient light intensity, a storage medium and an electronic device.

BACKGROUND

With rapid development of electronic technology, electronic devices such as smart phones and tablet computers have become more and more popular. Electronic devices such as smart phones and tablet computers have display screens.

Generally, an ambient light sensor is disposed under the display. The ambient light sensor is used to detect the ambient light intensity, so that the electronic device can control the brightness of the display screen according to the detected ambient light intensity, thus the brightness of the display screen is adapted to the external environment.

SUMMARY

Embodiments of the present disclosure provide a method for detecting ambient light intensity. The method for detecting ambient light intensity includes: controlling a preset region of a display screen of an electronic device to display a predetermined picture; obtaining an ambient light intensity value detected by the ambient light sensor; and controlling the display screen to respond according to the ambient light intensity value. The preset region is a region facing an ambient light sensor in the display screen. The predetermined picture is a pure color picture.

權(quán)利要求

1
What is claimed is:1. A method for detecting ambient light intensity, comprising:controlling a part of a display screen of an electronic device to display one of a pure white picture, a pure gray picture and a pure black picture, and controlling other parts of the display screen to display a user interface, wherein the part of the display screen faces an ambient light sensor of the electronic device;obtaining an ambient light intensity value detected by the ambient light sensor; andcontrolling the display screen to respond according to the ambient light intensity value, comprising:depending on the pure white picture, the gray picture or the pure black picture displayed on the part of the display screen, determining one of a first adjustment value corresponding to the pure white picture, a second adjustment value corresponding to the pure gray picture and a third adjustment value corresponding to the pure black picture as a preset adjustment value of ambient light intensity, wherein the first, the second and the third adjustment values are different from each other;adjusting the ambient light intensity value according to the preset adjustment value of ambient light intensity to obtain an adjusted ambient light intensity value; andcontrolling the display screen to respond according to the adjusted ambient light intensity value.2. The method according to claim 1, wherein the ambient light sensor comprises at least two ambient light sensors, the at least two ambient light sensors are spaced apart from each other, obtaining the ambient light intensity value detected by the ambient light sensor comprises:obtaining an ambient light intensity value detected by each ambient light sensor; andcontrolling the display screen to respond according to the ambient light intensity value comprises:calculating an average value of the ambient light intensity values detected by the at least two ambient light sensors; andcontrolling the display screen to respond according to the average value.3. The method according to claim 1, wherein the ambient light sensor comprises two ambient light sensors, the part of the display screen comprises a first region and a second region disposed close to opposite edges of a display region of the display screen, one of the two ambient light sensors is disposed facing the first region, and the other one of the two ambient light sensors is disposed facing the second region.4. The method according to claim 1, wherein adjusting the ambient light intensity value according to the preset adjustment value of ambient light intensity to obtain the adjusted ambient light intensity value comprises:calculating a difference value between the ambient light intensity value and the preset adjustment value of ambient light intensity;controlling the display screen to respond according to the adjusted ambient light intensity value comprises:controlling the display screen to respond according to the difference value.5. The method according to claim 1, wherein the ambient light sensor is disposed facing an edge of a display region of the display screen.6. The method according to claim 1, wherein controlling the display screen to respond according to the ambient light intensity value comprises:adjusting brightness of the display screen according to the ambient light intensity value.7. The method according to claim 1, wherein controlling the part of the display screen of the electronic device to display one of the pure white picture, the pure gray picture and the pure black picture comprises:controlling the part to display one of the pure white picture, the pure gray picture and the pure black picture in response to a triggering event.8. The method according to claim 1, wherein controlling the part of the display screen of the electronic device to display one of the pure white picture, the pure gray picture and the pure black picture comprises:controlling the part to display one of the pure white picture, the pure gray picture and the pure black picture all the time.9. A non-transitory computer readable storage medium, having stored therein one or more computer programs, when the one or more computer programs is performed by a computer, the computer is configured to perform a method for detecting ambient light intensity, wherein the method for detecting ambient light intensity comprises:controlling a part of a display screen of an electronic device to display one of the pure white picture, the pure gray picture and the pure black picture, and controlling other parts of the display screen to display a user interface, wherein the part of the display screen faces an ambient light sensor of the electronic device in the display screen;obtaining an ambient light intensity value detected by the ambient light sensor; andcontrolling the display screen to respond according to the ambient light intensity value, comprising:depending on the pure white picture, the gray picture or the pure black picture displayed on the part of the display screen, determining one of a first adjustment value corresponding to the pure white picture, a second adjustment value corresponding to the pure gray picture and a third adjustment value corresponding to the pure black picture as a preset adjustment value of ambient light intensity, wherein the first, the second and the third adjustment values are different from each other;adjusting the ambient light intensity value according to the preset adjustment value of ambient light intensity to obtain an adjusted ambient light intensity value; andcontrolling the display screen to respond according to the adjusted ambient light intensity value.10. The non-transitory computer readable storage medium according to claim 9, wherein the ambient light sensor comprises at least two ambient light sensors, the at least two ambient light sensors are spaced apart from each other, obtaining the ambient light intensity value detected by the ambient light sensor comprises:obtaining an ambient light intensity value detected by each ambient light sensor; andcontrolling the display screen to respond according to the ambient light intensity value comprises:calculating an average value of the ambient light intensity values detected by the at least two ambient light sensors; andcontrolling the display screen to respond according to the average value.11. The non-transitory computer readable storage medium according to claim 9, wherein the ambient light sensor comprises two ambient light sensors, the part of the display screen comprises a first region and a second region disposed close to opposite edges of a display region of the display screen, one of the two ambient light sensors is disposed facing the first region, and the other one of the two ambient light sensors is disposed facing the second region.12. The non-transitory computer readable storage medium according to claim 9, wherein adjusting the ambient light intensity value according to the preset adjustment value of ambient light intensity to obtain the adjusted ambient light intensity value comprises:calculating a difference value between the ambient light intensity value and the preset adjustment value of ambient light intensity;controlling the display screen to respond according to the adjusted ambient light intensity value comprises:controlling the display screen to respond according to the difference value.13. An electronic device, comprising:a display screen, comprising a display region;an ambient light sensor, disposed facing the display region of the display screen; anda processor, configured to control a part of the display screen to display one of a pure white picture, a pure gray picture and a pure black picture when the ambient light sensor detects ambient light intensity, and control other parts of the display screen to display a user interface;wherein the processor is further configured to control the display screen to respond according to the ambient light intensity value by:depending on the pure white picture, the gray picture or the pure black picture displayed on the part of the display screen, determining one of a first adjustment value corresponding to the pure white picture, a second adjustment value corresponding to the pure gray picture and a third adjustment value corresponding to the pure black picture as a preset adjustment value of ambient light intensity, wherein the first, the second and the third adjustment values are different from each other;adjusting the ambient light intensity value according to the preset adjustment value of ambient light intensity to obtain an adjusted ambient light intensity value; andcontrolling the display screen to respond according to the adjusted ambient light intensity value.14. The electronic device according to claim 13, wherein the ambient light sensor is disposed facing an edge of the display region.15. The electronic device according to claim 13, wherein, the ambient light sensor comprises two ambient light sensors, the two ambient light sensors are spaced apart from each other;the part of the display screen comprises a first region and a second region disposed close to opposite edges of a display region of the display screen, one of the two ambient light sensors is disposed facing the first region, and the other one of the two ambient light sensors is disposed facing the second region.
微信群二維碼
意見反饋