Display screen control method and electronic device
By delaying the preset time to turn off the display and adjusting it according to the proximity light status, it solves the problem of the display turning off when the front camera of the mobile phone is blocked during a call, improving user convenience and battery efficiency.
Patent Information
- Application Number
- PCT/CN2024/071221
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-14
- Filing Date
- 2024-01-08
- Publication Date
- 2024-09-19
AI Technical Summary
When the phone is in certain scenarios (such as a call scene), the front camera is blocked, which can easily cause the display to turn off, causing inconvenience for users when pulling down the control center or notification bar.
By obtaining the proximity light status of the electronic device, delay the preset time to turn off the display, dynamically adjust the on and off status of the display when an object approaches or moves away, avoid flashing black screen phenomenon, and delay the screen off when blocked to give the user enough time to operate .
It effectively avoids the flash-to-black screen problem caused by fast objects approaching and moving away. Delaying the screen-off time gives users enough time to pull down the control center and notification bar, improving user experience and reducing battery consumption and the risk of accidental touches.
Smart Images

Figure CN2024071221_19092024_PF_FP_ABST
Abstract
Description
Display screen control method and electronic device
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on March 14, 2023, with application number 202310268041.8 and application name “Display Screen Control Method and Electronic Device”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the technical field of electronic equipment, and in particular to a display screen control method and an electronic device. Background Art
[0003] Currently, when a mobile phone is in a specific scenario (such as a call scenario), when the front camera of the mobile phone is blocked, it is easy to trigger the mobile phone's display screen to not light up (or called screen off / black screen / screen off, etc.), which makes it difficult to pull down the control center, etc., causing inconvenience to the user.
[0004] Summary of the Invention
[0005] The present application provides a display screen control method and electronic device, which can solve the problem that when the front camera of a mobile phone is blocked in specific scenarios (such as a call scenario), the mobile phone screen is easily triggered to go off. The method delays the time for the mobile phone screen to go off, so that the user has enough time to pull down the control center, etc., thereby bringing convenience to the user.
[0006] To achieve the above objectives, this application adopts the following technical solutions:
[0007] In a first aspect, a display screen control method is provided, which is applied to an electronic device with a display screen. The method includes: when starting a target function of an application, obtaining the current proximity light state of the electronic device, the proximity light state is used to represent whether an object is approaching or moving away from the electronic device; if the display screen is in a bright screen state, the current proximity light state changes compared to the previous proximity light state, and the current proximity light state represents that the object is approaching the electronic device, then determining to delay turning off the display screen for a preset time.
[0008] Based on the above technical solution, when the target function of the application is started, such as the target function may be a call function, etc., the current proximity light state of the electronic device is obtained, and the proximity light state can be used to characterize whether an object is close to or far away from the electronic device, and then whether the electronic device is blocked can be determined based on the proximity light state. When the display screen is in the bright screen state, the current proximity light state changes compared to the previous proximity light state, and the current proximity light state characterizes that the object is close to the electronic device, which means that the electronic device is blocked. At this time, it is determined to delay the preset time length to turn off the display screen. Further, when turning off the display screen, the turning-off time is delayed. In this way, in scenarios including but not limited to calls, if the electronic device is blocked, for example, when the user pulls down the control center, notification bar, etc., the electronic device may be blocked. At this time, the screen turning-off time is delayed so that the user has enough time to pull down the control center, notification bar, etc., which brings convenience to the user. Furthermore, when an object repeatedly and quickly approaches and moves away from an electronic device, the proximity-to-light state will quickly and repeatedly switch between a state representing the object approaching the electronic device and a state representing the object moving away from the electronic device. The electronic device needs to switch between screen off and screen on. However, in this application, since the screen is turned off after a preset delay, the proximity-to-light state may have already switched to a state representing the object moving away from the electronic device before the screen is turned off. Therefore, the electronic device will not experience a flashing black screen.
[0009] In one possible design, after determining to delay turning off the display for a preset duration, the method further includes: delaying turning off the display for the preset duration. Based on this design, if the electronic device is obscured, such as when a user pulls down a control center or notification bar, the electronic device will delay turning off the display for the preset duration, allowing the user ample time to pull down the control center or notification bar. This provides user convenience. Furthermore, by completing the display turning off operation, power conservation and accidental touch prevention can be achieved.
[0010] In one possible design, delaying the display screen from turning off after a preset time includes: determining the proximity light state of the electronic device after the preset time; and turning off the display screen if the proximity light state of the electronic device after the preset time indicates an object is approaching the electronic device. Based on this design, after the preset time delay, the electronic device reconfirms whether the current proximity light state indicates an object is approaching the electronic device before turning off the screen. If so, the display screen is turned off. This saves power and prevents accidental touches on the screen.
[0011] In one possible design, before determining to delay turning off the display screen for a preset duration, the method further includes: determining that the application is a preset application. Based on this design, the display screen is turned off for a preset duration only if the application is a preset application; if the application is not a preset application, the display screen is not turned off for a preset duration. This ensures application security and improves the user experience.
[0012] In one possible design, after obtaining the current proximity light state of the electronic device, the method further includes: if the display screen is in the off state, the current proximity light state changes compared to the previous proximity light state, and the current proximity light state indicates that the object is far away from the electronic device, then the display screen is lit. Based on this design, when the electronic device is off, if the proximity light state changes, and it indicates that the object is far away from the electronic device, it means that the electronic device has changed from an obstructed state to an unobstructed state, and the screen is lit at this time. This can facilitate user operation of the electronic device while ensuring power saving and avoiding accidental touches of the screen.
[0013] In one possible design, after obtaining the current proximity light state of the electronic device, the method further includes: if the display screen is in the off state, the current proximity light state has not changed compared to the previous proximity light state, and the current proximity light state indicates that an object is approaching the electronic device, then the display screen remains off. Based on this design, when the electronic device is off, if the proximity light state has not changed and indicates that an object is approaching the electronic device, it indicates that the electronic device is still obscured, and the screen remains off, thereby saving power and preventing accidental touches on the screen.
[0014] In one possible design, after obtaining the current proximity light state of the electronic device, the method further includes: if the display screen is in the illuminated state, the current proximity light state has not changed compared to the previous proximity light state, and the current proximity light state indicates that an object is moving away from the electronic device, then the display screen remains illuminated. Based on this design, when the electronic device's screen is illuminated, if the proximity light state has not changed and the object is moving away from the electronic device, it indicates that the electronic device is still unobstructed. In this case, maintaining the screen on facilitates user operation of the electronic device.
[0015] In one possible design, after determining to delay turning off the display screen for a preset time, the method further includes: obtaining the proximity light state of the electronic device within the preset time; if the proximity light state of the electronic device within the preset time represents that the object is far away from the electronic device, terminating the operation of delaying the display screen for a preset time. It can be understood that the operation of delaying the display screen for a preset time can include timing the preset time and turning off the display screen. Exemplarily, terminating the operation of delaying the display screen for a preset time may refer to performing the termination operation at various times such as during the timing of the preset time or before turning off the display screen. Based on this design, since the proximity light state of the electronic device may change within the preset time, when the proximity light state of the electronic device represents that the object is far away from the electronic device, that is, the proximity light state of the electronic device has changed, terminating the operation of delaying the display screen for a preset time can achieve the purpose of immediately lighting the screen.
[0016] In one possible design, after determining to turn off the display screen after a delay of a preset time, the method further includes: creating a delay processing task, the delay processing task being a task to turn off the display screen after a delay of a preset time; terminating the operation of turning off the display screen after a delay of a preset time, including: deleting the delay processing task. Based on this design, after determining to turn off the display screen after a delay of a preset time, a delay processing task will be created to execute the operation of turning off the display screen after a delay of a preset time. Within the preset time, the proximity to light state of the electronic device may change. Therefore, when the proximity to light state of the electronic device represents that the object is far away from the electronic device, that is, the proximity to light state of the electronic device has changed, deleting the delay processing task can achieve the termination of the operation of turning off the screen after a delay of a preset time, thereby achieving the purpose of immediately lighting the screen.
[0017] In one possible design, the preset duration is greater than or equal to 250ms. Based on this design, when an object repeatedly and quickly approaches and moves away from an electronic device, the proximity to light state will quickly and repeatedly switch between characterizing the object approaching the electronic device and characterizing the object moving away from the electronic device, so the electronic device needs to switch between screen off and screen on. In the present application, the screen is turned off by delaying the preset duration. If the preset duration is too short, the electronic device may experience a flashing black screen. Therefore, the preset duration is greater than or equal to 250ms, that is, the preset duration is set to a larger value. Then, before the screen is turned off, the proximity to light state may have already switched from characterizing the object approaching the electronic device to characterizing the object moving away from the electronic device. This can reduce the probability of a flashing black screen on the electronic device.
[0018] In one possible design, the preset duration is less than or equal to 350ms. Based on this design, if the preset duration is too long, the electronic device may not turn off the screen all the time, causing the user to feel that the electronic device is stuck. In this way, if the preset duration is less than or equal to 350ms, that is, the preset duration is set to a value that is not particularly large, the effect of the electronic device turning off the screen can be smoother, reducing the probability that the electronic device does not turn off the screen all the time, causing the user to feel that the electronic device is stuck.
[0019] In one possible design, the method is executed by a power management service of the electronic device. Based on this design, the operation of delaying the display screen from turning off for a preset time is integrated into the power management service, which can reduce the complexity of the implementation.
[0020] In one possible design, the target function includes a call. Based on this design, the delayed preset screen-off solution can be applied to call scenarios. This can solve the problem of screen-off being easily triggered when the electronic device is blocked during a call. By delaying the screen-off time, the user has enough time to pull down the control center, etc., bringing convenience to the user.
[0021] In one possible design, after the display screen is turned off after a delay of a preset time, the method further includes: when the target function of the application is started, obtaining the next proximity light state of the electronic device; if the display screen is in the off state, the next proximity light state changes compared to the current proximity light state, and the next proximity light state indicates that the object is far away from the electronic device, and the display screen is lit. Based on this design, after the screen is turned off after a delay of a preset time, if the target function of the application is still started, the next proximity light state of the electronic device is continued to be obtained. If the display screen is off, and the next proximity light state changes and indicates that the object is far away from the electronic device, it means that the electronic device has changed from an obstructed state to an unobstructed state. At this time, the screen is lit, which can facilitate the user to operate the electronic device.
[0022] In one possible design, after the display screen is turned off after a delay of a preset time, the method further includes: when the target function of the application is started, obtaining the next proximity light state of the electronic device; if the display screen is in the off state, the next proximity light state does not change compared to the current proximity light state, and the next proximity light state represents that an object is approaching the electronic device, the display screen remains off. Based on this design, after the screen is turned off after a delay of a preset time, if the target function of the application is still being started, the next proximity light state of the electronic device continues to be obtained. If the display screen is off, and the next proximity light state changes and represents that an object is approaching the electronic device, it means that the electronic device is still in an obstructed state. At this time, keeping the screen off can achieve the purpose of saving power and preventing the screen from being accidentally touched.
[0023] In one possible design, the preset duration is 300ms. Taking into account the smooth effect of the screen flashing black and the screen turning off of the electronic device. Based on this design, the preset duration is set to 300ms, which is a moderate value. This can not only reduce the probability of the electronic device's screen flashing black, but also make the screen turning off of the electronic device smoother, reducing the probability that the electronic device will not turn off for a long time, causing the user to feel that the electronic device is stuck.
[0024] According to a second aspect, an electronic device is provided, including an acquisition unit and a processing unit; the acquisition unit is used to acquire the current proximity light state of the electronic device when the target function of the application is started, and the proximity light state is used to represent that an object is approaching or moving away from the electronic device; the processing unit is used to determine to delay turning off the display screen for a preset time if the display screen is in a bright screen state, the current proximity light state changes compared to the previous proximity light state, and the current proximity light state represents that an object is approaching the electronic device.
[0025] In one possible design, the processing unit is also used to delay turning off the display screen for a preset period of time.
[0026] In one possible design, the acquisition unit is further used to acquire the proximity light state of the electronic device after a preset time period; the processing unit is further used to turn off the display screen when the proximity light state of the electronic device after the preset time period indicates that an object is approaching the electronic device.
[0027] In one possible design, the processing unit is further used to determine that the application is a preset application.
[0028] In one possible design, the processing unit is also used to light up the display screen if the display screen is in an off state, the current proximity light state changes compared to the previous proximity light state, and the current proximity light state indicates that the object is away from the electronic device.
[0029] In one possible design, the processing unit is also used to keep the display screen off if the display screen is in an off state, the current proximity light state has not changed compared to the previous proximity light state, and the current proximity light state indicates that an object is approaching the electronic device.
[0030] In one possible design, the processing unit is also used to keep the display screen lit if the display screen is in a bright screen state, the current proximity light state has not changed compared to the previous proximity light state, and the current proximity light state indicates that the object is away from the electronic device.
[0031] In one possible design, the acquisition unit is further used to obtain the proximity light state of the electronic device within a preset time period; the processing unit is further used to terminate the operation of delaying the display screen to turn off the display screen for a preset time period if the proximity light state of the electronic device within the preset time period indicates that the object is away from the electronic device.
[0032] In one possible design, the processing unit is further used to create a delayed processing task, which is a task of turning off the display screen for a preset period of time; the processing unit is also specifically used to delete the delayed processing task.
[0033] In a possible design, the preset duration is greater than or equal to 250ms.
[0034] In one possible design, the preset duration is less than or equal to 350ms.
[0035] In one possible design, the method is performed by a power management service of the electronic device.
[0036] In one possible design, the target function includes a call function.
[0037] In one possible design, the acquisition unit is also used to obtain the next proximity light state of the electronic device when the target function of the application is started; the processing unit is also used to light up the display screen if the display screen is in an off state and the next proximity light state changes compared to the current proximity light state, and the next proximity light state indicates that the object is away from the electronic device.
[0038] In one possible design, the acquisition unit is further used to obtain the next proximity light state of the electronic device when the target function of the application is started; the processing unit is further used to, if the display screen is in an off state, the next proximity light state does not change compared to the current proximity light state, and the next proximity light state indicates that when an object approaches the electronic device, the display screen remains off.
[0039] In one possible design, the preset duration is 300ms.
[0040] In a third aspect, an electronic device is provided, comprising a processor, a memory, and a display screen. The memory is coupled to the processor and is configured to store computer program code, the computer program code comprising computer instructions. The processor reads the computer instructions from the memory to cause the electronic device to execute the method described in the first aspect and any design thereof. Optionally, the memory may be coupled to the processor or may be independent of the processor.
[0041] In one possible design, the electronic device further includes a communication interface that can be used for the electronic device to communicate with other devices. Exemplarily, the communication interface can be a transceiver, an input / output interface, an interface circuit, an output circuit, an input circuit, a pin, or related circuits.
[0042] In a fourth aspect, a computer-readable storage medium is provided, which includes a computer program or instructions. When the computer program or instructions are run on an electronic device, the electronic device executes the method described in the first aspect and any one of the designs thereof.
[0043] In a fifth aspect, a computer program product is provided. When the computer program product is run on a computer, the computer can execute the method described in the first aspect and any one of the designs thereof.
[0044] In the sixth aspect, a chip system is provided, comprising at least one processor and at least one interface circuit, wherein the at least one interface circuit is used to perform transceiver functions and send instructions to the at least one processor. When the at least one processor executes the instructions, the at least one processor executes the method described in the first aspect and any one of the designs therein.
[0045] It should be noted that the technical effects brought about by any design in the above-mentioned second to sixth aspects can refer to the technical effects brought about by the corresponding design in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] FIG1 is a schematic diagram of a call scenario provided in an embodiment of the present application;
[0047] FIG2 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
[0048] FIG3 is a schematic structural diagram of another electronic device provided in an embodiment of the present application;
[0049] FIG4 is a schematic diagram of a software structure of an electronic device provided in an embodiment of the present application;
[0050] FIG5 is a first schematic diagram of an interface provided in an embodiment of the present application;
[0051] FIG6 is a second schematic diagram of an interface provided in an embodiment of the present application;
[0052] FIG7 is a schematic diagram of a scenario in which the proximity light state is a proximity state provided by an embodiment of the present application;
[0053] FIG8 is a schematic flow chart of a display screen control method provided in an embodiment of the present application;
[0054] FIG9 is a schematic diagram of a scene in a near-light state provided by an embodiment of the present application;
[0055] FIG10 is a schematic diagram of another scenario in a near-light state provided by an embodiment of the present application;
[0056] FIG11 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
[0057] FIG12 is a schematic structural diagram of a chip system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0058] The technical solutions provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0059] The terms "including," "having," and any variations thereof mentioned in the description of this application are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or units is not limited to the listed steps or units, but may optionally include other steps or units not listed, or may optionally include other steps or units inherent to the process, method, product, or apparatus.
[0060] It should be noted that in the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be interpreted as being more preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0061] In this application, unless otherwise specified, "plurality" means two or more. "And / or" in this document is simply a description of an association between related objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, or B exists alone.
[0062] In the embodiments of the present application, "close" and "far away" are used to characterize the position of an object relative to an electronic device. In some examples, when the distance between the object and the electronic device is less than or equal to a preset distance, it can be described as the object approaching the electronic device. When the distance between the object and the electronic device is greater than the preset distance, it can be described as the object being far away from the electronic device. For example, taking the preset distance of 5 cm as an example, the distance between the object and the electronic device is 2 cm, 3 cm, 4 cm, etc., which can all be described as the object approaching the electronic device. The distance between the object and the electronic device is 6 cm, 7 cm, 8 cm, etc., which can all be described as the object being far away from the electronic device.
[0063] At present, when a mobile phone is in a call scene, due to the proximity light detection mechanism of the mobile phone, when the front camera of the mobile phone is blocked by a finger or the like, it is easy to trigger the mobile phone screen to turn off, that is, turn off the display screen. For example, as shown in (1) in Figure 1, the mobile phone displays a call interface 101. Optionally, the call interface 101 includes the dialed number (or called number) such as "123XXXXXXXX", the number's location such as "Beijing", a hang-up button 102, and one or more other function buttons, such as recording, waiting, adding a call, mute, etc., which will not be introduced one by one here.
[0064] In a call scenario such as that shown in (1) in FIG1 , the mobile phone will activate the proximity light sensor to detect whether the mobile phone is close to the user. When it is detected that the mobile phone is close to the user, the screen will be turned off immediately to avoid the mobile phone screen from being accidentally touched and to ensure normal calls. In a call scenario, when the user wants to pull down the control center, notification bar, etc., the top of the mobile phone (such as the front camera) may be blocked by the user's finger. At this time, due to the proximity light detection mechanism of the mobile phone, the mobile phone screen will be immediately triggered to turn off. For example, as shown in (1) in FIG1 , the front camera 103 of the mobile phone is blocked by the user's finger. It can be understood that actions such as the finger hovering above the front camera or the finger pressing the front camera may block the front camera. In response to this operation, as shown in (2) in FIG1 , the mobile phone screen is immediately turned off. Therefore, this makes it difficult to pull down the control center, notification bar, etc., which brings inconvenience to the user.
[0065] Based on this, the embodiments of the present application provide a display screen control method that can solve the problem of the phone screen being easily turned off when the front camera of the phone is blocked during a call. The method delays the screen turning off, allowing the user to have enough time to pull down the control center, etc., bringing convenience to the user. The technical solution provided by the embodiments of the present application can be applied to various call scenarios, including but not limited to scenarios where voice calls are made using social applications, conference applications, and Changlian applications, as well as scenarios where ordinary calls are made using the phone's system call application.
[0066] It can be understood that the embodiment of the present application takes a call scenario as an example, and is also applicable to other scenarios where the display screen needs to be turned off when the device is blocked.
[0067] The technical solutions provided in the embodiments of the present application can be applied to electronic devices, or to systems including electronic devices.
[0068] For example, electronic devices may be mobile phones, tablet computers, handheld computers, netbooks, personal digital assistants (PDAs), augmented reality (AR) devices, virtual reality (VR) devices, artificial intelligence (AI) devices, wearable devices, including but not limited to smart watches, smart bracelets, smart anklets, etc. The operating systems installed on electronic devices include but are not limited to This application does not limit the specific type of electronic equipment or the installed operating system.
[0069] For example, taking the electronic device as a mobile phone as an example, FIG2 shows a structural diagram of a mobile phone provided in an embodiment of the present application.
[0070] As shown in FIG2 , the mobile phone may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identification module (SIM) card interface 195. The sensor module 180 includes a proximity light sensor 180A and a touch sensor 180B.
[0071] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.
[0072] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
[0073] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.
[0074] In some embodiments, processor 110 may include one or more interfaces.
[0075] The charging management module 140 is configured to receive charging input from a charger, which may be a wireless charger or a wired charger.
[0076] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to provide power to the processor 110, the internal memory 121, the display 194, the camera 193, and the wireless communication module 160.
[0077] The wireless communication function of the mobile phone can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor.
[0078] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in a mobile phone can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.
[0079] The mobile communication module 150 can provide wireless communication solutions for mobile phones, including 2G / 3G / 4G / 5G, etc. The mobile communication module 150 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc.
[0080] The wireless communication module 160 can provide wireless communication solutions for mobile phones, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), etc.
[0081] In some embodiments, the mobile phone's antenna 1 is coupled to the mobile communication module 150 , and the antenna 2 is coupled to the wireless communication module 160 , so that the mobile phone can communicate with the network and other devices through wireless communication technology.
[0082] The mobile phone implements its display functionality through a GPU, display 194, and an application processor. The GPU is a microprocessor for image processing that connects display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.
[0083] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD). In some embodiments, the mobile phone can include one or N display screens 194, where N is a positive integer greater than 1. In some embodiments of the present application, the display screen can be illuminated, that is, the display screen is turned on. In other embodiments of the present application, the display screen can be turned off.
[0084] Camera 193 is used to capture still images or videos. In some embodiments, the mobile phone may include one or N cameras 193, where N is a positive integer greater than 1. In some embodiments of the present application, camera 193 includes a front-facing camera, which refers to a camera located on the same side as the display screen 194 of the mobile phone.
[0085] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile phone. The external memory card communicates with the processor 110 through the external memory interface 120 to implement data storage function.
[0086] The internal memory 121 can be used to store computer executable program codes, which include instructions. The internal memory 121 can include a program storage area and a data storage area.
[0087] Audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The phone can use audio module 170 for functions such as music playback and recording. Audio module 170 may include a speaker, receiver, microphone, headphone jack, and application processor to implement audio functions.
[0088] The proximity light sensor 180A may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. In some embodiments of the present application, the mobile phone emits infrared light outward through the light emitting diode. The mobile phone uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the mobile phone. When insufficient reflected light is detected, the mobile phone can determine that there is no object near the mobile phone. The mobile phone can use the proximity light sensor 180A to detect when the user holds the mobile phone close to the ear to talk, so as to automatically turn off the screen (i.e., turn off the screen) to save power, or to prevent the screen from being accidentally touched, etc. The proximity light sensor 180A can also be used in leather case mode, and pocket mode automatically unlocks and locks the screen. In some embodiments of the present application, the proximity light sensor 180A can be set at a position adjacent to the front camera.
[0089] Touch sensor 180B, also known as a "touch-sensitive device," can be disposed on display screen 194. Touch sensor 180K and display screen 194 form a touch screen, also known as a "touch screen." Touch sensor 180K is configured to detect touch operations applied thereto or in the vicinity thereof. The touch sensor can transmit the detected touch operations to an application processor to determine the type of touch event. Visual output related to the touch operations can be provided via display screen 194. In other embodiments, touch sensor 180K can also be disposed on the surface of the electronic device, at a location different from that of display screen 194.
[0090] Optionally, the sensor module 180 may also include one or more of a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a fingerprint sensor, a temperature sensor, an ambient light sensor, a bone conduction sensor, and the like.
[0091] The buttons 190 include a power button, a volume button, etc. The buttons 190 can be mechanical buttons or touch buttons.
[0092] Motor 191 can generate vibration prompts.
[0093] The indicator 192 may be an indicator light, which may be used to indicate the charging status, power level changes, messages, missed calls, notifications, etc.
[0094] The SIM card interface 195 is used to connect a SIM card.
[0095] For example, the above only uses a mobile phone as an example to illustrate the structure of the electronic device in the embodiment of the present application, but does not constitute a limitation on the structure and form of the electronic device. The embodiment of the present application does not limit the structure and form of the electronic device. For example, Figure 3 shows another exemplary structure of the electronic device. As shown in Figure 3, the electronic device includes: a processor 301, a memory 302, a sensor 303, and a display screen 304. The implementation of the processor 301, memory 302, sensor 303, and display screen 304 can refer to the implementation of the processor, memory, sensor, and display screen shown in Figure 2.
[0096] It should be understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the mobile phone. In other embodiments of this application, the mobile phone may include more or fewer components than those shown in Figures 2 and 3, or some components may be combined or separated, or arranged differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0097] In some embodiments, the software system of the electronic device may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present invention takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device.
[0098] FIG4 shows a software structure block diagram of an electronic device provided in an embodiment of the present application.
[0099] A layered architecture divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other through software interfaces. In some embodiments, the Android system may include four layers: from top to bottom, the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.
[0100] The application layer can include a series of application packages.
[0101] As shown in Figure 4, the application package may include applications such as calendar, call, map, navigation, Bluetooth, social, music, and conference. Optionally, applications such as call, social, and conference may all have call functions, which can realize the call scenario described in the embodiments of the present application. In some embodiments of the present application, in a call scenario, applications such as call, social, and conference apply for "wake_lock" (or "lock") to prevent the application from entering a sleep state. It can be understood that "wake_lock" is a lock mechanism that can be used to prevent the system of an electronic device from entering a sleep state. As long as any application holds "wake_lock", the system of the electronic device cannot enter a sleep state.
[0102] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions.
[0103] As shown in FIG4 , the application framework layer may include a window manager, a content provider, a view system, a phone manager, a notification manager, a power management service, and the like.
[0104] A window manager is used to manage window programs.
[0105] Content providers are used to store and retrieve data and make this data accessible to applications.
[0106] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc.
[0107] The phone manager is used to provide communication functions for electronic devices, such as call status management (including answering, hanging up, etc.).
[0108] The notification manager enables applications to display notification information in the status bar, which can be used to convey informational messages and disappear automatically after a short stay without user interaction.
[0109] The power management service is a core service for power management of electronic devices. For example, the power management service can be used to control the standby state of the system, control the on / off and brightness adjustment of the display screen, etc. In some embodiments of the present application, the power management service can be used to monitor the proximity light state based on the signal collected by the proximity light sensor, and then control the screen to be on or off according to the proximity light state. For example: when it is determined that the proximity light state has changed and the proximity light state is the proximity state, the screen is controlled to be off after a preset delay.
[0110] Android Runtime includes core libraries and a virtual machine. Android runtime is responsible for scheduling and management of the Android system.
[0111] The core library consists of two parts: one is the function that needs to be called by the Java language, and the other is the Android core library.
[0112] The application layer and application framework layer run in a virtual machine. The virtual machine executes Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.
[0113] The system library can include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
[0114] The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.
[0115] The media library supports playback and recording of a variety of common audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0116] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0117] A 2D graphics engine is a drawing engine for 2D drawings.
[0118] The kernel layer is the layer between hardware and software. The kernel layer includes at least display drivers, sensor drivers, and Bluetooth drivers.
[0119] It is understood that the hierarchical division shown in FIG4 and the modules included in each layer are merely exemplary and do not constitute a limitation of this application. In actual applications, other division methods may be used, and each module may be located at a different layer, for example, the power management service may be located at the application layer.
[0120] The following illustrates the workflow of electronic device software and hardware, using a call scenario. When touch sensor 180B receives a touch operation, a corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes the touch operation into a raw input event (including touch coordinates, touch operation timestamp, and other information). The raw input event is stored in the kernel layer. The application framework layer obtains the raw input event from the kernel layer and identifies the control corresponding to the input event.
[0121] For example, the touch operation is a touch-click operation, and the control corresponding to the touch-click operation is the dialing control 502 in the dialing interface 501 shown in FIG5 . In response to the touch-click operation on the dialing control 502, the call application calls the interface of the application framework layer to dial the number "123XXXXXXXX". For example, in response to the dialing operation, the electronic device can present a call interface 101 such as that shown in FIG1 (1). Optionally, the number "123XXXXXXXX" can be input through the keyboard 503 or can be saved in the address book.
[0122] Furthermore, the call application starts the proximity light sensor to collect signals by calling the sensor driver of the kernel layer, and starts the power management service of the application framework layer to monitor the proximity light state according to the signal collected by the proximity light sensor. The signal collected by the proximity light sensor can be passed to the power management service of the application framework layer via the kernel layer. The power management service can determine the proximity light state based on the signal, and then perform the operation of turning on the screen or delaying the screen for a preset time according to the proximity light state. For example: when it is determined that the proximity light state has changed and the proximity light state is the distant state, the screen is controlled to be turned on. When it is determined that the proximity light state has changed and the proximity light state is the close state, the screen is controlled to be turned off after a preset time delay.
[0123] It can be understood that this embodiment takes the example of the power management service of the application framework layer delaying the preset period of time and then controlling the screen to turn off. In other embodiments, other layers (such as: kernel layer, system layer or application layer) may also perform the operation of delaying the preset period of time and then controlling the screen to turn off. This application does not make specific limitations on this.
[0124] The technical solutions involved in the following embodiments can all be implemented in devices having the structures shown in Figures 2, 3, and 4.
[0125] The following describes the technical solutions provided by the embodiments of the present application, taking a mobile phone as an example, in conjunction with the accompanying drawings. It is understood that the technical solutions provided by the embodiments of the present application are all based on a call scenario as an example.
[0126] An embodiment of the present application provides a display screen control method, which, when a mobile phone is in a call scenario, turns on the screen or turns off the screen after a preset delay according to the acquired proximity light signal.
[0127] The following first introduces the call scenario.
[0128] In some examples, the call scenario may include one or more of an unconnected scenario, a connected scenario, etc. Among them, the unconnected scenario may refer to a scenario in which the number is being called but the other party has not answered. For example, the call interface 101 shown in (1) in Figure 1 is an unconnected scenario. The connected scenario may refer to a scenario in which the other party has answered. For example, (1) in Figure 6 shows an interface diagram of a connected scenario provided in an embodiment of the present application. For example, as shown in (1) in Figure 6, the call interface 600 includes an incoming call number or a calling number such as "123XXXXXXXX", a call duration such as "00:24", a number location such as "Beijing", a hang-up button 601, and one or more other function buttons, such as recording, waiting, adding a call, mute, etc., which will not be introduced one by one here.
[0129] In other examples, the call scenario may include one or more of a normal call scenario, a voice call scenario, a network call scenario, and the like. Among them, the normal call scenario may refer to a scenario in which a call is made through a system call application in a mobile phone and a mobile phone number. In other words, the scenario in which a call is made through a SIM card installed in a mobile phone does not require consumption of network traffic. For example, (1) in FIG1 and (1) in FIG6 are both interface diagrams of normal call scenarios provided in embodiments of the present application.
[0130] A voice call scenario may refer to a scenario in which a voice call is made through a social application, a conference application, or the like, and the voice call scenario requires consumption of network traffic. For example, the voice call scenario may be realized through a social application, a conference application, or the like in a mobile phone, and an application account. Taking a social application as an example, FIG6 (2) shows an interface diagram of a voice call scenario provided by an embodiment of the present application. As shown in FIG6 (2), the call interface 610 includes a dialed account such as "Xiaohong", a hang-up button 611, and one or more other function buttons, such as a speaker, a microphone, etc., which will not be introduced one by one here.
[0131] It can be understood that (2) in Figure 6 is an example of an unconnected scenario. Taking the connected scenario as an example, (3) in Figure 6 shows an interface schematic diagram of another voice call scenario provided by an embodiment of the present application. As shown in (3) in Figure 6, the call interface 620 can also include the call duration such as "45:15". For the introduction of other controls on the interface shown in (3) in Figure 6, please refer to the introduction of the corresponding controls described in (2) in Figure 6, and no further details will be given here.
[0132] Internet calling scenarios refer to scenarios where calls are made using the Internet calling software on a mobile phone and a phone number. In other words, calls are made over the Internet and a phone number. The difference between Internet calling scenarios and regular phone calls is that regular phone calls do not use the Internet, while Internet calling scenarios do. The difference between Internet calling scenarios and voice calls is that Internet calling scenarios use a phone number, while voice calling scenarios do not use a phone number.
[0133] It can be understood that the call scenario described above is only an exemplary explanation made to facilitate understanding of this application. The call scenario described in the embodiment of this application can be a scenario in which any software is used for two-party or multi-party calls, and this application does not make specific limitations on this.
[0134] It can also be understood that when the mobile phone is in a call scene, the interface currently displayed by the mobile phone may not be the call interface, for example, it may be the main interface (or desktop), or other interfaces such as the running interface of other applications. For example, (4) in Figure 6 shows a schematic diagram of other interfaces displayed by the mobile phone except the call interface when the mobile phone is in a call scene. Taking the other interface as the main interface as an example, as shown in (4) in Figure 6, the mobile phone displays the main interface 630. Among them, the main interface 630 may include a button 631 for clicking to return to the call. By performing operations such as clicking on the button 631, the mobile phone can return to the call interface such as shown in (1) in Figure 1, (1), (2), (3) in Figure 6, etc.
[0135] Optionally, the main interface 630 includes one or more application icons, such as a calendar application icon, a weather application icon, etc., which are not illustrated one by one here. The icons of different applications can be used to open the running interface of the corresponding application and implement the functions of the corresponding application.
[0136] In some embodiments, after an application installed in the mobile phone starts the call function, the mobile phone can determine that it is in a call scene. That is to say, after the mobile phone starts the function of the corresponding scene, it is in the scene. Optionally, the applications with call functions installed in the mobile phone may include one or more, such as system call applications, conference applications, Changlian applications, social applications, etc. Furthermore, the mobile phone can obtain proximity light signals. Exemplarily, the mobile phone can collect proximity light signals in real time or periodically through a proximity light sensor, etc. The embodiments of the present application do not impose any restrictions on the specific way in which the mobile phone obtains proximity light signals.
[0137] In some embodiments, the mobile phone can determine the proximity light state based on the acquired proximity light signal. In some embodiments, the proximity light state includes an approaching state and a distant state. The approaching state can be used to indicate that an object is approaching the mobile phone. In the approaching state, the mobile phone may be obscured by the object. The distant state can be used to indicate that an object is moving away from the mobile phone. In the distant state, the mobile phone may not be obscured by the object.
[0138] In some embodiments, the proximity state may refer to a state in which the distance between the front camera of the mobile phone (or the display screen, or the mobile phone) and the object is less than or equal to a preset distance. For example, the preset distance may be 1 cm, 2 cm, etc., and the specific value of the preset distance may be set by the developer according to actual needs. For example, taking the preset distance of 2 cm as an example, FIG7 (1) shows a schematic diagram of a scenario in which the proximity light state provided by an embodiment of the present application is a proximity state.
[0139] In some embodiments, the distance state may refer to a state in which the distance between the front camera (or display screen) of the mobile phone and the object is greater than a preset distance. For example, taking the preset distance of 2 cm as an example, FIG7 (2) shows a schematic diagram of a scenario in which the proximity light state is the distance state provided by an embodiment of the present application.
[0140] In some embodiments, the mobile phone can perform the operation of turning on the screen or turning off the screen for a preset time according to the state of the display screen and the proximity to light. For example, the state of the display screen can include a screen-on state and a screen-off state.
[0141] In this embodiment, as a possible implementation, if the phone is in the screen-on state and the phone determines that the current proximity light state is the proximity state, the phone will delay turning off the screen for a preset time. Based on this solution, when the phone screen is on, if the proximity light state is the proximity state, the screen will be turned off after a preset delay. This can give the user enough time to pull down the control center, notification bar, etc., bringing convenience to the user.
[0142] Optionally, in this implementation, after the mobile phone delays for a preset period of time, the mobile phone can also obtain the proximity to light state after the delay for the preset period of time. If the proximity to light state is still the proximity state, the mobile phone can immediately turn off the screen. If the proximity to light state is the distance state, the mobile phone can maintain the screen on. Optionally, in the scenario where the mobile phone maintains the screen on, if there is already a delay processing logic (or delay processing task) in the mobile phone, the mobile phone can also remove the delay processing logic, that is, the aforementioned logic (or task) of delaying the screen to turn off the screen for a preset period of time, that is, the mobile phone does not execute the delay processing logic to achieve the purpose of immediately lighting the screen. Based on this solution, after the mobile phone delays for a preset period of time, before turning off the screen, it confirms again whether the current proximity to light state is the proximity state, and the screen will only be turned off when it is the proximity state. In this way, the purpose of saving power and avoiding accidental touches of the screen can be achieved. When it is in the distance state, the screen is turned on, which can facilitate the user to operate the mobile phone.
[0143] As another possible implementation, if the phone is in the screen-off state and the phone determines that the current proximity state is the far state, the phone immediately turns on the screen. Based on this solution, when the phone is in the screen-off state, if the proximity state is the far state, the screen will immediately turn on, which can facilitate user operation of the phone.
[0144] As another possible implementation, if the phone is in the screen-on state and the phone determines that the current proximity state is the far state, the phone will maintain the screen on. Based on this solution, when the phone is in the screen-on state, if the proximity state is the far state, the screen will remain on, which can facilitate user operation of the phone. Optionally, in this implementation and the previous implementation, if the phone has delay processing logic, the phone can also remove the delay processing logic to achieve the purpose of immediately turning on the screen.
[0145] As another possible implementation, if the phone is in the screen-off state and the phone determines that the current proximity light state is the proximity state, the phone will remain in the screen-off state. Based on this solution, when the phone is in the screen-off state, if the proximity light state is the proximity state, the screen will remain in the off state, which can achieve the purpose of saving power and preventing accidental touches of the screen.
[0146] In other embodiments, the mobile phone can turn on the screen or turn off the screen after a preset delay according to the change in the proximity to light state.
[0147] For example, in this embodiment, as a specific implementation, FIG8 shows a flow chart of a display screen control method provided in an embodiment of the present application.
[0148] It is understood that in the embodiments of the present application, the mobile phone can perform some or all of the steps in the embodiments of the present application. These steps or operations are only examples, and the embodiments of the present application can also perform other operations or variations of various operations. In addition, the various steps can be performed in a different order than those presented in the embodiments of the present application, and it is possible that not all operations in the embodiments of the present application need to be performed.
[0149] As shown in FIG8 , the display screen control method includes the following steps:
[0150] S801. The mobile phone obtains a proximity light status.
[0151] Optionally, the proximity light state may be at least one of a current proximity light state and a previous proximity light state.
[0152] For example, the mobile phone can determine the proximity light state by collecting the proximity light signal. Alternatively, the mobile phone can also send the collected proximity light signal to other devices, and the other devices can determine the proximity light state based on the proximity light signal, and then the mobile phone can obtain the proximity light state from the other devices.
[0153] Optionally, the mobile phone may obtain the proximity light status in real time or periodically.
[0154] S802: The mobile phone determines whether the proximity light state has changed.
[0155] It can be understood that whether the proximity light state has changed may refer to whether the current proximity light state has changed relative to the previous proximity light state.
[0156] In some embodiments, the mobile phone can determine whether the proximity light state has changed based on the current proximity light state and the last proximity light state.
[0157] In other embodiments, when the proximity light state is in the near state, the phone is in the screen-off state. When the proximity light state is in the far state, the phone is in the screen-on state. Therefore, the phone can determine whether the proximity light state has changed based on the state of the display screen (e.g., screen-on state, screen-off state, etc.) and the current proximity light state.
[0158] If no change occurs, for example, the current proximity state and the last proximity state are both proximity states. Taking the preset distance of 2 cm as an example, Figure (a) shown in (1) of FIG9 is a schematic diagram of the scene of the current proximity state. As shown in Figure (a) of (1) of FIG9, the distance between the front camera of the mobile phone and the finger is 0.5 cm, which is less than the preset distance, and the current proximity state is the proximity state. Figure (b) shown in (2) of FIG9 is a schematic diagram of the scene of the last proximity state. As shown in Figure (b) of (1) of FIG9, the distance between the front camera of the mobile phone and the finger is 1 cm, which is less than the preset distance, and the last proximity state is also the proximity state.
[0159] It can be understood that when the current proximity light state and the last proximity light state are both proximity states, the distance between the object and the front camera (or display screen) of the mobile phone in the current proximity light state may be greater than, or less than (taking (1) in FIG9 as an example), or equal to the distance between the object and the front camera (or display screen) of the mobile phone in the last proximity light state.
[0160] Alternatively, the current approaching light state and the last approaching light state are both far away states. Taking the preset distance of 2 cm as an example, Figure (c) shown in (2) of Figure 9 is a schematic diagram of the scene of the current approaching light state. As shown in Figure (c) of (2) of Figure 9, the distance between the front camera of the mobile phone and the finger is 8 cm, which is greater than the preset distance, and the current approaching light state is far away state. Figure (d) shown in (2) of Figure 9 is a schematic diagram of the scene of the last approaching light state. As shown in Figure (d) of (2) of Figure 9, the distance between the front camera of the mobile phone and the finger is 5 cm, which is greater than the preset distance, and the last approaching light state is also far away state.
[0161] It can be understood that when the current near-light state and the last near-light state are both far-away states, the distance between the object and the front camera (or display screen) of the mobile phone in the current near-light state may be greater (taking (2) in FIG9 as an example), or less than, or equal to the distance between the object and the front camera (or display screen) of the mobile phone in the last near-light state.
[0162] At this point, the situation ends, meaning the phone takes no action. For example, if the phone screen was off when the last proximity state was close, and the current proximity state is also close, the phone can take no action and the screen remains off. Another example: If the phone screen was on when the last proximity state was far, and the current proximity state is also far, the phone can take no action and the screen remains on.
[0163] If a change occurs, such as the current proximity state is the proximity state and the last proximity state was the distance state, it means that the proximity state has changed. Taking the preset distance of 2 cm as an example, Figure (a) shown in (1) of Figure 10 is a schematic diagram of the scene of the current proximity state. As shown in Figure (a) of (1) of Figure 10, the distance between the front camera of the mobile phone and the finger is 0.5 cm, which is less than the preset distance, and the current proximity state is the proximity state. Figure (b) shown in (1) of Figure 10 is a schematic diagram of the scene of the last proximity state. As shown in Figure (b) of (1) of Figure 10, the distance between the front camera of the mobile phone and the finger is 5 cm, which is greater than the preset distance, and the last proximity state was the distance state.
[0164] For another example: the current approaching light state is the far state, and the last approaching light state was the approaching state, which means that the approaching light state has changed. Taking the preset distance of 2 cm as an example, Figure (c) shown in (2) of Figure 10 is a schematic diagram of the scene of the current approaching light state. As shown in Figure (c) of (2) of Figure 10, the distance between the front camera of the mobile phone and the finger is 8 cm, which is greater than the preset distance, so the current approaching light state is the far state. Figure (d) shown in (2) of Figure 10 is a schematic diagram of the scene of the last approaching light state. As shown in Figure (d) of (2) of Figure 10, the distance between the front camera of the mobile phone and the finger is 1 cm, which is less than the preset distance, so the last approaching light state was the approaching state.
[0165] At this time, step S803 is executed.
[0166] S803, mobile phone removal (or deletion) delay processing logic.
[0167] It can be understood that in the embodiment of the present application, the delay processing logic may refer to the logic of delaying for a preset period of time before turning off the screen.
[0168] In some scenarios, there may be no delay processing logic in the mobile phone. For example, when the proximity state of the mobile phone changes from the far state to the close state for the first time, there is no delay processing logic in the mobile phone.
[0169] In other scenarios, there may be delay processing logic in the mobile phone. For example, when the proximity state of the mobile phone changes from the close state to the far state, there is delay processing logic in the mobile phone.
[0170] Optionally, the mobile phone may or may not execute step S803. When the mobile phone executes step S803, step S803 may be before step S802. The embodiment of the present application does not limit the timing of the mobile phone executing step S803.
[0171] Based on this step, when the mobile phone performs the screen-lighting operation subsequently, the screen can be lit immediately.
[0172] S804: The mobile phone determines whether the current proximity light state is a proximity state.
[0173] If it is not the approaching state, that is, the far state, then step S805 is executed. If it is the approaching state, then step S806 is executed.
[0174] Optionally, the mobile phone may execute step S803 first, or may execute step S804 first.
[0175] Optionally, steps S802 and S803 described above may be implemented as other steps: for example, determining whether the proximity light state has changed from a distant state to a close state. If so, executing step S806. If not, determining whether the proximity light state has changed from a close state to a distant state. If so, executing step S805. If not, determining whether the proximity light state has not changed. If so, terminating the process, i.e., not performing any further processing. It should be understood that this application does not limit the order in which the three determination steps described in this example are executed.
[0176] S805, turn on the screen.
[0177] In some embodiments, before the mobile phone executes step S805, the mobile phone is in a screen-off state.
[0178] In some embodiments, the mobile phone can immediately turn on the screen. In other embodiments, the mobile phone can also delay the screen turning on for a preset period of time. This application does not specifically limit this. For example, the mobile phone can restore from the screen-off interface shown in (2) in Figure 1 to the call interface 101 shown in (1) in Figure 1.
[0179] S806: Turn off the screen after a preset delay.
[0180] For example, when an object repeatedly and rapidly approaches and moves away from a mobile phone, the proximity state will rapidly switch between the proximity state and the distance state, and the mobile phone needs to switch between the screen off and the screen on. In this application, the screen is turned off after a preset delay. The longer the preset delay, the more likely the mobile phone will switch from the proximity state to the distance state before the screen turns off, and the lower the probability of the mobile phone displaying a black screen. Exemplary, the preset delay may include but is not limited to greater than or equal to 150ms, or greater than or equal to 200ms, or greater than or equal to 250ms, etc.
[0181] For example, since the screen is turned off after a preset delay in this application, the shorter the preset delay, the smoother the screen will turn off, and the screen will not remain on for a long time, causing the user to feel a lag. For example, the preset delay may include but is not limited to less than or equal to 500ms, or less than or equal to 400ms, or less than or equal to 350ms, etc.
[0182] In a specific example, considering the smooth effect of black screen flashing and mobile phone screen turning off, the preset duration is greater than or equal to 250ms and less than or equal to 350ms. For example, the preset duration may be 300ms.
[0183] Optionally, the specific value of the preset duration can be set by the developer according to actual needs.
[0184] In some embodiments, before executing step S806, the mobile phone is in a screen-on state. For example, in a call scenario such as shown in FIG1 (1) and FIG6, when the front camera of the mobile phone is blocked, the mobile phone can delay for a preset time and then turn off the screen. For example, the mobile phone can present a screen-off interface such as shown in FIG1 (2).
[0185] Optionally, before executing step S806, the mobile phone may first determine a preset delay time to turn off the screen.
[0186] In some embodiments, the proximity light state of the phone may change after and / or during the preset delay period. Therefore, before turning off the screen, the phone can also determine whether the proximity light state after the preset delay period is the same as the current proximity light state. If they are the same, i.e., both are proximity states, the phone will immediately turn off the screen.
[0187] If they are different, that is, the state of being close to the light after the preset delay is the state of being far away, or the state of being close to the light within the preset delay is the state of being far away, then the phone maintains the screen on. In other words, the phone terminates the operation of turning off the screen after the preset delay. Exemplarily, the operation of turning off the screen after the preset delay includes the operation of timing the preset time and the operation of turning off the screen. The termination operation may be performed at various times, such as during the process of timing the preset time, before executing the operation of turning off the screen, etc. Optionally, in this embodiment, in the scenario where the phone maintains the screen on, if there is a delay processing logic in the phone, the phone can also remove the delay processing logic, that is, the aforementioned logic of turning off the screen after the preset delay, so as to terminate the operation of turning off the screen after the preset delay, thereby achieving the purpose of immediately lighting the screen.
[0188] Optionally, during the delay of the preset time period, the mobile phone may obtain the proximity light state in real time or periodically to determine whether the proximity light state is the same as the current proximity light state.
[0189] In some embodiments, when the mobile phone executes step S803, there is no delay processing logic in the mobile phone before the mobile phone executes step S806. Therefore, when the mobile phone executes step S806, the screen can be turned off after a preset delay.
[0190] Optionally, the delay processing logic may be generated (or created) during the execution of step S806 after the mobile phone determines to delay the screen for a preset period of time.
[0191] Based on the above technical solution, when the mobile phone determines that the proximity light state has changed and the current proximity light state is the proximity state, the screen is turned off after a preset delay. This can give the user enough time to pull down the control center, notification bar, etc., bringing convenience to the user. In addition, when an object repeatedly and quickly approaches and moves away from the mobile phone, the proximity light state will quickly switch between the proximity state and the distance state, and the mobile phone needs to switch between the screen off and the screen on. However, in this application, since the screen is turned off after a preset delay, the mobile phone may have switched from the proximity light state to the distance state before the screen is turned off, so the mobile phone will not experience a flashing black screen.
[0192] In some embodiments, the mobile phone may further execute step S807 before executing step S806.
[0193] S807: Determine whether the application for starting the call function is in the whitelist.
[0194] If it is in the whitelist, step S806 is executed. If it is not in the whitelist, step S808 is executed. It is understood that the whitelist includes one or more preset applications. If an application is a preset application, step S806 can be executed, and if it is not a preset application, step S808 can be executed.
[0195] S808. Turn off the screen immediately.
[0196] Based on this solution, only apps on the whitelist will be delayed for a preset period before turning off the screen, while apps outside the whitelist will not be delayed for the preset period before turning off the screen. This ensures application security and improves user experience.
[0197] It can be understood that after executing step S805, or step S806, or step S808 shown in Figure 8, the mobile phone can also return to execute the technical solution provided by the embodiment of the present application, such as monitoring whether the mobile phone is in a call scene, and when the mobile phone is in a call scene, continue to execute the display screen control method provided by the embodiment of the present application.
[0198] It can also be understood that the technical solutions provided in the various embodiments of the present application can be used separately or in combination when there is no conflict.
[0199] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of method. It is understandable that, in order to realize the above functions, the electronic device includes a hardware structure and / or software module corresponding to the execution of each function. In combination with the units and algorithm steps of each example described in the embodiment disclosed in this application, the embodiment of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer-driven hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to realize the described functions for each specific application, but such implementation should not be considered to exceed the scope of the technical solution of the embodiment of the present application.
[0200] The present application is an embodiment that can divide the functional modules of the electronic device according to the above method example. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of units in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0201] As shown in Figure 11, a schematic diagram of the structure of an electronic device provided in an embodiment of the present application is provided. The electronic device 1100 can be used to implement the methods performed by the electronic device described in the above method embodiments. For example, the electronic device 1100 may include: a processing unit 1101 and an acquisition unit 1102.
[0202] The processing unit 1101 is configured to support the electronic device 1100 in executing steps S802 to S808 in FIG8 . And / or, the processing unit 1101 is further configured to support the electronic device 1100 in executing other steps executed by the electronic device in the embodiments of the present application.
[0203] The acquisition unit 1102 is configured to support the electronic device 1100 in executing step S801 in FIG8 . And / or, the acquisition unit 1102 is further configured to support the electronic device 1100 in executing other steps executed by the electronic device in the embodiments of the present application.
[0204] Optionally, the electronic device 1100 shown in FIG11 may further include a display unit (not shown in FIG11 ), which is configured to support the electronic device 1100 in performing various display operations.
[0205] Optionally, the electronic device 1100 shown in FIG11 may further include a communication unit (not shown in FIG11 ), which is used to support the electronic device 1100 in executing the steps of communication between the electronic device and other devices in the embodiments of the present application.
[0206] Optionally, the electronic device 1100 shown in Figure 11 may further include a storage unit 1103 storing a program or instruction. When the processing unit 1101 executes the program or instruction, the electronic device 1100 shown in Figure 11 may perform the method shown in the above method embodiment.
[0207] The technical effects of the electronic device 1100 shown in FIG11 can refer to the technical effects of the method shown in FIG8 and are not described in detail here. The processing unit 1101 involved in the electronic device 1100 shown in FIG11 can be implemented by a processor or a processor-related circuit component, which can be a processor or a processing module.
[0208] An embodiment of the present application also provides a chip system, as shown in Figure 12, which includes at least one processor 1201 and at least one interface circuit 1202. The processor 1201 and the interface circuit 1202 can be interconnected via lines. For example, the interface circuit 1202 can be used to receive signals from other devices. For another example, the interface circuit 1202 can be used to send signals to other devices (such as the processor 1201). Exemplarily, the interface circuit 1202 can read instructions stored in the memory and send the instructions to the processor 1201. When the instructions are executed by the processor 1201, the electronic device can execute the various steps performed by the electronic device in the above embodiment. Of course, the chip system can also include other discrete devices, which is not specifically limited in the embodiment of the present application.
[0209] Optionally, there may be one or more processors in the chip system. The processor may be implemented in hardware or software. When implemented in hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented in software, the processor may be a general-purpose processor implemented by reading software code stored in a memory.
[0210] Optionally, the memory in the chip system may be one or more memories. The memory may be integrated with the processor or may be provided separately from the processor, which is not limited in this application. For example, the memory may be a non-transient processor, such as a read-only memory (ROM), which may be integrated with the processor on the same chip or provided on different chips. This application does not specifically limit the type of memory or the configuration of the memory and the processor.
[0211] Exemplarily, the chip system can be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD) or other integrated chips.
[0212] It should be understood that each step in the above method embodiment can be completed by hardware integrated logic circuits in a processor or by software instructions. The method steps disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware processor, or by a combination of hardware and software modules in a processor.
[0213] An embodiment of the present application further provides a computer storage medium, in which computer instructions are stored. When the computer instructions are executed on an electronic device, the electronic device executes the method described in the above method embodiment.
[0214] An embodiment of the present application provides a computer program product, which includes: a computer program or instructions, which, when executed on a computer, causes the computer to execute the method described in the above method embodiment.
[0215] In addition, an embodiment of the present application also provides a device, which can specifically be a chip, component or module, and the device may include a connected processor and memory; wherein the memory is used to store computer-executable instructions, and when the device is running, the processor can execute the computer-executable instructions stored in the memory to enable the device to execute the methods in the above-mentioned method embodiments.
[0216] Among them, the electronic device, computer storage medium, computer program product or chip provided in this embodiment is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be repeated here.
[0217] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0218] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The various embodiments can be combined with each other or referenced to each other without conflict. The device embodiments described above are merely schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0219] Units described as separate components may or may not be physically separate, and components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0220] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0221] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0222] The above content is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. A display screen control method, characterized in that: Applied to an electronic device having a display screen, the method comprises: In case of starting the target function of the application, obtaining a current proximity light state of the electronic device, where the proximity light state is used to represent whether an object is approaching or moving away from the electronic device; If the display screen is in a light-on state, the current proximity light state changes compared to the previous proximity light state, and the current proximity light state indicates that an object is approaching the electronic device, it is determined to delay turning off the display screen for a preset time length.
2. The method according to claim 1, characterized in that: After determining to delay the preset time to turn off the display screen, the method further includes: The display screen is turned off after a delay of the preset time.
3. The method according to claim 2, characterized in that The delaying the preset time to turn off the display screen comprises: Acquiring the proximity light state of the electronic device after the preset time period; After the preset time period, when the proximity light state of the electronic device indicates that an object is approaching the electronic device, the display screen is turned off.
4. The method according to any one of claims 1 to 3, characterized in that: Before determining to delay the preset time to turn off the display screen, the method further includes: The application is determined to be a preset application.
5. The method according to claim 1, characterized in that After determining to delay the preset time to turn off the display screen, the method further includes: Acquiring the proximity light state of the electronic device within the preset time period; If the proximity light state of the electronic device represents that the object is away from the electronic device within the preset time period, the operation of delaying the preset time period to turn off the display screen is terminated.
6. The method according to claim 5, characterized in that After determining to delay the preset time to turn off the display screen, the method further includes: Creating a delay processing task, wherein the delay processing task is a task for delaying the extinguishing of the display screen for a preset time period; The terminating the operation of delaying the preset time to turn off the display screen comprises: Delete the delayed processing task.
7. The method according to any one of claims 1 to 6, characterized in that: The preset duration is greater than or equal to 250ms.
8. The method according to any one of claims 1 to 7, characterized in that: The preset duration is less than or equal to 350 ms.
9. The method according to any one of claims 1 to 7, characterized in that: The method is performed by a power management service of the electronic device.
10. The method according to any one of claims 1 to 9, characterized in that: The target function includes a call function.
11. An electronic device, characterized in that: It includes an acquisition unit and a processing unit; The acquisition unit is used to acquire the current proximity light state of the electronic device when the target function of the application is started, wherein the proximity light state is used to represent whether an object is approaching or moving away from the electronic device; The processing unit is used to determine a delay of a preset time to turn off the display screen if the display screen is in a light-screen state, the current proximity light state changes compared to the previous proximity light state, and the current proximity light state represents that an object is approaching the electronic device.
12. The electronic device according to claim 11, characterized in that: The processing unit is further used to delay turning off the display screen for a preset period of time.
13. An electronic device, characterized in that: include: A processor, a memory and a display screen, wherein the memory and the display screen are coupled to the processor, the memory is used to store program code, the program code includes instructions, and the processor reads the instructions from the memory so that the electronic device executes the method as described in any one of claims 1-10.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium comprises a computer program, and when the computer program is executed on an electronic device, the electronic device is caused to execute the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Display screen control method and electronic equipment
CN118672378A
Display method, storage medium and electronic equipment
CN108924360A
Screen turn-off control method and electronic equipment
CN111147667A
Proximity light sensor control method and related equipment
CN114172983A
Proximity detection method and terminal device
WO2021057712A1
