Display screen control method and related equipment
By judging the available status of the AOD function and fingerprint unlocking function, corresponding power-on and power-off instructions are generated, which solves the problem of the display power-on instructions not corresponding to the power-off instructions, ensures that the display screen lights up normally, and improves the user experience.
Patent Information
- Application Number
- CN202310659955.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-05
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2043-06-05
AI Technical Summary
When the display of a smart terminal turns off and then turns on, the generated power-on command does not correspond to the power-off command when the screen turns off, causing the display to fail to turn on normally, affecting the user experience.
By determining the available status of the AOD function and fingerprint unlocking function of the electronic device, the corresponding power-on and power-off instructions are generated to ensure that the power-on instructions are consistent with the saved power-off instructions, thereby solving the problem of mismatch between the power-on instructions and the power-off instructions. .
Ensure that the display can be powered on normally when the screen is turned on to avoid screen freezing and improve user experience.
Smart Images

Figure CN117707405B
Abstract
Description
Technical Field
[0001] The present application relates to the field of display technology, and in particular to a display screen control method and related equipment. Background Art
[0002] When the display screen of smart terminals such as smartphones and tablets is off, it can enter the all-day display (AOD, AlwaysOn Display) mode, so that information such as date, time, notifications and fingerprint unlocking area can be continuously displayed. In AOD mode, if the power button of the smart terminal is triggered, the display screen can be controlled to light up. When the display screen is on, it is necessary to send a power-on command to control the display screen to power on. When the display screen is off, it is necessary to send a power-off command to control the display screen to power off, and the power-off command when the screen is off has a one-to-one correspondence with the power-on command when the screen is turned on after the screen is turned off. However, the power-on command actually generated when the screen is turned on after the screen is turned off may change with the activation state of the AOD function, resulting in a mismatch with the power-off command when the screen is turned off. In this way, the display screen will not be able to be powered on when the screen is on, resulting in the inability to light up the screen normally, causing a frozen screen phenomenon, thereby affecting the user experience. Summary of the invention
[0003] In view of the above content, it is necessary to provide a display screen control method and related equipment to solve the problem that the power-on instruction generated when the screen is turned on after being turned off does not correspond to the power-off instruction when the screen is turned off, resulting in the display screen being unable to power on when the screen is turned on.
[0004] In a first aspect, the present application provides a display screen control method, which is applied to an electronic device, and the method includes: responding to a screen-off instruction, determining whether an AOD function or a fingerprint unlocking function of the electronic device is available; if the AOD function or the fingerprint unlocking function of the electronic device is available, generating a first power-off instruction, and sending the first power-off instruction to the display screen of the electronic device to control the display screen to power off; responding to a screen-on instruction, generating a first power-on instruction, and sending the first power-on instruction to the display screen to control the display screen to power on, wherein the first power-on instruction corresponds to the first power-off instruction; if both the AOD function and the fingerprint unlocking function of the electronic device are unavailable, generating a second power-off instruction, and sending the second power-off instruction to the display screen to control the display screen to power off; responding to the screen-on instruction, generating a second power-on instruction, and sending the second power-on instruction to the display screen to control the display screen to power on, wherein the second power-on instruction corresponds to the second power-off instruction.
[0005] Through the above technical solution, the power-on command generated when the screen is turned on after being turned off is set corresponding to the power-off command when the screen is turned off, instead of being set according to the available status of the real-time AOD function and the fingerprint unlocking function, ensuring that the power-on command can control the display screen to power on and turn on the screen.
[0006] In one possible implementation, the electronic device provides a screen-off display setting interface, and the screen-off display setting interface includes a control for controlling turning the screen-off display on or off and an option for selecting a screen-off display mode.
[0007] The above technical solution can facilitate users to set the screen-off display mode of electronic devices.
[0008] In one possible implementation, determining whether the AOD function of the electronic device is available includes: obtaining the state of the control that controls the screen-off display on or off and the screen-off display mode options on the screen-off display setting interface; if the state of the control that controls the screen-off display on or off is on and the screen-off display mode option is all-day display, determining that the AOD function is available; or if the state of the control that controls the screen-off display on or off is off or the screen-off display mode option is not all-day display, determining that the AOD function is unavailable. Through the above technical solution, the available state of the AOD function can be accurately determined.
[0009] In a possible implementation, determining whether the fingerprint unlocking function of the electronic device is available includes: determining whether the electronic device has recorded a fingerprint, and obtaining the state of a control on the fingerprint unlocking setting interface that controls whether the fingerprint unlocking is turned on or off; if the electronic device has recorded a fingerprint, and the state of the control that controls whether the fingerprint unlocking is turned on or off is on, determining that the fingerprint unlocking function is available; or if the electronic device has not recorded a fingerprint, or the state of the control that controls whether the fingerprint unlocking is turned on or off is off, determining that the fingerprint unlocking function is unavailable. Through the above technical solution, the available state of the fingerprint unlocking function can be accurately determined.
[0010] In a possible implementation, the first power-off instruction, the first power-on instruction, the second power-off instruction, and the second power-on instruction are all preset CMD instructions, and the preset CMD instructions include instruction content and index values. Through the above technical solution, the CMD instructions are used to control the power on and off of the display screen, which can simplify the process of turning the screen on and off and improve the efficiency of turning the screen on and off.
[0011] In a possible implementation, generating the first power-off instruction includes: if the AOD function or the fingerprint unlocking function of the electronic device is available, calling the instruction sending interface to generate the first power-off instruction. Through the above technical solution, when the screen is turned off, the power-off instruction is generated according to the available status of the AOD function and the fingerprint unlocking function, so that the saved power-off instruction is consistent with the available status of the AOD function and the fingerprint unlocking function.
[0012] In a possible implementation, generating the first power-on instruction includes: obtaining the first power-off instruction saved when the screen was turned off last time, and calling the instruction sending interface to generate a first power-on instruction corresponding to the first power-off instruction.
[0013] Through the above technical solution, when the screen is turned on, a power-off instruction is not generated based on the available status of the AOD function and the fingerprint unlocking function, but a power-off instruction corresponding to the saved power-off instruction is generated, ensuring that the display screen can be powered on and turned on normally.
[0014] In a possible implementation, the generating the second power-off instruction includes: if both the AOD function and the fingerprint unlocking function of the electronic device are unavailable, calling an instruction sending interface to generate the second power-off instruction.
[0015] Through the above technical solution, when the screen is turned off, a power-off instruction is generated according to the available status of the AOD function and the fingerprint unlocking function, so that the saved power-off instruction is consistent with the available status of the AOD function and the fingerprint unlocking function.
[0016] In a possible implementation, generating the second power-on instruction includes: obtaining the second power-off instruction saved when the screen was turned off last time, and calling the instruction sending interface to generate a second power-on instruction corresponding to the second power-off instruction.
[0017] Through the above technical solution, when the screen is turned on, a power-off instruction is not generated based on the available status of the AOD function and the fingerprint unlocking function, but a power-off instruction corresponding to the saved power-off instruction is generated, ensuring that the display screen can be powered on and turned on normally.
[0018] In a possible implementation, the method further includes: if an input event of a power button of the electronic device being triggered occurs when the display screen is on, or the electronic device does not generate any input event within a preset time, generating the screen-off instruction. Based on the above technical solution, the display screen can be turned off in time by generating a screen-off instruction to reduce system power consumption and save electricity.
[0019] In a possible implementation, the method further includes: if an input event occurs when the display screen is off, such as the power button of the electronic device is triggered, the electronic device is lifted, or the display screen is touched, generating the screen-on instruction. Based on the above technical solution, the display screen can be controlled to light up in time by generating the screen-on instruction, so as to ensure that the user can use the electronic device normally.
[0020] In a second aspect, the present application provides an electronic device, comprising a memory and a processor: wherein the memory is used to store program instructions; the processor is used to read and execute the program instructions stored in the memory, and when the program instructions are executed by the processor, the electronic device executes the above-mentioned display screen control method.
[0021] In a third aspect, the present application provides a chip coupled to a memory in an electronic device, wherein the chip is used to control the electronic device to execute the above-mentioned display screen control method.
[0022] In a fourth aspect, the present application provides a computer storage medium storing program instructions, which, when executed on an electronic device, enables the electronic device to execute the above-mentioned display screen control method.
[0023] In addition, the technical effects brought about by the second to fourth aspects can be found in the descriptions related to the methods of each design in the above method part, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 It is a schematic diagram of the screen-off display setting interface provided in one embodiment of the present application.
[0025] Figure 2 This is another schematic diagram of the screen-off display setting interface provided by an embodiment of the present application.
[0026] Figure 3 This is a flowchart of sending power-on instructions and power-off instructions to a display screen provided by an embodiment of the present application.
[0027] Figure 4 This is a schematic diagram of generating power-on instructions and power-off instructions provided in an embodiment of the present application.
[0028] Figure 5 It is a software architecture diagram of an electronic device provided in one embodiment of the present application.
[0029] Figure 6 It is a schematic diagram of the interaction of various layers of the software architecture of an electronic device provided in one embodiment of the present application.
[0030] Figure 7 It is a schematic diagram of the interaction of various layers of the software architecture of an electronic device provided in one embodiment of the present application.
[0031] Figure 8 It is a flow chart of a display screen control method provided in one embodiment of the present application.
[0032] Fig. 9 It is a flowchart of a display screen control method provided by another embodiment of the present application.
[0033] Fig.10 This is a schematic diagram of generating power-on instructions and power-off instructions provided by another embodiment of the present application.
[0034] Fig.11 It is a flowchart of a display screen control method provided by another embodiment of the present application.
[0035] Fig.12This is a hardware architecture diagram of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0036] The terms "first" and "second" involved in the embodiments of the present application are only used for descriptive purposes and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way.
[0037] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those generally understood by technicians in the technical field in this application. The terms used in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. It should be understood that, unless otherwise specified in this application, " / " means or. For example, A / B can represent A or B. "And / or" in this application is only a description of the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. "At least one" refers to one or more. "Multiple" refers to two or more than two. For example, at least one of a, b or c can represent: a, b, c, a and b, a and c, b and c, a, b and c. In the absence of conflict, the following embodiments and the features in the embodiments can be combined with each other.
[0038] The detailed implementation process of the display screen control method can be referred to the description of each embodiment below. Figure 1 , Figure 2 , Figure 3 The application scenario of the display screen control method provided in the embodiment of the present application is described.
[0039] In order to facilitate users to understand the information of electronic devices without waking up the electronic device (i.e., without controlling the display screen of the electronic device to light up), such as date, time, incoming calls, push messages, etc., many electronic devices are equipped with an all-day display (AOD, Always On Display) function, so that when the display screen of the electronic device is off, it can enter the all-day display mode, and continuously display information such as date, time, incoming calls, push messages, and the fingerprint unlocking area under the screen in the all-day display area. In AOD mode, when a preset condition is triggered, the display screen can be controlled to light up. The preset condition can be that the power button of the electronic device is triggered, the electronic device detects the user's lifting operation, and the electronic device detects the user's touch display operation. When the display screen is on, it is necessary to send a power-on instruction based on the on state of the AOD function to control the display screen to power on. When the display screen is off, it is necessary to send a power-off instruction based on the on state of the AOD function to control the display screen to power off, and the power-off instruction when the screen is off and the power-on instruction when the screen is on after the screen is off have a one-to-one correspondence.
[0040] However, during the screen-off process, the on-state of the AOD function may change. For example, the AOD function was originally on. When the power of the electronic device is too low, the AOD function is automatically turned off to save power. At this time, when the display screen is controlled to light up, the power-on instruction generated according to the on-state of the AOD function does not correspond to the power-off instruction when the screen is off. In other words, the power-on instruction actually generated when the screen is turned on after the screen is turned off may change with the on-state of the AOD function, resulting in a mismatch with the power-off instruction when the screen is turned off. In this way, the display screen cannot be powered on when the screen is on, resulting in the display screen being unable to light up normally. Since the display screen cannot respond to user operations, a frozen screen phenomenon occurs, thereby affecting the user experience.
[0041] In one embodiment of the present application, the power-on command and the power-off command of the display screen are both CMD (Command, command prompt) commands, for example, the power-on command is CMD index1, and the power-off command is CMD index2. The power-on command and the power-off command of the display screen are generated by the AOD management service (HwAodManagerService), and the AOD management service generates the power-on command and the power-off command according to the enabled state or available state of the AOD function and the fingerprint unlocking function (i.e., the fingerprint unlocking function under the screen) of the electronic device.
[0042] See also Figure 1As shown, it is a schematic diagram of the screen-off display setting interface provided by an embodiment of the present application. The screen-off display setting interface includes controls for controlling the screen-off display to be turned on or off and options for the screen-off display mode. When the screen-off display is turned on and the screen-off display mode is displayed all day, the AOD function of the electronic device is turned on, that is, the AOD function is available. When the AOD function or fingerprint unlocking function of the electronic device is available, it is necessary to continuously display the AOD area or fingerprint unlocking area, the power-off instruction is CMD 21, and the corresponding power-on instruction is CMD 22. When controlling the display screen to turn off, if the AOD function or fingerprint unlocking function is available, the AOD management service generates a CMD 21 instruction as a power-off instruction, which is sent to the display driver circuit to control the display screen to power on. When controlling the display screen to light up, if the AOD function or fingerprint unlocking function is available, the AOD management service generates a CMD 22 instruction as a power-on instruction, which is sent to the display driver circuit to control the display screen to power on.
[0043] See also Figure 2 As shown, it is another schematic diagram of the screen-off display setting interface provided by an embodiment of the present application. When the screen-off display is turned off, or the screen-off display mode is not displayed all day, the AOD function of the electronic device is turned off, that is, the AOD function is unavailable. When both the AOD function and the fingerprint unlocking function of the electronic device are unavailable, there is no need to continuously display the AOD area and the fingerprint unlocking area. The power-off instruction is CMD 20, and the corresponding power-on instruction is also CMD 20. When controlling the display screen to turn off, if the AOD function and the fingerprint unlocking function are unavailable, the AOD management service generates a CMD 20 instruction as a power-off instruction, which is sent to the display driving circuit to control the display screen to power on. When controlling the display screen to light up, if the AOD function and the fingerprint unlocking function are unavailable, the AOD management service generates a CMD 20 instruction as a power-on instruction, which is sent to the display driving circuit to control the display screen to power on.
[0044] See also Figure 3 As shown, it is a flow chart of sending a power-on instruction and a power-off instruction to a display screen provided by an embodiment of the present application. S101, when a preset operation is detected, it is determined whether the AOD function or the fingerprint unlocking function is available. For example, the preset operation may be to trigger the power button.
[0045] If both the AOD function and the fingerprint unlocking function are unavailable, S102 is executed to generate the CMD 20 instruction, and then the process enters S106. If the AOD function or the fingerprint unlocking function is available, S103 is executed to determine whether the preset operation is a screen off operation.
[0046] If the preset operation is not a screen-off operation, S104 is executed to determine that the preset operation is a screen-on operation, a CMD 22 instruction is generated, and then the process enters S106. If the preset operation is a screen-off operation, S105 is executed to generate a CMD 21 instruction.
[0047] S106, sending the generated instruction to the display screen.
[0048] In one embodiment of the present application, a power-on instruction or a power-off instruction may be generated according to a determination result of whether the AOD function or the fingerprint unlocking function is available when the user performs a preset operation.
[0049] See also Figure 4 As shown in FIG. 1 , a schematic diagram of generating power-on and power-off instructions according to the AOD function and the fingerprint unlocking function provided by an embodiment of the present application is provided. When executing the screen off operation, the corresponding power-off and power-on instructions are generated according to the four situations of whether the AOD function and the fingerprint unlocking function are available. Figure 4 In the example, AOD+ indicates that the AOD function is available, AOD- indicates that the AOD function is unavailable, Finger+ indicates that the fingerprint unlocking function is available, and Finger- indicates that the fingerprint unlocking function is unavailable. Specifically, when the screen is off, if both the AOD function and the fingerprint unlocking function are available, the power-off instruction is CMD 21. Under normal circumstances, when the screen is turned on, the AOD function and the fingerprint unlocking function are still available, and the power-on instruction is CMD 22 corresponding to CMD 21; in abnormal circumstances, after the electronic device enters the power saving mode due to low battery (for example, less than 10%), when the screen is turned on, the AOD function is changed to unavailable, the fingerprint unlocking function is still available, and the power-on instruction is CMD 22 corresponding to CMD 21. At this time, the power-on instruction CMD 22 corresponds to the power-off instruction CMD 21, and the display screen can be powered on normally.
[0050] When the screen is off, if the AOD function is available and the fingerprint unlocking function is unavailable, the power-off command is CMD 21. Under normal circumstances, when the screen is turned on, the AOD function is still available, the fingerprint unlocking function is still unavailable, and the power-on command is CMD22 corresponding to CMD 21; in abnormal circumstances, the electronic device enters the power saving mode due to low battery. When the screen is turned on, the AOD function changes to unavailable, and the fingerprint unlocking function is still unavailable. According to the available status of the AOD function and the fingerprint unlocking function, the power-on command is CMD 20, which does not correspond to the power-off command CMD 21. At this time, the power-on command CMD 20 cannot control the display screen to power on.
[0051] When the screen is off, if the AOD function is unavailable and the fingerprint unlocking function is available, the power-off instruction is CMD 21. Under normal circumstances, when the screen is turned on, the AOD function is still unavailable, the fingerprint unlocking function is still available, and the power-on instruction is CMD22 corresponding to CMD 21; under abnormal circumstances, the electronic device exits the power saving mode due to an increase in power (for example, charging the electronic device increases the power of the electronic device). When the screen is turned on, the AOD function becomes available, the fingerprint unlocking function is still available, and the power-on instruction is CMD 22 corresponding to CMD 21. At this time, the power-on instruction CMD 22 corresponds to the power-off instruction CMD 21, and the display screen can be powered on normally.
[0052] When the screen is off, if both the AOD function and the fingerprint unlocking function are unavailable, the power-off command is CMD 20. Under normal circumstances, when the screen is turned on, both the AOD function and the fingerprint unlocking function are still unavailable, and the power-on command is CMD 20 corresponding to CMD 20; under abnormal circumstances, the electronic device exits the power saving mode due to increased power. When the screen is turned on, the AOD function becomes available, and the fingerprint unlocking function is still unavailable. According to the available status of the AOD function and the fingerprint unlocking function, the power-on command is CMD 22, which does not correspond to the power-off command CMD 20. At this time, the power-on command CMD 22 cannot control the display screen to power on.
[0053] Based on the above example, after the display screen generates a power-off command to turn off the screen based on the current available status of the AOD function and the fingerprint unlocking function, the available status of the AOD function and the fingerprint unlocking function may change (for example, due to changes in the power of the electronic device). In this way, when the display screen is turned on, if a power-on command is generated based on the changed available status of the AOD function and the fingerprint unlocking function, the power-on command may not correspond to the power-off command when the screen was turned off last time, thereby failing to normally control the display screen to turn on.
[0054] See also Figure 5 As shown, it is a software architecture diagram of the electronic device provided in the embodiment of the present application. The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. For example, the Android system is divided into four layers, from top to bottom, respectively, the application layer 101, the framework layer 102, the Android runtime (Androidruntime) and the system library 103, the hardware abstraction layer 104, the kernel layer 105, and the hardware layer 106.
[0055] The application layer 101 may include a series of application packages, such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, device control service and other applications.
[0056] The framework layer 102 provides an application programming interface (API) and a programming framework for the application programs of the application layer. The application framework layer includes some predefined functions. For example, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, etc.
[0057] Among them, the window manager is used to manage window programs. The window manager can obtain the size of the display screen, determine whether there is a status bar, lock the screen, capture the screen, etc. The content provider is used to store and obtain data and make the data accessible to the application. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc. The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, etc. The view system can be used to build applications. The display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying pictures. The phone manager is used to provide communication functions for electronic devices. For example, the management of call status (including connected, hung up, etc.). The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, etc. The notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify the completion of downloads, message reminders, etc. The notification manager can also be a notification that appears in the top status bar of the system in the form of an icon or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is prompted in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.
[0058] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system. The core library contains two parts: one is the function that the Java language needs to call, and the other is the Android core library.
[0059] The application layer 101 and the framework layer 102 run in a virtual machine. The virtual machine executes the Java files of the application layer and the framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0060] The system library 103 may include multiple functional modules, such as a surface manager, a media library, a 3D graphics processing library (eg, OpenGL ES), a 2D graphics engine (eg, SGL), and the like.
[0061] Among them, the surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications. The media library supports playback and recording of multiple commonly used audio and video formats, as well as static image files. The media library can support multiple audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc. The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing. The 2D graphics engine is a drawing engine for 2D drawing.
[0062] The hardware abstraction layer 104 runs in the user space, encapsulates the kernel layer driver, and provides a calling interface to the upper layer.
[0063] The kernel layer 105 is a layer between hardware and software and includes at least a display driver, a camera driver, an audio driver, and a sensor driver.
[0064] The kernel layer 105 is the core of the operating system of the electronic device. It is the first layer of software expansion based on hardware, provides the most basic functions of the operating system, is the basis of the operating system, is responsible for managing the system's processes, memory, device drivers, files and network systems, and determines the performance and stability of the system. For example, the kernel can determine the operating time of an application on a certain part of the hardware.
[0065] The kernel layer 105 includes programs closely related to the hardware, such as interrupt handlers, device drivers, etc., and also includes basic, common, and high-frequency modules, such as clock management modules, process scheduling modules, etc., and also includes key data structures. The kernel layer can be set in the processor or solidified in the internal memory.
[0066] The hardware layer 106 includes the hardware of the electronic device, such as a display screen, buttons, a camera, etc.
[0067] See also Figure 6 and Figure 7 , which is a schematic diagram of the interaction between various levels of the software architecture of an electronic device provided in one embodiment of the present application.
[0068] In one embodiment of the present application, the application layer 101 includes an AOD application 1011, the framework layer 102 includes an input management service (InputManagerSevice) 1021, a power management service (PowerManagerService, PMS) 1022, an AOD management service (HwAodManagerService) 1023, a display controller (TpController) 1024, a display management service 1025, and a layer synthesis service 1026, the kernel layer (or driver layer) 105 includes a display driver circuit 1051, and the hardware layer 106 includes a power button 1061 and a display screen 194.
[0069] S201, after the power button is pressed, a pressing signal is triggered and the pressing signal is sent to the input management service.
[0070] In one embodiment of the present application, when the power key is pressed by the user, a pressing signal may be generated and the pressing signal may be sent to the input management service. The key code of the power key is 26.
[0071] S202: The input management service generates an input event according to the press signal, and distributes the input event to the power management service.
[0072] In one embodiment of the present application, the input management service includes an event processing center module (EventHub), an input reading module (InputReader) and an input distribution module (InputDispatcher). The event processing center module is used to monitor input operations received by the hardware device of the electronic device. The input reading module is used to obtain input operations from the event processing center module, analyze and process the input operations, generate input events that can be recognized by the application or service, and facilitate the application or service to respond to the input events. The input distribution module is used to distribute input events to corresponding processing windows.
[0073] In one embodiment of the present application, the event processing center module receives a press signal triggered by pressing the power button, and the input reading module is used to obtain the press signal from the event processing center module, and analyze and process the press signal to generate an input event recognizable by the application or service, so that the application or service can respond to the input event. Specifically, the input reading module determines whether the display screen is currently in a screen-on state or a screen-off state. If the display screen is currently in a screen-on state, it determines that the input event corresponding to the press signal is to control the display screen to turn off. If the display screen is currently in an off state, it determines that the input event corresponding to the press signal is to control the display screen to turn on. The input distribution module is used to distribute the input event to the power management service, and control the display screen to turn off or on through the power management service.
[0074] S203, the power management service notifies the AOD management service to turn off or on the screen.
[0075] In one embodiment of the present application, if the input event is to control the display screen to turn off, the power management service calls the first interface to send a screen off notification instruction to the AOD management service to notify the AOD management service to turn off the screen. If the input event is to control the display screen to turn on, the power management service calls the interface to send a screen on notification to the AOD management service to notify the AOD management service to turn on the screen. For example, the first interface called is configTpInApMode(aodstate). If the input event is to control the display screen to turn off, aodstate is 101, that is, the first interface called is configTpInApMode(101); if the input event is to control the display screen to turn on, aodstate is 102, that is, the first interface called is configTpInApMode(102). The screen on notification is Notify aod screen on, and the screen off notification instruction is Notify aod screen off.
[0076] S204, the AOD management service constructs a display screen controller, and sends the display screen state to be switched to the display screen controller.
[0077] In one embodiment of the present application, the AOD management service calls the second interface to construct a display screen controller, and sends the display screen state to be switched to the display screen controller. For example, the second interface called may be tpContoller.configTpInApMode(aodstate). If the input event is to control the display screen to turn off, the display screen state aodstate to be switched is 101, that is, the second interface called is tpContoller.configTpInApMode(101); if the input event is to control the display screen to turn on, the display screen state aodstate to be switched is 102, that is, the second interface called is tpContoller.configTpInApMode(102).
[0078] S205: The display screen controller obtains the state of the display screen to be switched and suspends the current screen turning on and off process.
[0079] In one embodiment of the present application, the display screen controller obtains the state of the display screen to be switched according to the aodstate in the second interface tpContoller.configTpInApMode(aodstate), and calls the third interface to suspend the current screen on and off process. For example, the third interface is suspendIfNeed(aodstate). If aodstate is true, the third interface is called to suspend the current screen off process. If aodstate is false, the third interface is called to suspend the current screen on process. Continuing with the embodiment introduced in step S204, if aodstate is 101, the state of the display screen to be switched is off, and the third interface suspendIfNeed(true) can be called to suspend the current screen off process. If aodstate is 102, the state of the display screen to be switched is on, and the third interface suspendIfNeed(false) can be called to suspend the current screen on process.
[0080] In one embodiment of the present application, if the screen on and off process is executed normally, it is impossible to determine the CMD instruction for turning the screen off according to the available status of the AOD function and the fingerprint unlocking function, and to determine the CMD instruction for turning the screen on according to the CMD instruction for the last time the screen was turned off. Therefore, it is necessary to pause the screen on and off process, determine the available status of the AOD function and the fingerprint unlocking function, or determine the saved CMD instruction for the last time the screen was turned off.
[0081] S206: The display screen controller determines whether the AOD function and the fingerprint unlocking function are available.
[0082] In one embodiment of the present application, a control for controlling the on or off of the screen display and an option for the screen-off display mode are provided on the screen-off display setting interface, and the display screen controller determines whether the AOD function is available by obtaining the control state of the control and the screen-off display mode corresponding to the option. If the control state is on and the screen-off display mode option is all-day display, it is determined that the AOD function is available; if the control state is off or the screen-off display mode option is not all-day display, it is determined that the AOD function is not available.
[0083] In one embodiment of the present application, the display screen controller determines whether the electronic device has recorded a fingerprint, and obtains the control state of the control that controls the fingerprint unlocking on or off on the fingerprint unlocking setting interface to determine whether the fingerprint unlocking function is available. If the electronic device has recorded a fingerprint, and the control state that controls the fingerprint unlocking on or off is on, it is determined that the fingerprint unlocking function is available; if the electronic device has not recorded a fingerprint, or the control state that controls the fingerprint unlocking on or off is off, it is determined that the fingerprint unlocking function is not available. In one embodiment of the present application, it can be determined whether the electronic device has recorded a fingerprint by determining whether the electronic device stores fingerprint image data. If the electronic device stores fingerprint image data, it is determined that the electronic device has recorded a fingerprint; if the electronic device does not store fingerprint image data, it is determined that the electronic device has not recorded a fingerprint. Wherein, the fingerprint includes a front display fingerprint and / or a side fingerprint.
[0084] S207, the display controller sends a power-on command or a power-off command to the display driving circuit according to the judgment result of whether the AOD function and the fingerprint unlocking function are available and the current screen lighting and off process.
[0085] In one embodiment of the present application, if the AOD function or the fingerprint unlocking function is available, and the current screen-off process is a process, the fourth interface is called to generate a first power-off instruction, and the first power-off instruction is sent to the display driver circuit. If the AOD function or the fingerprint unlocking function is available, and the current screen-on process is a process, it is determined whether the display controller stores the power-off instruction when the screen was turned off last time. If the display controller stores the power-off instruction when the screen was turned off last time, and the power-off instruction when the screen was turned off last time was the first power-off instruction, the fourth interface is called to generate a first power-on instruction corresponding to the first power-off instruction, and the first power-on instruction is sent to the display driver circuit; if the display controller stores the power-off instruction when the screen was turned off last time, and the power-off instruction when the screen was turned off last time was the second power-off instruction, the fourth interface is called to generate a second power-on instruction corresponding to the second power-off instruction, and the second power-on instruction is sent to the display driver circuit.
[0086] In one embodiment of the present application, if both the AOD function and the fingerprint unlocking function are unavailable, and the current process is to turn off the screen, the fourth interface is called to generate a second power-off instruction, and the second power-off instruction is sent to the display driver circuit. If neither the AOD function nor the fingerprint unlocking function is available, and the current process is to turn on the screen, it is determined whether the display controller stores the power-off instruction when the screen was turned off last time. If the display controller stores the power-off instruction when the screen was turned off last time, and the power-off instruction when the screen was turned off last time was the first power-off instruction, the fourth interface is called to generate the first power-on instruction corresponding to the first power-off instruction, and the first power-on instruction is sent to the display driver circuit. If the display controller stores the power-off instruction when the screen was turned off last time, and the power-off instruction when the screen was turned off last time was the second power-off instruction, the fourth interface is called to generate the second power-on instruction corresponding to the second power-off instruction, and the second power-on instruction is sent to the display driver circuit.
[0087] In one embodiment of the present application, the first power-off instruction, the first power-off instruction, the second power-off instruction and the second power-on instruction are all CMD instructions, the fourth interface is sendCommandToTp(index), if the fourth interface is called to generate the first power-off instruction, the index of the CMD instruction is 21, if the fourth interface is called to generate the first power-on instruction corresponding to the first power-off instruction, the index of the CMD instruction is 22, if the fourth interface is called to generate the second power-off instruction, the index of the CMD instruction is 20, if the fourth interface is called to generate the second power-on instruction corresponding to the second power-off instruction, the index of the CMD instruction is 20. Among them, the fourth interface is the instruction sending interface for the power-on instruction and the power-off instruction.
[0088] That is to say, when the display screen is off, the power-off instruction is determined according to the available status of the AOD function and the fingerprint unlocking function, and the power-off instruction is sent to the display driving circuit, and the display screen is powered off by the display driving circuit, and the display screen controller saves the power-off instruction. Then, when the display screen is on, the power-on instruction corresponding to the saved power-off instruction is determined, and the power-on instruction is sent to the display driving circuit, and the display screen is powered on by the display driving circuit. If the display screen controller does not save the power-off instruction when the screen is off last time when the display screen is on, the power-on instruction can also be determined according to the available status of the AOD function and the fingerprint unlocking function.
[0089] S208, the display driving circuit responds to the power-on instruction or the power-off instruction to control the display screen to power on or off.
[0090] In one embodiment of the present application, if the display driving circuit receives the first power-off instruction or the second power-off instruction, the display screen is controlled to be powered off; if the display driving circuit receives the first power-on instruction or the second power-on instruction, the display screen is controlled to be powered on.
[0091] S209: After the display screen is powered off, the power management service sends an AOD view creation instruction to the AOD application.
[0092] In one embodiment of the present application, the power management service calls the screen saver control function to send the AOD view creation instruction to the AOD application. For example, the screen saver control function may be Dream Controller.
[0093] S210: The AOD application creates an AOD view.
[0094] S211: If the AOD view is created, the AOD application notifies the power management service that the AOD view has been created.
[0095] S212: The power management service sends a screen saver start instruction to the AOD application.
[0096] In one embodiment of the present application, the power management service calls the screen saver start function to send a screen saver start instruction to the AOD application. For example, the screen saver start function may be onDreaming Start.
[0097] S213, the AOD application sends a sleep instruction to the power management service.
[0098] In one embodiment of the present application, the AOD application may call a dozing start function to generate a dozing instruction, and send the dozing instruction to the power management service.
[0099] S214, the power management service responds to the sleep instruction and sends a state switching instruction to the layer synthesis service, wherein the state switching instruction instructs the power management service to control the display screen to enter the sleep state.
[0100] In one embodiment of the present application, the power management service responds to the sleep instruction by calling the state switching function notify screen state and sending the state switching instruction to the layer composition service, wherein the state switching instruction instructs the layer composition service to control the display screen to enter the sleep state.
[0101] S215, the layer synthesis service sends a power setting instruction to the display driving circuit.
[0102] In one embodiment of the present application, the layer composition service responds to the state switching instruction and sends a power setting instruction to the display driving circuit. For example, the layer composition service can call the power setting function set power mode and set the value of the power setting function set power mode to 1 to generate the power setting instruction.
[0103] S216, the display driving circuit responds to the power setting instruction and controls the display screen to enter a doze state.
[0104] In one embodiment of the present application, the display driving circuit sets the sleep state value to 1 and sends the sleep state value to the display screen, thereby controlling the display screen to enter the sleep state.
[0105] S217, the layer composition service sends a power setting instruction to the display management service.
[0106] In one embodiment of the present application, the power setting instruction further instructs the display management service to set the display screen state to a sleep state.
[0107] S218: The layer composition service returns the switching result of the sleep mode of the display screen to the power management service.
[0108] In one embodiment of the present application, the switching result of the sleep mode of the display screen can be represented by the finish return value. The layer synthesis service sets the finish return value to 1 and sends the finish return value to the power management service.
[0109] S219, the AOD application monitors the display screen status of the display management service, wherein the display screen status is a dormant state.
[0110] S220: If the display screen is in a dormant state, the AOD application sends the content and location of the AOD area to the power management service.
[0111] S221, the power management service sends the content and position of the AOD area to the display driving circuit.
[0112] S222, the display driving circuit drives the display screen to display the AOD area based on the content and position of the AOD area.
[0113] Based on the above embodiments, through the interaction of various levels in the underlying software architecture of the electronic device, it can be ensured that the power-on instruction can control the display screen to power on and accurately control the AOD area to display.
[0114] See also Figure 8 FIG. 1 is a flow chart of a display screen control method provided by an embodiment of the present application. The method is applied in an electronic device, and the display screen control method includes:
[0115] S301, responding to the screen-off instruction, determining whether the AOD function or fingerprint unlocking function of the electronic device is available. If the AOD function or fingerprint unlocking function of the electronic device is available, the process proceeds to S302; if neither the AOD function or fingerprint unlocking function of the electronic device is available, the process proceeds to S303.
[0116] In one embodiment of the present application, if an input event is detected after the power button of the electronic device is triggered when the screen is on, a screen-off instruction is generated. Wherein, if it is detected that the power button is pressed and then released, it is determined that the power button is triggered by the user, a corresponding input event is generated, and then the display screen is controlled to turn off in response to the input event. In another embodiment of the present application, when the electronic device does not generate any input event within a preset time, a screen-off instruction is generated. Wherein, the preset time can be the automatic screen lock time of the electronic device set by the user, for example, it can be 30 seconds, 1 minute or 2 minutes, and the embodiment of the present application is not limited to this. If the electronic device does not generate any input event within the preset time, it is determined that the electronic device has not received user operations (such as key operations, touch operations, etc.) for a long time. In order to reduce system power consumption and save electricity, a screen-off instruction is automatically generated to control the display screen to turn off.
[0117] In one embodiment of the present application, the display screen controller determines whether the AOD function is available by obtaining the state of the control for turning on or off the screen display and the option of the screen display mode on the screen display setting interface. If the state of the control for turning on or off the screen display is on and the option of the screen display mode is all-day display, it is determined that the AOD function is available; if the state of the control for turning on or off the screen display is off or the option of the screen display mode is not all-day display, it is determined that the AOD function is not available.
[0118] In one embodiment of the present application, the display screen controller determines whether the electronic device has recorded a fingerprint, and obtains the state of the control that controls the fingerprint unlocking on or off on the fingerprint unlocking setting interface to determine whether the fingerprint unlocking function is available. If the electronic device has recorded a fingerprint, and the state of the control that controls the fingerprint unlocking on or off is on, it is determined that the fingerprint unlocking function is available; if the electronic device has not recorded a fingerprint, or the state of the control that controls the fingerprint unlocking on or off is off, it is determined that the fingerprint unlocking function is not available. In one embodiment of the present application, it can be determined whether the electronic device has recorded a fingerprint by determining whether the electronic device stores fingerprint image data. If the electronic device stores fingerprint image data, it is determined that the electronic device has recorded a fingerprint; if the electronic device does not store fingerprint image data, it is determined that the electronic device has not recorded a fingerprint.
[0119] S302, generating a first power-off instruction, and sending the first power-off instruction to the display screen to control the display screen to power off.
[0120] In one embodiment of the present application, when the screen is off, if the AOD function or the fingerprint unlocking function is available, the display controller calls the fourth interface to generate a first power-off instruction, and sends the first power-off instruction to the display driving circuit, and controls the display screen to power off by responding to the first power-off instruction. Among them, the first power-off instruction is CMD 21, and CMD 21 is only used as an example of the first power-off instruction. In other embodiments, the first power-off instruction can also be set to other specific instructions according to requirements.
[0121] S303, in response to the screen light up instruction, generating a first power on instruction, and sending the first power on instruction to the display screen to control the display screen to power on, wherein the first power on instruction corresponds to the first power off instruction.
[0122] In one embodiment of the present application, if an input event is detected when the power button of the electronic device is triggered after the screen is turned off, a screen-lighting instruction is generated. Wherein, if it is detected that the power button is pressed and then released, it is determined that the power button is triggered by the user, a corresponding input event is generated, and then the display screen is controlled to light up in response to the input event. In another embodiment of the present application, if an input event is detected when the display screen of the electronic device is touched after the screen is turned off, a screen-lighting instruction is generated. Wherein, if a touch operation on the display screen is detected, a corresponding input event is generated, and then the display screen is controlled to light up in response to the input event. In another embodiment of the present application, if it is detected that the electronic device is lifted up when the screen is turned off, a screen-lighting instruction is generated. Wherein, if a touch operation on the electronic device is detected, a corresponding input event is generated, and then the display screen is controlled to light up in response to the input event.
[0123] In one embodiment of the present application, during the screen-on process, regardless of whether the AOD function and the fingerprint unlocking function are available or not, the display controller calls the fourth interface to generate a first power-on instruction corresponding to the first power-off instruction when the screen was turned off last time, and sends the first power-on instruction to the display driver circuit, which responds to the first power-on instruction and controls the display screen to power on. Among them, the first power-on instruction can be CMD 22, which is only an example of the first power-on instruction. In other embodiments, the first power-on instruction can also be set to other specific instructions as required.
[0124] S304: Generate a second power-off instruction, and send the second power-off instruction to the display screen to control the display screen to power off.
[0125] In one embodiment of the present application, when the screen is off, if both the AOD function and the fingerprint unlocking function are unavailable, the display controller calls the fourth interface to generate a second power-off instruction, and sends the second power-off instruction to the display driver circuit, and controls the display screen to power off by responding to the second power-off instruction. The second power-off instruction may be CMD 20, which is only an example of the second power-off instruction. In other embodiments, the second power-off instruction may also be set to other specific instructions as required.
[0126] S305, in response to the screen light instruction, generate a second power-on instruction, and send the second power-on instruction to the display screen to control the display screen to power on, wherein the second power-on instruction corresponds to the second power-off instruction.
[0127] In one embodiment of the present application, during the screen-on process, regardless of whether the AOD function and the fingerprint unlocking function are available or not, the display controller calls the fourth interface to generate a second power-on instruction corresponding to the second power-off instruction when the screen was turned off last time, and sends the second power-on instruction to the display driver circuit, which responds to the second power-on instruction and controls the display screen to power on. Among them, the first power-on instruction can be CMD 22, which is only an example of the first power-on instruction. In other embodiments, the first power-on instruction can also be set to other specific instructions as required.
[0128] See also Fig. 9 FIG. 1 is a flow chart of a display screen control method provided by another embodiment of the present application. The method is applied in an electronic device, and the display screen control method includes:
[0129] S401, when the electronic device receives a preset operation, it is determined whether the AOD function or fingerprint unlocking function of the electronic device is available. If the AOD function or fingerprint unlocking function of the electronic device is available, the process enters S402; if both the AOD function and the fingerprint unlocking function of the electronic device are not available, the process enters S405.
[0130] In one embodiment of the present application, the preset operation is an operation that needs to be performed when the user controls the electronic device to turn on or off the screen, for example, it can be an operation to trigger the power button of the electronic device. That is, when the electronic device receives the operation of triggering the power button, the electronic device responds to the operation of triggering the power button and controls the display screen to turn on or off. When controlling the display screen to turn on, a power-on command needs to be sent to control the display screen to power on, and when controlling the display screen to turn off, a power-off command needs to be sent to control the display screen to power off. The power-on command and the power-off command are generated according to the available status of the AOD function and the fingerprint unlocking function of the electronic device. Therefore, it is necessary to determine whether the AOD function or the fingerprint unlocking function of the electronic device is available, and determine the available status of the AOD function and the fingerprint unlocking function. Among them, the specific method for determining whether the AOD function or the fingerprint unlocking function of the electronic device is available is the same as the method for determining whether the AOD function or the fingerprint unlocking function of the electronic device is available in S301, and will not be repeated here.
[0131] S402, determine whether the electronic device is currently executing a screen-off process or a screen-on process. If the electronic device is currently executing a screen-off process, the process proceeds to S403; if the electronic device is currently executing a screen-on process, the process proceeds to S404.
[0132] In one embodiment of the present application, when the electronic device receives a preset operation, it determines whether the display screen is in a light-on state or an off-screen state. If the display screen is in a light-on state, the electronic device is currently executing a screen-off process. If the display screen is in an off-screen state, the electronic device is currently executing a screen-on process.
[0133] S403: Determine that the index value index of the power-off instruction is the index value of the first power-off instruction.
[0134] In an embodiment of the present application, the power-off instruction is a CMD instruction, and the CMD instruction includes instruction content and an index value, for example, CMD 21.
[0135] S404: Determine that the index value of the power-on instruction is the index value of the first power-on instruction.
[0136] In an embodiment of the present application, the power-on instruction is a CMD instruction, and the CMD instruction includes instruction content and an index value, for example, CMD 22.
[0137] S405: Determine that the index value of the power-on instruction or the power-off instruction is the index value of the second power-off instruction.
[0138] S406, determining whether the electronic device is currently executing a screen-off process or a screen-on process. If the electronic device is currently executing a screen-off process, the process proceeds to S407; if the electronic device is currently executing a screen-on process, the process proceeds to S409.
[0139] In one embodiment of the present application, after determining the index value of the power-on instruction or the power-off instruction, it is judged again whether the electronic device is currently executing a screen-off process or a screen-on process. This can ensure that when processing the screen-off process, a power-off instruction is sent to the display screen, and when processing the screen-on process, a power-on instruction is sent to the display screen.
[0140] S407: Determine the power-off instruction of the display screen as the first power-off instruction.
[0141] In one embodiment of the present application, the power-off instruction of the display screen is determined as the first power-off instruction by assigning the power-off instruction of the display screen offScreenCmd as the first power-off instruction.
[0142] S408, sending a first power-off instruction to the display driving circuit, and controlling the display screen to power off through the display driving circuit.
[0143] S409, determine whether the power-off instruction saved when the screen was turned off last time is the second power-off instruction. If the power-off instruction saved when the screen was turned off last time is the second power-off instruction, the process enters S410; if the power-off instruction saved when the screen was turned off last time is not the second power-off instruction, the process enters S412.
[0144] For example, in one embodiment of the present application, it is determined whether the index value of the power-off instruction saved when the screen was turned off last time is 20. If the index value of the power-off instruction saved when the screen was turned off last time is 20, it is determined that the power-off instruction saved when the screen was turned off last time is the second power-off instruction; if the index value of the power-off instruction saved when the screen was turned off last time is not 20, it is determined that the power-off instruction saved when the screen was turned off last time is not the second power-off instruction. 20 is only an exemplary description and is not limited to this in actual applications.
[0145] S410, determining that the index value of the power-on instruction is the index value of the second power-on instruction.
[0146] S411, sending a second power-on instruction to the display driving circuit, and controlling the display screen to power on through the display driving circuit.
[0147] S412, determine whether the power-off instruction saved when the screen was turned off last time is the first power-off instruction. If the power-off instruction saved when the screen was turned off last time is the first power-off instruction, the process enters S413; if the power-off instruction saved when the screen was turned off last time is not the first power-off instruction, the process returns to S401.
[0148] S413: Determine that the index value of the power-on instruction is the index value of the first power-on instruction.
[0149] S414, sending a first power-on instruction to a display driving circuit, and controlling the display screen to power on through the display driving circuit.
[0150] See also Fig.10 As shown, it is a schematic diagram of generating power-on instructions and power-off instructions according to the AOD function and the fingerprint unlocking function provided by another embodiment of the present application. Fig. 9 In the example, AOD+ indicates that the AOD function is available, AOD- indicates that the AOD function is unavailable, Finger+ indicates that the fingerprint unlocking function is available, and Finger- indicates that the fingerprint unlocking function is unavailable. According to the four situations of whether the AOD function and the fingerprint unlocking function are available, the corresponding power-off instructions and power-on instructions are generated. Specifically, when the screen is turned off, if both the AOD function and the fingerprint unlocking function are available, the power-off instruction is the first power-off instruction CMD 21. Under normal circumstances, when the screen is turned on, the AOD function and the fingerprint unlocking function are still available, and the power-on instruction is the first power-on instruction CMD 22 corresponding to the first power-off instruction CMD 21; in abnormal circumstances, the electronic device enters the power saving mode due to low power (for example, less than 10%). When the screen is turned on, the AOD function is changed to unavailable, and the fingerprint unlocking function is still available. The power-on instruction is the first power-on instruction CMD 22 corresponding to the first power-off instruction CMD 21. At this time, the first power-on instruction CMD 22 corresponds to the first power-off instruction CMD 21, and the display screen can be powered on normally.
[0151] When the screen is off, if the AOD function is available and the fingerprint unlocking function is unavailable, the power-off instruction is the first power-off instruction CMD21. Under normal circumstances, when the screen is turned on, the AOD function is still available, the fingerprint unlocking function is still unavailable, and the power-on instruction is the first power-on instruction CMD 22 corresponding to the first power-off instruction CMD 21; under abnormal circumstances, the electronic device enters the power saving mode due to low power. When the screen is turned on, the AOD function is changed to unavailable, the fingerprint unlocking function is still unavailable, and the power-on instruction is still the first power-on instruction CMD 22 corresponding to the first power-off instruction CMD 21. At this time, the first power-on instruction CMD 22 can control the display screen to power on.
[0152] When the screen is off, if the AOD function is unavailable and the fingerprint unlocking function is available, the power-off instruction is the first power-off instruction CMD21. Under normal circumstances, when the screen is turned on, the AOD function is still unavailable, the fingerprint unlocking function is still available, and the power-on instruction is the first power-on instruction CMD 22 corresponding to the first power-off instruction CMD 21; under abnormal circumstances, the electronic device exits the power saving mode due to increased power. When the screen is turned on, the AOD function is changed to available, the fingerprint unlocking function is still available, and the power-on instruction is the first power-on instruction CMD 22 corresponding to the first power-off instruction CMD 21. At this time, the first power-on instruction CMD 22 corresponds to the first power-off instruction CMD21, and the display screen can be powered on normally.
[0153] When the screen is off, if both the AOD function and the fingerprint unlocking function are unavailable, the power-off instruction is the second power-off instruction CMD20. Under normal circumstances, when the screen is turned on, the AOD function and the fingerprint unlocking function are still unavailable, and the power-on instruction is the second power-on instruction CMD 20 corresponding to the second power-off instruction CMD 20; under abnormal circumstances, the electronic device exits the power saving mode due to increased power, and when the screen is turned on, the AOD function becomes available, the fingerprint unlocking function is still unavailable, and the power-on instruction is still the second power-on instruction CMD 20, corresponding to the second power-off instruction CMD 20. At this time, the second power-on instruction CMD 20 can control the display screen to power on.
[0154] That is to say, after the display screen generates a power-off command to turn off the screen according to the current available status of the AOD function and the fingerprint unlocking function, regardless of whether the available status of the AOD function and the fingerprint unlocking function changes, when the display screen is on, a power-on command corresponding to the power-off command when the screen is turned off is generated, so that the display screen can be controlled to turn on normally.
[0155] See also Fig.11 FIG. 1 is a flow chart of a display screen control method provided by another embodiment of the present application. The method is applied in an electronic device, and the display screen control method includes:
[0156] S501, determine whether the AOD function or fingerprint unlocking function of the electronic device is available. If the AOD function or fingerprint unlocking function of the electronic device is available, the process enters S402; if both the AOD function and the fingerprint unlocking function of the electronic device are not available, the process enters S405.
[0157] S502, determine whether the electronic device is currently executing a screen-off process or a screen-on process. If the electronic device is currently executing a screen-off process, the process proceeds to S503; if the electronic device is currently executing a screen-on process, the process proceeds to S504.
[0158] S503: Determine that the index value of CMD is 20.
[0159] S504: Determine that the index value of CMD is CMD22.
[0160] S505: Determine that the index value of CMD is CMD21.
[0161] S506, determine whether the electronic device is currently executing a screen-off process or a screen-on process. If the electronic device is currently executing a screen-off process, the process proceeds to S407; if the electronic device is currently executing a screen-on process, the process proceeds to S409.
[0162] S507, changing the power-off instruction offScreenCmd of the display screen to CMD21.
[0163] S508, sending instructions to the display driving circuit.
[0164] S509, determine whether the power-off instruction offScreenCmd saved when the screen was turned off last time is CMD20. If the power-off instruction saved when the screen was turned off last time is CMD, the process enters S510; if the power-off instruction saved when the screen was turned off last time is not CMD20, the process enters S511.
[0165] S510, determine that the power-on instruction is CMD20, and then the process enters S508.
[0166] S512, determine whether the power-off instruction offScreenCmd saved when the screen was turned off last time is CMD21. If the power-off instruction saved when the screen was turned off last time is CMD21, the process enters S413.
[0167] S513, determine that the power-on instruction is CMD22, and then the process enters S508.
[0168] The present application also provides an electronic device 100. Fig.12As shown, the electronic device 100 can be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a wearable device, a vehicle-mounted device, a smart home device and / or a smart city device. The embodiments of the present application do not impose any special restrictions on the specific type of the electronic device 100.
[0169] The electronic device 100 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 speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a Subscriber Identification Module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0170] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0171] 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 processor (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), etc. Different processing units may be independent devices or integrated into one or more processors.
[0172] 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.
[0173] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0174] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an Inter-integrated Circuit (I2C) interface, an Inter-integrated Circuit Sound (I2S) interface, a Pulse Code Modulation (PCM) interface, a Universal Asynchronous Receiver / Transmitter (UART) interface, a Mobile Industry Processor Interface (MIPI), a General-Purpose Input / Output (GPIO) interface, a Subscriber Identity Module (SIM) interface, and / or a Universal Serial Bus (USB) interface, etc.
[0175] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface to realize the touch function of the electronic device 100.
[0176] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to achieve communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 via the I2S interface to achieve the function of answering a call through a Bluetooth headset.
[0177] The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface to realize the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
[0178] The UART interface is a universal serial data bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.
[0179] The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to realize the shooting function of the electronic device 100. The processor 110 and the display screen 194 communicate via the DSI interface to realize the display function of the electronic device 100.
[0180] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0181] The USB interface 130 is an interface that complies with the USB standard specification, and can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices 100, such as AR devices, etc.
[0182] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0183] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device 100 through the power management module 141.
[0184] 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, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.
[0185] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0186] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0187] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0188] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.
[0189] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0190] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include Global System For Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time-Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a Global Positioning System (GPS), a Global Navigation Satellite System (GLONASS), a Beidou Navigation Satellite System (BDS), a Quasi-Zenith Satellite System (QZSS) and / or a Satellite Based Augmentation System (SBAS).
[0191] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor that controls the display screen and connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0192] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, Microled, Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0193] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0194] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.
[0195] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal oxide semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0196] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0197] The video codec is used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 can play or record videos in multiple coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0198] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of the electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.
[0199] The internal memory 121 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM).
[0200] Random access memory may include static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM, for example, the fifth generation DDR SDRAM is generally referred to as DDR5 SDRAM), etc.;
[0201] Non-volatile memory may include disk storage devices and flash memory.
[0202] Flash memory can be divided into NOR FLASH, NAND FLASH, 3D NAND FLASH, etc. according to the operating principle. It can be divided into single-level cell (SLC), multi-level cell (MLC), triple-level cell (TLC), quad-level cell (QLC), etc. according to the storage unit potential level. It can be divided into universal flash storage (UFS), embedded Multi Media Card (eMMC), etc. according to the storage specification.
[0203] The random access memory can be directly read and written by the processor 110, and can be used to store executable programs (such as machine instructions) of the operating system or other running programs, and can also be used to store user and application data.
[0204] The non-volatile memory may also store executable programs and user and application data, etc., and may be loaded into the random access memory in advance for direct reading and writing by the processor 110 .
[0205] The external memory interface 120 can be used to connect to an external non-volatile memory to expand the storage capacity of the electronic device 100. The external non-volatile memory communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos are stored in the external non-volatile memory.
[0206] The internal memory 121 or the external memory interface 120 is used to store one or more computer programs. The one or more computer programs are configured to be executed by the processor 110. The one or more computer programs include multiple instructions. When the multiple instructions are executed by the processor 110, the screen display detection method executed on the electronic device 100 in the above embodiment can be implemented to implement the screen display detection function of the electronic device 100.
[0207] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0208] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.
[0209] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.
[0210] The receiver 170B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the human ear.
[0211] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to microphone 170C to input the sound signal into microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the sound source, realize directional recording function, etc.
[0212] The earphone interface 170D is used to connect a wired earphone and can be a USB interface 130 or a 3.5 mm Open Mobile Terminal Platform (OMTP) standard interface or a Cellular Telecommunications Industry Association of the USA (CTIA) standard interface.
[0213] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.
[0214] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
[0215] Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.
[0216] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100. The embodiment of the present application also provides a computer storage medium, in which computer instructions are stored. When the computer instructions are executed on the electronic device 100, the electronic device 100 executes the above-mentioned related method steps to implement the display screen control method in the above-mentioned embodiment.
[0217] The embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, the computer is caused to execute the above-mentioned related steps to implement the display screen control method in the above-mentioned embodiment.
[0218] 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 so that the chip executes the display screen control method in the above-mentioned method embodiments.
[0219] 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.
[0220] Through the description of the above implementation methods, technical personnel in the relevant field can clearly 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 assigned to 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.
[0221] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as 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.
[0222] The unit described as a separate component may or may not be physically separated, and the component shown as a unit may be one physical unit or multiple physical units, that is, it may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiment.
[0223] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0224] 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, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program code.
[0225] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present application and are not intended to limit it. Although the present application has been described in detail with reference to the preferred embodiments, a person of ordinary skill in the art should understand that the technical solution of the present application may be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present application.
Claims
1. A display screen control method, applied to an electronic device, characterized in that: The electronic device provides a screen-off display setting interface, the screen-off display setting interface includes a control for controlling the screen-off display to be turned on or off and an option for selecting a screen-off display mode, and the method includes: In response to the screen-off instruction, determining whether the AOD function or the fingerprint unlocking function of the electronic device is available, including: if the control state of the control on the screen-off display setting interface is turned on and the screen-off display mode corresponding to the option is all-day display, determining that the AOD function is available; if the electronic device has recorded a fingerprint, and the control state of the fingerprint control for controlling fingerprint unlocking on or off on the fingerprint unlocking setting interface is turned on, determining that the fingerprint unlocking function is available; If the AOD function or fingerprint unlocking function of the electronic device is available, generate a first power-off instruction, and send the first power-off instruction to the display screen of the electronic device to control the display screen to power off; in response to the screen-on instruction, generate a first power-on instruction, and send the first power-on instruction to the display screen to control the display screen to power on, wherein the first power-on instruction corresponds to the first power-off instruction; If the AOD function and the fingerprint unlocking function of the electronic device are both unavailable, a second power-off instruction is generated, and the second power-off instruction is sent to the display screen to control the display screen to power off; in response to the screen light up instruction, a second power-on instruction is generated, and the second power-on instruction is sent to the display screen to control the display screen to power on, wherein the second power-on instruction corresponds to the second power-off instruction.
2. The display screen control method according to claim 1, characterized in that: Determining whether the AOD function of the electronic device is available further includes: Obtaining the control state of the control on the off-screen display setting interface and the off-screen display mode corresponding to the option; If the control state is closed or the screen-off display mode corresponding to the option is not displayed all day, it is determined that the AOD function is unavailable.
3. The display screen control method according to claim 1, characterized in that: Determining whether the fingerprint unlocking function of the electronic device is available also includes: Determine whether the electronic device has recorded a fingerprint, and obtain the control state of the fingerprint control on the fingerprint unlocking setting interface that controls fingerprint unlocking to be turned on or off; If the electronic device has not recorded a fingerprint, or the control state of the fingerprint control is closed, it is determined that the fingerprint unlocking function is not available.
4. The display screen control method according to claim 1, characterized in that: The first power-off instruction, the first power-on instruction, the second power-off instruction, and the second power-on instruction are all preset CMD instructions, and the preset CMD instruction includes instruction content and an index value.
5. The display screen control method according to claim 1, characterized in that: The generating of the first power-off instruction comprises: If the AOD function or fingerprint unlocking function of the electronic device is available, the instruction sending interface is called to generate the first power-off instruction.
6. The display screen control method according to claim 5, characterized in that: The generating of the first power-on instruction comprises: The first power-off instruction saved when the screen was turned off last time is obtained, and the instruction sending interface is called to generate a first power-on instruction corresponding to the first power-off instruction.
7. The display screen control method according to claim 1, characterized in that: Generating the second power-off instruction comprises: If the AOD function and the fingerprint unlocking function of the electronic device are both unavailable, the instruction sending interface is called to generate the second power-off instruction.
8. The display screen control method according to claim 7, characterized in that: Generating the second power-on instruction comprises: The second power-off instruction saved when the screen was turned off last time is obtained, and the instruction sending interface is called to generate a second power-on instruction corresponding to the second power-off instruction.
9. The display screen control method according to claim 1, characterized in that: The method further comprises: If an input event of triggering the power button of the electronic device occurs when the display screen is on, or the electronic device does not generate any input event within a preset time, the screen-off instruction is generated.
10. The display screen control method according to claim 9, characterized in that: The method further comprises: If an input event occurs when the display screen is off, such as the power button of the electronic device is triggered, the electronic device is lifted, or the display screen is touched, the screen-on instruction is generated.
11. An electronic device, characterized in that: The electronic device comprises a memory and a processor: Wherein, the memory is used to store program instructions; The processor is used to read and execute the program instructions stored in the memory. When the program instructions are executed by the processor, the electronic device executes the display screen control method according to any one of claims 1 to 10.
12. A chip coupled to a memory in an electronic device, characterized in that: The chip is used to control the electronic device to execute the display screen control method according to any one of claims 1 to 10.
13. A computer storage medium, characterized in that: The computer storage medium stores program instructions, and when the program instructions are executed on an electronic device, the electronic device executes the display screen control method according to any one of claims 1 to 10.
