CN106131334B - Method and device for controlling screen state of mobile terminal - Google Patents

Method and device for controlling screen state of mobile terminal Download PDF

Info

Publication number
CN106131334B
CN106131334B CN201610542882.3A CN201610542882A CN106131334B CN 106131334 B CN106131334 B CN 106131334B CN 201610542882 A CN201610542882 A CN 201610542882A CN 106131334 B CN106131334 B CN 106131334B
Authority
CN
China
Prior art keywords
screen
preset
value
ambient light
distance value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610542882.3A
Other languages
Chinese (zh)
Other versions
CN106131334A (en
Inventor
张强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201610542882.3A priority Critical patent/CN106131334B/en
Publication of CN106131334A publication Critical patent/CN106131334A/en
Application granted granted Critical
Publication of CN106131334B publication Critical patent/CN106131334B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions

Abstract

The invention discloses a method and a device for controlling the screen state of a mobile terminal, wherein the method comprises the following steps: the method comprises the steps of detecting a distance value between a target object and a screen in real time through a proximity sensor, collecting ambient light data in real time through an ambient light sensor, judging whether current ambient light meets a preset condition or not according to the ambient light data and the distance value, and if the current ambient light meets the preset condition, sending screen state control data to an upper control unit through the proximity sensor, wherein the screen state control data are used for enabling the upper control unit to control the screen to be kept in a normally-on state. The invention can weaken the influence of ambient light on the distance between the proximity sensor detection target object and the mobile terminal screen, so that the screen can be normally bright when the target object is not close to the mobile terminal screen even under a specific ambient light environment, and a user can finish normal operation on the mobile terminal.

Description

Method and device for controlling screen state of mobile terminal
Technical Field
The invention belongs to the technical field of communication, and particularly relates to a method and a device for controlling the screen state of a mobile terminal.
Background
The proximity sensor works based on the infrared principle, an infrared transmitting tube and an infrared receiving tube are arranged in the proximity sensor, infrared rays are transmitted through the infrared transmitting tube, when an object is close to the proximity sensor, the infrared receiving tube receives the infrared rays reflected by the object and converts the infrared rays into a proximity value for indicating the distance between the object and the proximity sensor, and the larger the proximity value is, the closer the object is to the proximity sensor is. When the proximity sensor is applied to a mobile terminal with a call function such as a mobile phone, the proximity sensor can be built in the mobile terminal to detect a proximity value of a face and the mobile terminal, the larger the proximity value is, the closer the face is to the mobile terminal, and when the proximity value reaches a preset value, a screen is closed to prevent misoperation caused by mistaken touch due to the fact that the face touches the screen in the call process.
however, in the above technical solution, since the user sometimes happens in an outdoor call scene, if the weather is fine and the sunlight is sufficient, and the sunlight often contains a large amount of infrared rays, when the infrared ray intensity is high, the proximity sensor is saturated, that is, the proximity value often reaches a very high value, which easily affects the proximity sensor to determine the distance between the proximity sensor and the object, so that the screen cannot be lighted even if the face of the user does not approach the screen, and the screen cannot be lighted when the user operates the mobile terminal.
disclosure of Invention
the invention provides a method and a device for controlling the screen state of a mobile terminal, which are used for solving the problems that the face of a user does not approach a screen and the screen cannot be lightened due to the fact that a proximity sensor wrongly detects the distance between the face and the screen under strong light, and the screen cannot be lightened when the user operates the mobile terminal.
the invention provides a method for controlling the screen state of a mobile terminal in a first aspect, which comprises the following steps:
detecting a distance value between a target object and a screen in real time through a proximity sensor, and acquiring ambient light data in real time through an ambient light sensor;
Judging whether the current ambient light meets preset conditions or not according to the ambient light data and the distance value;
And if so, sending screen state control data to an upper control unit through the proximity sensor, wherein the screen state control data is used for enabling the upper control unit to control the screen to be kept in a normally-on state.
The second aspect of the present invention provides an apparatus for controlling a screen state of a mobile terminal, comprising:
The first data acquisition module is used for detecting the distance value between a target object and the screen in real time through the proximity sensor;
the second data acquisition module is used for acquiring ambient light data in real time through an ambient light sensor;
the judging module is used for judging whether the current ambient light meets preset conditions or not according to the ambient light data and the distance value;
And the sending module is used for sending screen state control data to the upper control unit through the proximity sensor if the screen state control data meets the requirement, and the screen state control data is used for enabling the upper control unit to control the screen to be kept in a normally-on state.
it can be known from the foregoing embodiments of the present invention that, in the method and apparatus for controlling a screen state of a mobile terminal provided by the present invention, if the ambient light sensor determines that the current ambient light meets the preset condition, the proximity sensor sends screen state control data to the upper control unit, so that the upper control unit controls the screen to be kept in a normally-on state, thereby weakening the influence of the ambient light on the distance between the proximity sensor and the mobile terminal screen, and enabling the screen to be kept in a normally-on state when the target object is not close to the mobile terminal screen even in a specific ambient light environment, so that a user can complete normal operation of the mobile terminal.
drawings
in order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention.
Fig. 1 is a schematic flow chart illustrating an implementation of a method for controlling a screen state of a mobile terminal according to a first embodiment of the present invention;
fig. 2 is a schematic flow chart illustrating an implementation of a method for controlling a screen state of a mobile terminal according to a second embodiment of the present invention;
Fig. 3 is a schematic structural diagram of an apparatus for controlling a screen state of a mobile terminal according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an apparatus for controlling a screen state of a mobile terminal according to a fourth embodiment of the present invention.
Detailed Description
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The method for controlling the screen state of the mobile terminal provided by the embodiment of the invention can be applied to mobile terminal equipment such as smart phones and tablet computers.
referring to fig. 1, fig. 1 is a schematic flow chart illustrating an implementation of a method for controlling a screen state of a mobile terminal according to a first embodiment of the present invention, which mainly includes the following steps:
S101, detecting a distance value between a target object and a screen in real time through a proximity sensor, and acquiring ambient light data in real time through an ambient light sensor;
A proximity sensor and an ambient light sensor are built in the mobile terminal. When the mobile terminal is started, the proximity sensor and the ambient light sensor are started along with the start, or the proximity sensor and the ambient light sensor are not started when the mobile terminal is started, but are started after receiving a starting instruction.
The mobile terminal detects the distance value between a target object and the screen in real time through the proximity sensor, and simultaneously, the mobile terminal collects the ambient light data in real time through the ambient light sensor. In this embodiment, the target object may be a human face or an ear, that is, the proximity sensor detects a distance between the human face or the ear and the screen of the mobile terminal. For convenience of description, in each embodiment of the present invention, the target object is a human face as an example.
The ambient light data refers to ambient light data of the mobile terminal sensed by the ambient light sensor.
s102, judging whether the current ambient light meets a preset condition or not according to the ambient light data and the distance value;
judging whether the current ambient light meets a preset condition according to the ambient light data collected by the ambient light sensor and the distance value between the target object detected by the proximity sensor and the screen, wherein the preset condition is preset, and when the preset condition is met, triggering and controlling the screen to be in a normally-on state.
And S103, if so, sending screen state control data to an upper control unit through the proximity sensor, wherein the screen state control data is used for enabling the upper control unit to control a screen to keep a normally-on state.
if the current ambient light meets the preset condition, it indicates that the proximity sensor cannot accurately detect the distance between the target object and the screen, and if the preset parameter is used to control the screen, a deviation will be generated. Therefore, the parameters of the control screen need to be adjusted according to the condition of the ambient light. Therefore, screen state control data for causing the upper control unit to control the screen to be kept in a normally on state is transmitted to the upper control unit through the proximity sensor.
The upper control unit is a control unit which can control the screen to be lightened or extinguished at a system application layer, and control software of corresponding functions is built in the upper control unit.
Specifically, the following two ways are included for realizing the transmission of the screen state control data to the upper control unit through the proximity sensor:
the first mode is as follows: and sending a preset value for keeping the normally-on state of the screen to an upper layer control unit through the proximity sensor, wherein the value is used for enabling the upper layer control unit to control the screen to keep the normally-on state. The value is predetermined by a system, when the ambient light meets a preset condition, the proximity sensor sends the value to the upper control unit, and the upper control unit controls the screen to keep a normally-on state after receiving the value. That is, no matter what kind of sensing state the other sensors are, as long as the ambient light meets the preset condition, the ambient light is transmitted to the upper control unit through the proximity sensor to be a predetermined value, and the upper control unit controls the screen to be in the normally-on state accordingly, and the screen is not closed due to the data detected by the other sensors.
The second mode is as follows: and sending the preset distance value as an actually measured distance value to an upper layer control unit through the proximity sensor, wherein the preset distance value is greater than a preset distance threshold value, and the preset distance value is used for enabling the upper layer control unit to control a screen to keep a normally-on state. That is, the proximity sensor sends a preset distance value to the upper control unit, and the preset distance value is sent to the upper control unit as an actually measured distance value between the target object and the mobile terminal, and the preset distance value is greater than a preset departing threshold in the system, and the preset departing threshold is that when the distance value between the target object and the mobile terminal is greater than the preset departing threshold, the screen is lighted. Because of the influence of the ambient light, the actual measurement value of the proximity sensor is inaccurate, so that a preset distance value is sent to the upper control unit instead of the actual measurement value, the influence of the inaccurate measurement of the proximity sensor on the state of the screen is avoided, and the preset measurement value is greater than the preset distance threshold value, so that the distance value between the target object and the moving object sent to the upper control unit is always greater than the preset distance threshold value, and thus, the upper control unit is not influenced by the actual ambient light and controls the screen to keep a normally-on state.
In the embodiment of the invention, if the current ambient light is judged to meet the preset condition by the ambient light sensor, the upper control unit is enabled to control the screen to be in a normally-on state by sending the screen state control data to the upper control unit through the proximity sensor, so that the influence of the ambient light on the distance between the proximity sensor detection target object and the mobile terminal screen is weakened, the screen can be normally-on when the target object does not approach the mobile terminal screen even under the specific ambient light environment, and a user can finish the normal operation of the mobile terminal.
Referring to fig. 2, fig. 2 is a schematic flow chart illustrating an implementation of a method for controlling a screen state of a mobile terminal according to a second embodiment of the present invention, which mainly includes the following steps:
S201, detecting a distance value between a target object and a screen in real time through a proximity sensor, and acquiring ambient light data in real time through an ambient light sensor;
the mobile terminal detects the distance value between the target object and the screen in real time through the started proximity sensor, and simultaneously, the mobile terminal collects the ambient light data in real time through the started ambient light sensor. In this embodiment, the target object may be a human face, that is, the proximity sensor detects a distance between the human face and the screen of the mobile terminal.
S202, judging whether the current environment is a preset strong light environment or not according to the environment light intensity value in the environment light data;
Specifically, it is determined whether the ambient light intensity value is greater than a preset intensity threshold, if so, step S203 is executed, and if not, step S207 is executed.
S203, judging whether the current distance value detected by the proximity sensor reaches a preset value;
Under strong light, the value of the proximity sensor may drift greatly and the measurement result is inaccurate. Therefore, if the current environment is determined to be a preset strong light environment, it is determined whether the current distance value detected by the proximity sensor reaches a preset value, it should be noted that the distance value measured by the proximity sensor is finally converted into a proximity value, and the larger the distance value is, the larger the proximity value is. The preset value may be a saturation value of the distance value, that is, the maximum value of the proximity value that can be measured by the proximity sensor, or may be another value slightly lower than the saturation value, that is, it is determined whether the current distance value between the target object and the mobile terminal screen in the current environment measured by the proximity sensor is too large, and if the current distance value is too large, it indicates that the infrared intensity in the current environment is too large, which causes an abnormal state of the proximity sensor, and affects the proximity sensor to measure the distance value between the target object and the mobile terminal screen.
The preset value is used for judging whether the current environment can influence the measurement result of the proximity sensor or not according to the current distance value between the target object and the mobile terminal screen in the current environment, and whether the measurement data of the proximity sensor is abnormal or not is judged.
if the preset value is reached, step S204 is executed, and if the preset value is not reached, step S206 is executed.
s204, confirming that the current ambient light meets a preset condition;
And if the current distance value detected by the proximity sensor reaches the preset value, determining that the current ambient light meets the preset condition.
S205, sending screen state control data to an upper layer control unit through the proximity sensor;
The screen state control data is used for enabling the upper control unit to control the screen to keep a normally-on state.
If the current ambient light meets the preset condition, it indicates that the proximity sensor cannot accurately detect the distance between the target object and the mobile terminal screen, and if the preset parameters are used to control the screen, a deviation will be generated. Therefore, the parameters of the control screen need to be adjusted according to the condition of the ambient light. That is, screen state control data is transmitted to the upper control unit through the proximity sensor.
specifically, the sending of the screen state control data to the upper control unit through the proximity sensor may be sending a pre-agreed value for maintaining a normally-on screen state to the upper control unit through the proximity sensor, the value being used for enabling the upper control unit to control the screen to maintain the normally-on screen state, or sending the preset distance value to the upper control unit through the proximity sensor as an actually measured distance value, wherein the preset distance value is greater than a preset distance threshold.
S206, adjusting the preset approaching threshold value to be a first distance value, and adjusting the preset departing threshold value to be a second distance value;
If the current environment is a preset strong light environment but the current distance value detected by the proximity sensor does not reach the preset value, the preset proximity threshold value is adjusted to be a first distance value, and the preset distance threshold value is adjusted to be a second distance value.
the first distance value is greater than the preset approaching threshold value set by the default of the system, and the second distance value is greater than the preset departing threshold value set by the default of the system.
The preset approach threshold is used for turning off the screen, and is used for turning off the screen when the distance between the target object and the screen of the mobile terminal is greater than the preset approach threshold.
the preset distance threshold is used for lighting the screen, and means that the screen is lighted when the distance between the target object and the screen of the mobile terminal is larger than the preset distance threshold.
if the current distance value detected by the proximity sensor does not reach the preset value, the situation that the current environment is not enough to enable the proximity sensor to completely fail is indicated, a larger proximity value, namely a first distance value, relative to a preset proximity threshold value set by default of a system is set, the proximity threshold value is improved, so that the distance between a face detected by the proximity sensor and a screen is not affected by a highlight environment, the face still keeps the screen on when not approaching the screen of the mobile phone, and a user can normally operate the mobile phone. And setting a larger distance value, namely a second distance value, relative to a preset distance threshold value set by default of the system, and increasing the distance threshold value to enable the distance between the face detected by the proximity sensor and the screen not to be influenced by a highlight environment, and keeping the screen extinguished when the face is not far away from the mobile phone screen, so as to avoid misoperation caused by touching the screen by the face of a user.
and S207, not adjusting the preset far threshold value and the preset close threshold value.
It should be noted that, if the current environment is not the bright light environment, and the influence on the proximity sensor is not enough to influence the measurement result, the preset distance threshold of the proximity sensor is kept unchanged, and the screen state control data reported by the proximity sensor to the upper control unit is not needed, that is, the preset distance threshold of the screen is not adjusted, so that the screen is lit when the distance value between the target object and the screen is greater than the preset distance threshold. Meanwhile, the preset approach threshold value is continuously kept unchanged.
In the embodiment of the invention, if the current ambient light is judged to meet the preset condition by the ambient light sensor, the upper control unit is enabled to control the screen to be in a normally-on state by sending the screen state control data to the upper control unit through the proximity sensor, so that the influence of the ambient light on the distance between the proximity sensor detection target object and the mobile terminal screen is weakened, the screen can be normally-on when the target object does not approach the mobile terminal screen even under the specific ambient light environment, and a user can finish the normal operation of the mobile terminal. Furthermore, when the current environment is a strong light environment but the distance value measured by the proximity sensor does not reach the preset value, the preset distance value and the preset proximity value are corrected, so that the accuracy of the value reported by the proximity sensor in an abnormal working state can be ensured, and the accuracy of the screen state control of the mobile terminal is improved.
referring to fig. 3, fig. 3 is a schematic structural diagram of an apparatus for controlling a screen state of a mobile terminal according to a third embodiment of the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are shown. The apparatus for controlling the screen state of the mobile terminal illustrated in fig. 3 mainly includes: a first data acquisition module 301, a second data acquisition module 302, a judgment module 303 and a sending module 304. The above functional modules are described in detail as follows:
The first data acquisition module 301 is configured to detect a distance value between a target object and a screen in real time through a proximity sensor;
A second data acquisition module 302, configured to acquire ambient light data in real time through an ambient light sensor;
The mobile terminal detects the distance value between a target object and the screen in real time through the proximity sensor, and simultaneously, the mobile terminal collects the ambient light data in real time through the ambient light sensor. In this embodiment, the target object may be a human face or an ear, that is, the proximity sensor detects a distance between the human face or the ear and the screen of the mobile terminal.
the ambient light data refers to ambient light data of the mobile terminal sensed by the ambient light sensor.
a judging module 303, configured to judge whether the current ambient light meets a preset condition according to the ambient light data and the distance value;
judging whether the current ambient light meets a preset condition according to the ambient light data collected by the ambient light sensor and the distance value between the target object detected by the proximity sensor and the screen, wherein the preset condition is preset, and when the preset condition is met, triggering and controlling the screen to be in a normally-on state.
and a sending module 304, configured to send, if the above-mentioned condition is met, screen state control data to an upper control unit through the proximity sensor, where the screen state control data is used to enable the upper control unit to control the screen to be kept in a normally-on state.
if the current ambient light meets the preset condition, it indicates that the proximity sensor cannot accurately detect the distance between the target object and the screen, and if the preset parameter is used to control the screen, a deviation will be generated. Therefore, the parameters of the control screen need to be adjusted according to the condition of the ambient light. Specifically, screen state control data for causing the upper layer control unit to control the screen to be kept in a normally on state is sent to the upper layer control unit through the proximity sensor.
For details that are not described in the present embodiment, please refer to the description of the embodiment shown in fig. 1 to fig. 2, which will not be described herein again.
it should be noted that, in the above embodiment of the apparatus for controlling a screen state of a mobile terminal illustrated in fig. 3, the division of each functional module is only an example, and in practical applications, the above function allocation may be performed by different functional modules according to needs, for example, configuration requirements of corresponding hardware or convenience of implementation of software, that is, the internal structure of the apparatus for controlling a screen state of a mobile terminal is divided into different functional modules to perform all or part of the above described functions. In addition, in practical applications, the corresponding functional modules in this embodiment may be implemented by corresponding hardware, or may be implemented by corresponding hardware executing corresponding software. The above description principles can be applied to various embodiments provided in the present specification, and are not described in detail below.
In the embodiment of the invention, if the current ambient light is judged to meet the preset condition by the ambient light sensor, the upper control unit is enabled to control the screen to be in a normally-on state by sending the screen state control data to the upper control unit through the proximity sensor, so that the influence of the ambient light on the distance between the proximity sensor detection target object and the mobile terminal screen is weakened, the screen can be normally-on when the target object does not approach the mobile terminal screen even under the specific ambient light environment, and a user can finish the normal operation of the mobile terminal.
Referring to fig. 4, a schematic structural diagram of an apparatus for controlling a screen state of a mobile terminal according to a fourth embodiment of the present invention shows only portions related to the embodiment of the present invention for convenience of description. The apparatus for controlling a screen state of a mobile terminal illustrated in fig. 4 may be an executing body of the method for controlling a screen state of a mobile terminal provided in the foregoing embodiments illustrated in fig. 1 and 2. The apparatus for controlling a screen state of a mobile terminal illustrated in fig. 4 mainly includes: a first data obtaining module 401, a second data obtaining module 402, a determining module 403, a first determining sub-module 4031, a second determining sub-module 4032, a confirming module 4033, a sending module 404 and a processing module 405.
The above functional modules are described in detail as follows:
A first data acquisition module 401, configured to detect a distance value between a target object and a screen in real time through a proximity sensor;
A second data acquisition module 402, configured to acquire ambient light data in real time through an ambient light sensor;
a judging module 403, configured to judge whether the current ambient light meets a preset condition according to the ambient light data and the distance value;
A sending module 404, configured to send, if the above-mentioned condition is met, screen state control data to an upper-layer control unit through the proximity sensor, where the screen state control data is used to enable the upper-layer control unit to control the screen to be kept in a normally-on state.
further, the sending module 404 is further configured to send a pre-agreed value for maintaining the normally-on screen state to the upper control unit through the proximity sensor, where the value is used for enabling the upper control unit to control the screen to maintain the normally-on screen state.
The sending module 404 is further configured to send the preset distance value as an actually measured distance value to an upper layer control unit through the proximity sensor, where the preset distance value is greater than a preset distance threshold, and the preset distance value is used for keeping a screen of the upper layer control unit in a normally-on state.
Further, the determining module 403 includes:
A first determining submodule 4031, configured to determine whether the current environment is a preset strong light environment according to the ambient light intensity value in the ambient light data;
A second determining submodule 4032, configured to determine whether the current distance value detected by the proximity sensor reaches a preset value if the current distance value is in the highlight environment;
the preset value is used for judging whether the current environment can influence the measurement result of the proximity sensor or not according to the current distance value between the target object and the mobile terminal screen in the current environment, and whether the measurement data of the proximity sensor is abnormal or not is judged.
a confirming module 4033, configured to confirm that the current ambient light meets the preset condition if the preset value is reached.
Further, the apparatus further comprises a processing module 405:
the processing module 405 is configured to adjust the preset approaching threshold to a first distance value and adjust the preset departing threshold to a second distance value if the preset value is not reached.
the first distance value is greater than the preset approach threshold, and the second distance value is greater than the preset departure threshold.
the preset approach threshold is used for turning off the screen, and is used for turning off the screen when the distance between the target object and the screen of the mobile terminal is greater than the preset approach threshold.
The preset distance threshold is used for lighting the screen, and means that the screen is lighted when the distance between the target object and the screen of the mobile terminal is larger than the preset distance threshold.
If the current distance value detected by the proximity sensor does not reach the preset value, it is indicated that the current environment is not enough to enable the proximity sensor to completely fail, a larger proximity value, namely the first distance value, relative to a preset proximity threshold value set by default of a system is set, so that the user can extinguish the screen when the face of the user approaches the mobile phone screen, the face of the user cannot touch the screen, and misoperation is avoided. And setting a larger distance value, namely a second distance value, relative to a preset distance threshold value set by default of the system, so that the user can normally operate the mobile phone by lightening the screen when the face of the user is far away from the mobile phone screen.
further, the processing module 405 is further configured to, if the target object is not in the strong light environment, not adjust the preset distant threshold for lighting the screen, so that the screen is lighted when the distance value between the target object and the screen is greater than the preset distant threshold.
If the current environment is not the strong light environment and the influence on the proximity sensor is not enough to influence the measurement result, the preset far threshold of the proximity sensor is kept unchanged, the screen state control data reported by the proximity sensor to the upper control unit is not needed, that is, the preset far threshold of the screen is not adjusted to be lightened, so that the screen is lightened when the distance value between the target object and the screen is greater than the preset far threshold.
For details that are not described in the present embodiment, please refer to the description of the embodiment shown in fig. 1 to fig. 3, which will not be described herein again.
In the embodiment of the invention, if the current ambient light is judged to meet the preset condition by the ambient light sensor, the upper control unit is enabled to control the screen to be in a normally-on state by sending the screen state control data to the upper control unit through the proximity sensor, so that the influence of the ambient light on the distance between the proximity sensor detection target object and the mobile terminal screen is weakened, the screen can be normally-on when the target object does not approach the mobile terminal screen even under the specific ambient light environment, and a user can finish the normal operation of the mobile terminal.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical division, and in actual implementation, there may be other divisions, for example, multiple modules or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication link may be an indirect coupling or communication link of some interfaces, devices or modules, and may be in an electrical, mechanical or other form.
the modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
the integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It should be noted that, for the sake of simplicity, the above-mentioned method embodiments are described as a series of acts or combinations, but those skilled in the art should understand that the present invention is not limited by the described order of acts, as some steps may be performed in other orders or simultaneously according to the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no acts or modules are necessarily required of the invention.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In view of the above description of the method and apparatus for controlling a screen state of a mobile terminal according to the present invention, those skilled in the art will recognize that there may be variations in the embodiments and applications of the method and apparatus according to the present invention.

Claims (6)

1. A method for controlling the screen state of a mobile terminal, the method comprising:
detecting a distance value between a target object and a screen in real time through a proximity sensor, and acquiring ambient light data in real time through an ambient light sensor;
Judging whether the current ambient light meets preset conditions or not according to the ambient light data and the distance value;
Wherein, the judging whether the current ambient light meets a preset condition according to the ambient light data and the distance value includes:
judging whether the current environment is a preset strong light environment or not according to the ambient light intensity value in the ambient light data;
If the distance value reaches the preset value, judging whether the current distance value detected by the proximity sensor reaches the preset value;
If the current ambient light reaches the preset value, confirming that the current ambient light meets preset conditions;
If so, sending screen state control data to an upper control unit through the proximity sensor, wherein the screen state control data is used for enabling the upper control unit to control a screen to be kept in a normally-on state;
If the preset distance value does not reach the preset value, adjusting the preset approaching threshold value to be a first distance value, and adjusting the preset departing threshold value to be a second distance value;
Wherein the first distance value is greater than the preset approach threshold, and the second distance value is greater than the preset departure threshold.
2. The method of claim 1, wherein the sending, by the proximity sensor, screen state control data to an upper level control unit, the screen state control data for the upper level control unit to control a screen to be kept in a normally on state comprises:
and sending a preset numerical value for keeping the normally-on state of the screen to an upper layer control unit through the proximity sensor, wherein the numerical value is used for enabling the upper layer control unit to control the screen to keep the normally-on state.
3. the method of claim 1, wherein said sending screen state control data to an upper level control unit through said proximity sensor, said screen state control data for said upper level control unit to control a screen to maintain a normally on state further comprises:
And sending the preset distance value serving as an actually measured distance value to an upper layer control unit through the proximity sensor, wherein the preset distance value is greater than a preset distance threshold value, and the preset distance value is used for enabling the upper layer control unit to control a screen to be kept in a normally-on state.
4. an apparatus for controlling a screen state of a mobile terminal, the apparatus comprising:
The first data acquisition module is used for detecting the distance value between a target object and the screen in real time through the proximity sensor;
The second data acquisition module is used for acquiring ambient light data in real time through an ambient light sensor;
the judging module is used for judging whether the current ambient light meets preset conditions or not according to the ambient light data and the distance value;
the sending module is used for sending screen state control data to an upper control unit through the proximity sensor if the screen state control data meets the requirement, and the screen state control data is used for enabling the upper control unit to control a screen to be kept in a normally-on state;
Wherein, the judging module comprises:
The first judgment submodule is used for judging whether the current environment is a preset strong light environment or not according to the environment light intensity value in the environment light data;
the second judgment submodule is used for judging whether the current distance value detected by the proximity sensor reaches a preset value or not if the current distance value is in the strong light environment;
The confirming module is used for confirming that the current ambient light meets the preset condition if the preset value is reached;
The device further comprises:
The processing module is used for adjusting the preset approaching threshold value to a first distance value and adjusting the preset departing threshold value to a second distance value if the preset approaching threshold value is not reached;
Wherein the first distance value is greater than the preset approach threshold, and the second distance value is greater than the preset departure threshold.
5. The apparatus of claim 4,
the sending module is further configured to send a preset numerical value for maintaining a normally-on state of the screen to an upper control unit through the proximity sensor, where the numerical value is used for enabling the upper control unit to control the screen to maintain the normally-on state.
6. The apparatus of claim 4,
The sending module is further configured to send the preset distance value to an upper control unit as an actually measured distance value through the proximity sensor, where the preset distance value is greater than a preset distance threshold value, and the preset distance value is used to enable the upper control unit to control a screen to be kept in a normally-on state.
CN201610542882.3A 2016-07-11 2016-07-11 Method and device for controlling screen state of mobile terminal Active CN106131334B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610542882.3A CN106131334B (en) 2016-07-11 2016-07-11 Method and device for controlling screen state of mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610542882.3A CN106131334B (en) 2016-07-11 2016-07-11 Method and device for controlling screen state of mobile terminal

Publications (2)

Publication Number Publication Date
CN106131334A CN106131334A (en) 2016-11-16
CN106131334B true CN106131334B (en) 2019-12-10

Family

ID=57282440

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610542882.3A Active CN106131334B (en) 2016-07-11 2016-07-11 Method and device for controlling screen state of mobile terminal

Country Status (1)

Country Link
CN (1) CN106131334B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106648325B (en) * 2016-12-28 2020-11-03 北京金山安全软件有限公司 Method and device for playing video on screen locking interface and electronic equipment
WO2019056214A1 (en) * 2017-09-20 2019-03-28 深圳市云中飞网络科技有限公司 Conversation processing method and related product
WO2019061536A1 (en) * 2017-09-30 2019-04-04 深圳市云中飞网络科技有限公司 Call processing method and related product
CN107835033B (en) * 2017-11-30 2020-06-05 Oppo广东移动通信有限公司 Antenna tuning switch control method and device, terminal equipment and storage medium
CN110830644B (en) * 2019-09-16 2021-04-20 深圳市万普拉斯科技有限公司 Display screen control method and device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102694909A (en) * 2012-05-07 2012-09-26 深圳桑菲消费通信有限公司 Cell phone intelligent screen locking system and method thereof
CN102843469A (en) * 2012-08-16 2012-12-26 广东欧珀移动通信有限公司 Method for setting threshold of infrared proximity sensor and mobile terminal
CN102883061A (en) * 2012-09-26 2013-01-16 广东欧珀移动通信有限公司 Method and system for controlling working state of touch screen of mobile terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102694909A (en) * 2012-05-07 2012-09-26 深圳桑菲消费通信有限公司 Cell phone intelligent screen locking system and method thereof
CN102843469A (en) * 2012-08-16 2012-12-26 广东欧珀移动通信有限公司 Method for setting threshold of infrared proximity sensor and mobile terminal
CN102883061A (en) * 2012-09-26 2013-01-16 广东欧珀移动通信有限公司 Method and system for controlling working state of touch screen of mobile terminal

Also Published As

Publication number Publication date
CN106131334A (en) 2016-11-16

Similar Documents

Publication Publication Date Title
CN106131334B (en) Method and device for controlling screen state of mobile terminal
CN107943345B (en) Method and device for calibrating proximity sensor, storage medium and electronic equipment
KR102321418B1 (en) Method for detecting swelling of battery using pressure sensor and electronic device using the same
US9904409B2 (en) Touch input processing method that adjusts touch sensitivity based on the state of a touch object and electronic device for supporting the same
CN107942306B (en) Method and device for calibrating proximity sensor, storage medium and electronic equipment
EP3225047B1 (en) Method and apparatus for detecting that a device is immersed in a liquid
CN105959461B (en) Screen induction control method and device and terminal equipment
CN109074216B (en) Touch control method and device
CN105025159A (en) A proximity sensor adjusting method and apparatus
KR101952798B1 (en) Detection distance calibration method, apparatus, and device
CN107450817B (en) Proximity detection method, proximity detection device, storage medium, and electronic apparatus
CN108279408B (en) Proximity sensor calibration method and device, mobile terminal and computer readable medium
CN108255343B (en) Flash lamp adjusting method, user terminal and medium product
EP3435199A2 (en) Method, mobile terminal and non-transitory computer-readable storage medium for adjusting scanning frequency of touch screen
CN108759892B (en) Sensor calibration method, electronic device and computer-readable storage medium
EP3079046B1 (en) Method and apparatus for operating sensor of electronic device
US10761655B2 (en) Display device, management device, management system, and control program
CN112235924A (en) Sensor fault processing method and related device
CN103294583A (en) Terminal screen control method and mobile terminal
WO2021023190A1 (en) Proximity sensor-based noise floor adjustment processing method and apparatus, and computer device
CN108445475B (en) Data processing method and device and related medium product
CN109738004A (en) The calibration method and device, electronic equipment and storage medium of proximity sensor
CA2874282A1 (en) Adjusting layout size of hyperlink
CN108801321B (en) Sensor calibration method, electronic device and computer-readable storage medium
CN109240541B (en) Screen false touch prevention method and device of electronic equipment and electronic equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: OPPO Guangdong Mobile Communications Co., Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: Guangdong Opel Mobile Communications Co., Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant