Screen-off display method and terminal device

By first drawing the first view of the black foreground in the terminal device's landscape mode, and then adjusting the layout and drawing the second view of the empty foreground, the flickering problem when the screen is displayed in landscape mode is solved and the user experience is improved.

CN117707659BActive Publication Date: 2024-10-01HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310834500.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-07
Publication Date
2024-10-01
Estimated Expiration
2043-07-07

AI Technical Summary

Technical Problem

The terminal device may flicker when the screen is switched from on to off in landscape mode, resulting in a poor user experience.

Method used

After detecting the screen-off signal, the terminal device first draws the first view with a black foreground, and after adjusting the window layout parameters, draws the second view with an empty foreground to avoid displaying a horizontal screen-free display interface, thus solving the flicker problem. .

Benefits of technology

This effectively avoids the flicker phenomenon when the terminal device displays the screen in landscape mode, improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117707659B_ABST
    Figure CN117707659B_ABST
Patent Text Reader

Abstract

The present application provides a screen-off display method and terminal device, which are helpful to avoid the flickering phenomenon when the terminal device displays the screen-off display interface in the horizontal screen mode, and improve the user experience. The method includes: detecting a screen-off signal, switching the screen state of the terminal device from the screen-on state to the screen-off state; when the screen-off display is required and the current screen direction of the terminal device is the horizontal screen direction, drawing a first view based on a first window layout parameter, the foreground color of the first view is black, and the first window layout parameter is related to the current screen direction; switching the screen state of the terminal device from the screen-off state to the screen-off display state, and displaying the first view; adjusting the first window layout parameter to the second window layout parameter, and drawing the second view based on the second window layout parameter, the foreground color of the second view is empty, and the second window layout parameter is related to the vertical screen direction; displaying the second view.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and in particular to a screen-off display method and a terminal device. Background Art

[0002] With the development of terminal devices, most terminal devices support the always on display (AOD) function in the standby state, which can also be called "off-screen display". When the always on display function is turned on, after the terminal device turns off the screen, the preset off-screen display information can be displayed on the screen of the terminal device, and the interface displaying the off-screen display information can be called the off-screen display interface. The off-screen display information can include information such as time, power, personalized patterns, and notifications.

[0003] At present, most terminal devices support the screen rotation function. For example, when the screen switches from portrait to landscape, the terminal device needs to switch the portrait display interface to the landscape display interface. In one possible scenario, the terminal device is in the awake state and displays the landscape display interface. In response to the user pressing the power button, the terminal device enters the standby state and displays the screen-off display interface.

[0004] However, the terminal device may first display a frame of the horizontal screen off display interface, and then display the vertical screen off display interface, resulting in an abnormal display scene in the terminal device, that is, flickering occurs when displaying the screen off display interface, resulting in a poor user experience. Summary of the invention

[0005] The present application provides a screen-off display method and a terminal device, which is helpful in avoiding the flickering phenomenon when the terminal device displays the screen-off display interface in the horizontal screen mode, thereby improving the user experience.

[0006] In a first aspect, a screen-off display method is provided, which is applied to a terminal device, and the method includes: detecting a screen-off signal, switching the screen state of the terminal device from a screen-on state to a screen-off state; when screen-off display is required and the current screen orientation of the terminal device is a horizontal orientation, drawing a first view based on a first window layout parameter, the foreground color of the first view is black, and the first window layout parameter is related to the current screen orientation; switching the screen state of the terminal device from a screen-off state to a screen-off display state, and displaying the first view; adjusting the first window layout parameter to a second window layout parameter, and drawing a second view based on the second window layout parameter, the foreground color of the second view is empty, and the second window layout parameter is related to the vertical orientation; and displaying the second view.

[0007] The embodiment of the present application provides a method for displaying a screen off, which switches the screen state of a terminal device from a screen on state to a screen off state after detecting a screen off signal; when the screen off display is required and the current screen direction of the terminal device is a horizontal screen direction, based on a first window layout parameter, draws a first view, the foreground color of the first view is black, and the first window layout parameter is related to the current screen direction; switches the screen state of the terminal device from a screen off state to a screen off display state, and displays the first view; adjusts the first window layout parameter to a second window layout parameter, and draws and displays a second view based on the second window layout parameter, the foreground color of the second view is empty, and the second window layout parameter is related to the vertical screen direction. In this way, the terminal device first displays the first view with a black foreground color so that the user cannot see the horizontal screen off display interface, and after the window layout parameter is adjusted, draws and displays the second view with an empty foreground color based on the adjusted window, which can avoid displaying the horizontal screen off display interface when the terminal device has started to draw the view based on the horizontal screen layout parameter, and the vertical screen layout parameter has not been adjusted, thereby avoiding the abnormal display scene of a flashing screen, thereby improving the user experience.

[0008] Specifically, the terminal device detects the screen-off signal in response to the user pressing the power button. The terminal device detects the screen-off signal in response to the user pressing the power button. The terminal device detects the screen-off signal in response to the user pressing the power button. The terminal device detects the screen-off signal in response to the user pressing the power button. The terminal device detects the screen-off signal in response to the user pressing the power button.

[0009] It should be understood that after the screen state of the terminal device is switched from the screen-on state to the screen-off state, the display screen of the terminal device is turned off.

[0010] Specifically, the first window layout parameter may be the window direction of the current screen. Alternatively, the first window layout parameter may also be the width and height of the window of the current screen. The second window layout parameter may be the width and height of the window in the vertical screen direction, or the second window layout parameter may also be the vertical screen window direction.

[0011] Specifically, there are the following possible implementations for adjusting the first window layout parameters to the second window layout parameters.

[0012] In a possible implementation, the first window layout parameter is the width and height of the window on the current screen, and the second window layout parameter is the width and height of the window in the portrait orientation. The first window layout parameter is adjusted to the second window layout parameter by taking the height of the window in the portrait orientation as the width of the adjusted window and taking the width of the window in the portrait orientation as the height of the adjusted window to obtain the adjusted window layout parameter, i.e., the second window layout parameter. For example, the width of the first window layout parameter is 2 and the height is 1, and the width of the adjusted window layout parameter is 1 and the height is 2, i.e., the width of the second window layout parameter is 1 and the height is 2.

[0013] In another possible implementation, the first window layout parameter is the window direction of the current screen, and the second window layout parameter is the vertical screen window direction. The first window layout parameter is adjusted to the second window layout parameter as follows: the window direction is adjusted from the horizontal screen direction to the vertical screen direction. For example, the window direction of the first window layout parameter is the horizontal screen direction, and the adjusted window direction is the vertical screen direction, that is, the window direction in the second window layout parameter is the vertical screen direction.

[0014] Specifically, the process of drawing the first view may be: first drawing the background layer of the first view, then drawing the layer corresponding to the screen-off display element, and finally drawing the black foreground color layer.

[0015] It should be understood that the layer corresponding to the screen-off display style may include multiple subviews. When drawing each of the multiple subviews, it is necessary to measure the width and height of each subview and draw the corresponding subview according to the width and height of each subview.

[0016] Optionally, the foreground color is black, which means that the color of the foreground color layer is black, and the color value code of each pixel of the foreground color layer can be set to (0, 0, 0), or the color value code of each pixel of the foreground color layer can be set to #000000 according to a hexadecimal color table.

[0017] Optionally, the foreground color of the second view being empty may be setting the foreground color layer to an empty value (for example, null) when drawing the second view, or not drawing the foreground color layer when drawing the second view. The implementation method of drawing the second view by the terminal device may be as follows:

[0018] In a possible implementation, the terminal device first draws the background layer of the first view, then draws the layer corresponding to the screen-off display element, and finally draws the empty foreground color layer.

[0019] In another possible implementation, the terminal device first draws the background layer of the first view, and finally draws the layer corresponding to the screen-off display element.

[0020] In combination with the first aspect, in certain implementations of the first aspect, the screen state of the terminal device is switched from a screen-on state to a screen-off state, including: the battery management service module sends a first screen state switching request to the layer synthesis service module, the first screen state switching request is used to request that the screen state of the terminal device be switched from a screen-on state to a screen-off state; the layer synthesis service module sends the first screen state switching request to the display framework module and the display driver respectively; the display framework module and the display driver respectively switch the screen state of the terminal device from a screen-on state to a screen-off state; when the battery management service module monitors that the screen state in the display framework module has been switched to the screen-off state, the battery management service module sends a power-off request to the display driver; the display driver executes a power-off operation of the display screen based on the power-off request.

[0021] In combination with the first aspect, in some implementations of the first aspect, drawing a first view based on the first window layout parameters includes: the battery management service module calls up the off-screen display service through the off-screen display application; the off-screen display application passes the second window layout parameters to the window management service module; the window management service module passes a first drawing request to the off-screen display application, the first drawing request carrying the first window layout parameters; the off-screen display application draws the first view based on the first window layout parameters; adjusting the first window layout parameters to second window layout parameters includes: the window management service module adjusts the first window layout parameters to second window layout parameters; drawing the second view based on the second window layout parameters includes: the window management service module passes a second drawing request to the off-screen display application, the second drawing request carrying the second window layout parameters; the off-screen display application draws the second view based on the second window layout parameters.

[0022] In combination with the first aspect, in some implementations of the first aspect, before drawing the first view, the method further includes: the screen off display application determines that the current screen orientation of the terminal device is a horizontal orientation based on the width and height of the window.

[0023] It should be understood that the width and height of the window are the width and height of the window on the current screen. When the width is greater than the height, the current screen orientation of the terminal device is determined to be horizontal. When the width is less than the height, the current screen orientation of the terminal device is determined to be vertical.

[0024] The screen direction is determined by the width and height of the window. Compared with collecting and reporting gravity data through sensors, the screen direction is determined based on gravity data. The screen direction is calculated more quickly and helps reduce power consumption.

[0025] In combination with the first aspect, in certain implementations of the first aspect, the screen state of the terminal device is switched from a screen off state to a screen off display state, including: the battery management service module sends a second screen state switching request to the layer synthesis service module, the second screen state switching request is used to request to switch the screen state of the terminal device from the screen off state to the screen off display state; the layer synthesis service module sends the second screen state switching request to the display framework module and the display driver respectively; the display framework module and the display driver respectively switch the screen state of the terminal device from the screen off state to the screen off display state; when the screen off display application monitors that the screen state in the display framework module has been switched to the screen off display state, the screen off display application transmits a backlight down instruction to the battery management service module; the battery management service module sends a power-on request to the display driver in response to the backlight down instruction; the display driver performs a power-on operation on the display screen based on the power-on request.

[0026] In combination with the first aspect, in certain implementations of the first aspect, the battery management service module sends a power-on request to the display driver in response to a backlight down instruction, including: the battery management service module repeatedly sends a power-on request to the display driver multiple times without receiving a power-on success notification from the display driver until a power-on success notification is received.

[0027] By repeatedly sending power-on requests to the display driver module, it is helpful to avoid the problem of power-on failure caused by the screen state switching of the display framework module being successful but the screen state of the display driver being not successfully switched, which in turn leads to the inability to display the screen off display interface, thereby improving the stability of the terminal device screen display.

[0028] In combination with the first aspect, in certain implementations of the first aspect, the above method also includes: the battery management service module determines whether the number of repeated sending of the power-on request is equal to a preset upper limit value; repeatedly sending the power-on request to the display driver, including: when the number of repeated sending of the power-on request is less than the preset upper limit value, the battery management service module repeatedly sends the power-on request.

[0029] It should be understood that if the number of repeated transmissions of the power-on request is greater than the preset upper limit and the power-on still fails, the battery management service module reports a power-on anomaly. The power-on anomaly can be obtained through the code log.

[0030] By setting a preset upper limit value, the problem that the power-on process enters an infinite loop when the display driver fails to power on due to other faults can be solved.

[0031] In combination with the first aspect, in certain implementation methods of the first aspect, the screen state of the terminal device is switched from a screen-on state to a screen-off state, including: setting the screen state parameters to a first gear, the screen state parameters including a screen refresh frequency and a screen brightness, the screen refresh frequency corresponding to the first gear is a first frequency, and the screen brightness corresponding to the first gear is a first brightness.

[0032] It should be understood that the screen state is different, and the screen state parameter corresponds to different gears. The first frequency is 0, and the first brightness is 0.

[0033] Optionally, the screen state parameter of the bright screen state may be a third gear, the screen refresh frequency corresponding to the third gear is a third frequency, the screen brightness corresponding to the third gear is between the first brightness and the third brightness, and the third frequency is greater than the first frequency.

[0034] In combination with the first aspect, in certain implementations of the first aspect, the screen state of the terminal device is switched from a screen-off state to a screen-off display state, including: setting the screen state parameters to a second gear, the screen state parameters including a screen refresh frequency and a screen brightness, the screen refresh frequency corresponding to the second gear being a second frequency, and the screen brightness corresponding to the second gear being between the first brightness and the second brightness.

[0035] It should be understood that the second frequency is greater than the first frequency and less than the third frequency, and the second brightness is greater than the first brightness and less than the third brightness.

[0036] In combination with the first aspect, in some implementations of the first aspect, the method further includes: when a screen-off display switch of the terminal device is turned on, determining that the screen-off display needs to be performed.

[0037] Specifically, turning on the screen-off display switch means that the user has set the screen-off display to be turned on in the screen-off display application so that the screen-off display interface is displayed after the terminal device turns off the screen.

[0038] In combination with the first aspect, in certain implementations of the first aspect, determining that the screen needs to be displayed off includes: when the screen display switch of the terminal device is turned on and the terminal device meets a first preset condition, determining that the screen needs to be displayed off, the first preset condition including at least one of the following: the battery level of the terminal device is greater than a preset value; or the terminal device does not detect proximity light.

[0039] Case 1: When the screen-off display switch of the terminal device is turned on and the battery level of the terminal device is greater than a preset value, it is determined that the screen-off display is required.

[0040] Case 2: When the screen-off display switch of the terminal device is turned on and the terminal device does not detect approaching light, it is determined that the screen-off display needs to be performed.

[0041] Case 3: When the screen-off display switch of the terminal device is turned on, the battery level of the terminal device is greater than a preset value, and the terminal device does not detect approaching light, it is determined that the screen-off display is required.

[0042] Optionally, not detecting the approaching light means that the light sensor of the terminal device does not detect the light source. When the display screen interface of the terminal device is blocked, the light sensor of the terminal device cannot detect the light. For example, the display screen interface of the terminal device is placed facing the desktop. For another example, the terminal device is placed in a pocket.

[0043] By setting the conditions of low power or no proximity light detected, the terminal device can turn off the screen when the user does not need to view the screen-off display interface, thereby reducing power consumption and reducing battery consumption.

[0044] In combination with the first aspect, in certain implementations of the first aspect, drawing a first view includes: drawing the first view when the screen needs to be displayed off, the current screen orientation of the terminal device is a horizontal orientation, and the terminal device meets a second preset condition, and the second preset condition includes any one of the following: the display screen is a non-folding screen; or, the display screen is an external display screen of the terminal device, and the folding screen is in a fully folded state.

[0045] It should be understood that the above-mentioned fully folded state means that the inner display screen of the folding screen is in a fully fitted state.

[0046] In a possible implementation, the terminal device is folded in a horizontal manner. The horizontal folding may be understood as folding along the long axis of the terminal device, or may be understood as folding the terminal device left to right.

[0047] In combination with the first aspect, in certain implementations of the first aspect, the screen-off signal is generated based on the user pressing the power button; or, the screen-off signal is generated based on the terminal device not detecting a user operation within a preset time.

[0048] In a second aspect, a terminal device is provided, which is used to execute the method in any possible implementation of the first aspect. Specifically, the terminal device includes a module for executing the method in any possible implementation of the first aspect.

[0049] In one design, the terminal device may include a module that executes the methods / operations / steps / actions described in the first aspect above, and the module may be a hardware circuit, software, or a combination of hardware circuit and software.

[0050] In a third aspect, a terminal device is provided, comprising: a processor and a memory, wherein the processor is used to read instructions stored in the memory to execute the method in any possible implementation of the first aspect.

[0051] Optionally, there are one or more processors and one or more memories.

[0052] Optionally, the memory may be integrated with the processor, or the memory may be provided separately from the processor.

[0053] In the specific implementation process, the memory can be a non-transitory memory, such as a read-only memory (ROM), which can be integrated with the processor on the same chip or can be set on different chips respectively. The embodiments of the present application do not limit the type of memory and the setting method of the memory and the processor.

[0054] The terminal device in the third aspect mentioned above can be a chip, and the processor can be implemented by hardware or by software. When implemented by hardware, the processor can be a logic circuit, an integrated circuit, etc.; when implemented by software, the processor can be a general-purpose processor, which is implemented by reading the software code stored in the memory. The memory can be integrated in the processor or can be located outside the processor and exist independently.

[0055] In a fourth aspect, a computer program product is provided, the computer program product comprising: a computer program (also referred to as code, or instruction), which, when executed, enables a computer to execute a method in any possible implementation of the first aspect.

[0056] In a fifth aspect, a computer-readable storage medium is provided, which stores a computer program (also referred to as code, or instructions) which, when executed on a computer, enables the computer to execute a method in any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] Figure 1 is a schematic diagram of the structure of a terminal device according to an embodiment of the present application;

[0058] Figure 2 is a software structure block diagram of a terminal device in an embodiment of the present application;

[0059] Figure 3 It is a diagram of the interface changes when the mobile phone is in horizontal mode and the screen is off;

[0060] Figure 4 This is another interface change diagram of a mobile phone in horizontal mode with the screen off;

[0061] Figure 5 is a schematic flow chart of a screen-off display method provided in an embodiment of the present application;

[0062] Figure 6 is a schematic flow chart of another screen-off display method provided in an embodiment of the present application;

[0063] Figure 7 It is a schematic diagram of switching between four screen states of the terminal device;

[0064] Figure 8 is a schematic flow chart of a screen-off display method provided in an embodiment of the present application;

[0065] Fig. 9 It is a schematic block diagram of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0066] The technical solution in this application will be described below in conjunction with the accompanying drawings.

[0067] In order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish the same or similar items with substantially the same functions and effects. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit the difference.

[0068] It should be noted that, in this application, words such as "exemplarily" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplarily" or "for example" in this application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplarily" or "for example" is intended to present related concepts in a specific way.

[0069] In addition, "at least one" means one or more, and "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can mean: a, or b, or c, or a and b, or a and c, or b and c, or a, b and c, where a, b, c can be single or multiple.

[0070] In the embodiments of the present application, descriptions such as "when...", "in the case of...", "if" and "if" all mean that the device will make corresponding processing under certain objective circumstances. It does not limit the time, nor does it require the device to have a judgment action when implementing it, nor does it mean that there are other limitations.

[0071] In order to better understand the terminal device in the embodiment of the present application, Figure 1 The hardware structure of the terminal device in the embodiment of the present application is described in detail.

[0072] Figure 1 This is a schematic diagram of the structure of the terminal device 100 provided in the embodiment of the present application. Figure 1 As shown, the terminal 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.

[0073] It is understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the terminal device 100. In other embodiments of the present application, the terminal device 100 may include more or fewer components than shown in the figure, or combine some components, or split 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.

[0074] 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.

[0075] 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.

[0076] 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.

[0077] 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.

[0078] 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, thereby realizing the touch function of the terminal device 100.

[0079] 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.

[0080] 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.

[0081] 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.

[0082] 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 implement the shooting function of the terminal device 100. The processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the terminal device 100.

[0083] 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.

[0084] The USB interface 130 is an interface that complies with the USB standard specification, and specifically 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 terminal device 100, and can also be used to transmit data between the terminal device 100 and peripheral devices. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other terminal devices, such as AR devices, etc.

[0085] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the terminal device 100. In other embodiments of the present application, the terminal device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0086] 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 terminal device 100. While the charging management module 140 is charging the battery 142, it may also power the terminal device through the power management module 141.

[0087] 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.

[0088] The wireless communication function of the terminal 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.

[0089] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in terminal 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.

[0090] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the terminal 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.

[0091] 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.

[0092] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the terminal 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.

[0093] In some embodiments, the antenna 1 of the terminal 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 terminal 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).

[0094] The terminal device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which 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, which execute program instructions to generate or change display information.

[0095] 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 terminal device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0096] The terminal device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0097] 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.

[0098] 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 terminal device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0099] 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 terminal device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0100] Video codecs are used to compress or decompress digital videos. The terminal device 100 may support one or more video codecs. Thus, the terminal device 100 may play or record videos in various coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0101] 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 terminal device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0102] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the terminal device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.

[0103] The internal memory 121 can be used to store computer executable program codes, which include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the terminal device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the terminal device 100 by running instructions stored in the internal memory 121 and / or instructions stored in a memory provided in the processor.

[0104] The terminal 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.

[0105] 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.

[0106] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The terminal device 100 can listen to music or listen to a hands-free call through the speaker 170A.

[0107] The receiver 170B, also called a "handset", is used to convert audio electrical signals into sound signals. When the terminal device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the ear.

[0108] 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 the microphone 170C to input the sound signal into the microphone 170C. The terminal device 100 can be provided with at least one microphone 170C. In other embodiments, the terminal 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 terminal device 100 can also be provided with three, four or more microphones 170C to realize the collection of sound signals, noise reduction, identification of sound sources, realization of directional recording function, etc.

[0109] 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.

[0110] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The terminal device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the terminal device 100 detects the touch operation intensity according to the pressure sensor 180A. The terminal device 100 can also calculate the touch position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.

[0111] The gyroscope sensor 180B can be used to determine the motion posture of the terminal device 100. In some embodiments, the angular velocity of the terminal device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the terminal device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the terminal device 100 through reverse movement to achieve anti-shake. The gyroscope sensor 180B can also be used for navigation and somatosensory game scenes.

[0112] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the terminal device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.

[0113] The magnetic sensor 180D includes a Hall sensor. The terminal device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip leather case. In some embodiments, when the terminal device 100 is a flip phone, the terminal device 100 can detect the opening and closing of the flip cover according to the magnetic sensor 180D. Then, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, the flip cover automatic unlocking and other features are set.

[0114] The acceleration sensor 180E can detect the magnitude of the acceleration of the terminal device 100 in various directions (generally three axes). When the terminal device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the terminal device and applied to applications such as horizontal and vertical screen switching and pedometers.

[0115] The distance sensor 180F is used to measure the distance. The terminal device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the terminal device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.

[0116] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The terminal device 100 emits infrared light outward through the light emitting diode. The terminal device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the terminal device 100. When insufficient reflected light is detected, the terminal device 100 can determine that there is no object near the terminal device 100. The terminal device 100 can use the proximity light sensor 180G to detect that the user holds the terminal device 100 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode, and pocket mode automatically unlocks and locks the screen.

[0117] The ambient light sensor 180L is used to sense the ambient light brightness. The terminal device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the terminal device 100 is in a pocket to prevent accidental touch.

[0118] The fingerprint sensor 180H is used to collect fingerprints. The terminal device 100 can use the collected fingerprint characteristics to achieve fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.

[0119] The temperature sensor 180J is used to detect temperature. In some embodiments, the terminal device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the terminal device 100 reduces the performance of the processor located near the temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the terminal device 100 heats the battery 142 to avoid abnormal shutdown of the terminal device 100 due to low temperature. In other embodiments, when the temperature is lower than another threshold, the terminal device 100 performs a boost on the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.

[0120] The touch sensor 180K is also called a "touch control device". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch control screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the terminal device 100, which is different from the position of the display screen 194.

[0121] The bone conduction sensor 180M can obtain a vibration signal. In some embodiments, the bone conduction sensor 180M can obtain a vibration signal of a vibrating bone block of the vocal part of the human body. The bone conduction sensor 180M can also contact the human pulse to receive a blood pressure beat signal. In some embodiments, the bone conduction sensor 180M can also be set in an earphone and combined into a bone conduction earphone. The audio module 170 can parse out a voice signal based on the vibration signal of the vibrating bone block of the vocal part obtained by the bone conduction sensor 180M to realize a voice function. The application processor can parse the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M to realize a heart rate detection function.

[0122] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The terminal device 100 may receive key input and generate key signal input related to user settings and function control of the terminal device 100.

[0123] 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.

[0124] Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.

[0125] The SIM card interface 195 is used to connect the SIM card. The SIM card can be connected to and separated from the terminal device 100 by inserting the SIM card interface 195 or pulling it out from the SIM card interface 195. The terminal 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 card, Micro SIM card, SIM card, etc. 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 terminal device 100 interacts with the network through the SIM card to realize functions such as calls and data communications. In some embodiments, the terminal device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the terminal device 100 and cannot be separated from the terminal device 100. The software system of the terminal device 100 can adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Android system with a layered architecture as an example to illustrate the software structure of the terminal device 100.

[0126] Figure 2 This is a software structure block diagram of the terminal device 100 according to an embodiment of the present application.

[0127] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom, namely, the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.

[0128] The application layer can include a series of application packages. Figure 2 As shown, the application package may include applications such as camera, calendar, map, phone, music, settings, mailbox, and screen-off display.

[0129] The application framework layer provides application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions. Figure 2 As shown, the application framework layer may include a content provider, a view system, a phone manager, a resource manager, a notification manager, an input management service, a window management service, a display framework module, a battery management service, a layer synthesis service, and the like.

[0130] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0131] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A 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 images.

[0132] The phone manager is used to provide communication functions of the terminal device 100, such as management of call status (including connection, disconnection, etc.).

[0133] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0134] The notification manager enables applications to display notification information in the status bar. It 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 download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications 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 displayed in the status bar, a prompt sound is emitted, the terminal device vibrates, the indicator light flashes, etc.

[0135] The input management service module is used to obtain and transmit various input information of the user. For example, after the user presses the power button, the input management service can receive the pressing data reported by the kernel layer.

[0136] The window management service module can be used to obtain, parse, and adjust the view layout parameters transmitted from the application layer.

[0137] The display framework module can be used to save the display state of the screen. Exemplarily, the state of the screen is updated from the screen-off state to the screen-off state.

[0138] The battery management service module can be used to determine whether to call up the application layer service, monitor the screen status, and request the kernel layer to power on based on the pressing data transmitted by the input management service.

[0139] The layer composition service module can be used to forward screen state switching requests.

[0140] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.

[0141] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.

[0142] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application 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.

[0143] The system library may include multiple functional modules, such as surface manager, media libraries, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

[0144] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.

[0145] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0146] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis and layer processing.

[0147] A 2D graphics engine is a drawing engine for 2D drawings.

[0148] The kernel layer is a layer between hardware and software. The kernel layer is used to drive the hardware to make the hardware work. The kernel layer at least includes display driver, screen driver, graphics processing unit (GPU) driver, camera, and sensor driver, etc., which are not limited in the embodiments of the present application. For example, the screen driver can drive the screen to turn on or off.

[0149] With the development of terminal devices, most terminal devices support the always on display (AOD) function in the standby state, which can also be called "off-screen display". When the always on display function is turned on, after the terminal device turns off the screen, the preset off-screen display information can be displayed on the screen of the terminal device, and the interface displaying the off-screen display information can be called the off-screen display interface. The off-screen display information can include information such as time, power, personalized patterns, and notifications.

[0150] At present, most terminal devices support the screen rotation function. For example, when the screen switches from portrait to landscape, the terminal device needs to switch the portrait display interface to the landscape display interface. In one possible scenario, the terminal device is in the awake state and displays the landscape display interface. In response to the user pressing the power button, the terminal device enters the standby state and displays the screen-off display interface.

[0151] However, since the window management service module in the terminal device adjusts the layout parameters, and the window management service module in the terminal device triggers the screen-off display application in the terminal device to draw the view, it is possible that the screen-off display application in the terminal device has started to draw the view after being triggered, while the layout parameters of the window management service module in the terminal device have not been adjusted. In this way, the terminal device will first display a horizontal screen-off display interface, and then display the vertical screen-off display interface, resulting in an abnormal display scene in the terminal device, that is, a flickering phenomenon occurs when displaying the screen-off display interface, resulting in a poor user experience.

[0152] The following introduces the display interface of the above-mentioned related technology by taking a mobile phone as an example of a terminal device.

[0153] For example, Figure 3 The figure shows a change in the screen display interface of a mobile phone in the horizontal mode. Figure 3 In the interface a shown in the figure, the interface displays multiple application icons, that is, the interface is in the awake state. The user presses the power button of the mobile phone, and the mobile phone responds to the user's pressing operation. The interface first displays Figure 3 Interface b shown, then the interface flashes Figure 3 After the interface c shown, it will be displayed Figure 3 The interface d is shown. Figure 3 The interface b shown is a screen-off interface, which does not display any content. Figure 3 In the interface c shown, the time information "11:34 May 29 Monday April 11 Guimao Year" is displayed in the middle of the interface, and the battery icon and battery power information "50%" are displayed below the time information. The direction of the time information, battery icon, and battery power information is adapted to the horizontal screen direction of the mobile phone, that is, displayed in the horizontal screen. Figure 3 In the interface d shown, the time information "11:34 May 29 Monday April 11 Guimao Year" is displayed in the middle of the interface, and the battery icon and battery power information "50%" are displayed below the time information. The direction of the time information, battery icon, and battery power information is adapted to the vertical screen direction of the mobile phone, that is, displayed in vertical screen.

[0154] Above Figure 3 Both interface c and interface d are screen-off display interfaces. That is, when the mobile phone displays the screen-off display interface in the horizontal screen state, interface c will flash, that is, a screen flashing phenomenon occurs, and the user experience is poor.

[0155] To this end, the embodiment of the present application provides a method and terminal device for displaying a screen off. When the screen off display is required and the current screen orientation of the terminal device is the landscape orientation, by drawing and displaying a first view with a foreground color of black, if the terminal device completes the layout parameter adjustment only after the window management service module triggers the drawing of the screen off display application, the terminal device can first display the first view, that is, the user cannot see the horizontal screen off display interface. After the window management service module completes the adjustment of the layout parameters, the second view (the view corresponding to the screen off display interface, the foreground color of the second view is empty) is drawn and displayed based on the adjusted window. In this way, when the screen off display application in the terminal device has started to draw the view after being triggered, and the layout parameters of the window management service module in the terminal device have not been adjusted, the horizontal screen off display interface can be avoided from being displayed, thereby causing an abnormal display scene of a flashing screen, thereby improving the user experience.

[0156] Below, taking the terminal device as a mobile phone as an example, the interface change diagram of the screen-off display method provided in the embodiment of the present application is described.

[0157] Figure 4 Another mobile phone in landscape mode displays a screen-off interface change diagram. Figure 4 In the interface a shown in the figure, the interface displays multiple application icons, that is, the interface is in the awake state. The user presses the power button of the mobile phone, and the mobile phone responds to the user's pressing operation. The interface first displays Figure 4 After the interface b, the transition from interface b to Figure 4 Interface c. Figure 4 Interface b does not display any content. Figure 4 In the interface c shown, the time information "11:34 May 29 Monday April 11 Guimao Year" is displayed in the middle of the interface, and the battery icon and battery power information "50%" are displayed below the time information. The direction of the time information, battery icon, and battery power information is adapted to the vertical screen direction of the mobile phone, that is, displayed in the vertical screen.

[0158] When the terminal device is in landscape mode, in response to the user pressing the power button, the screen off display interface is displayed. The interface changes from screen on to screen off and then to the screen off display interface. This avoids the screen flashing when the terminal device enters the screen off display interface in landscape mode, thereby improving the user experience.

[0159] The following specific embodiments are used to describe in detail the technical solution of the present application and how the technical solution of the present application solves the above technical problems. The following specific embodiments can be implemented independently or in combination with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0160] Figure 5 is a schematic flow chart of a method 500 for displaying a screen off provided in an embodiment of the present application. The hardware structure of the terminal device involved in the method 500 can be as follows: Figure 1 As shown, the software structure can be as follows Figure 2 shown.

[0161] S501, the terminal device detects a screen-off signal and switches the screen state of the terminal device from a screen-on state to a screen-off state.

[0162] Specifically, the terminal device detects the screen-off signal in response to the user pressing the power button. The terminal device detects the screen-off signal in response to the user pressing the power button. The terminal device detects the screen-off signal in response to the user pressing the power button. The terminal device detects the screen-off signal in response to the user pressing the power button. The terminal device detects the screen-off signal in response to the user pressing the power button.

[0163] It should be understood that after the screen state of the terminal device is switched from the screen-on state to the screen-off state, the display screen of the terminal device is turned off.

[0164] Optionally, the screen state is different, and the screen state parameter corresponds to different gears. The terminal device sets the screen state parameter to a first gear, the screen state parameter includes a screen refresh frequency and a screen brightness, the screen refresh frequency corresponding to the first gear is a first frequency, and the screen brightness corresponding to the first gear is a first brightness.

[0165] It should be understood that the first frequency is 0 and the first brightness is 0.

[0166] Optionally, the screen state parameter of the bright screen state may be a third gear, the screen refresh frequency corresponding to the third gear is a third frequency, the screen brightness corresponding to the third gear is between the first brightness and the third brightness, and the third frequency is greater than the first frequency.

[0167] In a possible implementation, the terminal device detects a screen-off signal in response to a user pressing a power button. Figure 1 The screen state can be switched from the on screen state to the off screen state by Figure 2 The display framework module and display driver in the display switch from the screen-on state to the screen-off state.

[0168] S502: When the screen needs to be off and the current screen orientation of the terminal device is horizontal, a first view is drawn based on a first window layout parameter, and the foreground color of the first view is black.

[0169] It should be understood that the current screen orientation may be the screen orientation of the terminal device after the terminal device is placed horizontally, and in this placement mode, the window orientation of the screen is the horizontal screen orientation.

[0170] Specifically, the first window layout parameter is related to the current screen direction. The first window layout parameter may be the window direction of the current screen. Alternatively, the first window layout parameter may also be the width and height of the window of the current screen.

[0171] Specifically, the process of drawing the first view may be: first drawing the background layer of the first view, then drawing the layer corresponding to the screen-off display element, and finally drawing the black foreground color layer.

[0172] It should be understood that the layer corresponding to the screen-off display style may include multiple subviews. When drawing each of the multiple subviews, it is necessary to measure the width and height of each subview and draw the corresponding subview according to the width and height of each subview.

[0173] Optionally, the foreground color is black, which means that the color of the foreground color layer is black, and the color value code of each pixel of the foreground color layer can be set to (0, 0, 0), or the color value code of each pixel of the foreground color layer can be set to #000000 according to a hexadecimal color table.

[0174] S503, switching the screen state of the terminal device from the screen-off state to the screen-off display state, and displaying the first view.

[0175] Optionally, the terminal device sets the screen status parameters to a second gear, the screen status parameters including screen refresh frequency and screen brightness, the screen refresh frequency corresponding to the second gear is the second frequency, and the screen brightness corresponding to the second gear is between the first brightness and the second brightness.

[0176] It should be understood that the second frequency is greater than the first frequency and less than the third frequency, and the second brightness is greater than the first brightness and less than the third brightness.

[0177] S504, the terminal device adjusts the first window layout parameter to the second window layout parameter, and draws the second view based on the second window layout parameter, the foreground color of the second view is empty, and the second window layout parameter is related to the vertical screen direction.

[0178] Specifically, the second window layout parameter may be the width and height of the window in the vertical screen direction, or the second window layout parameter may also be the vertical screen window direction.

[0179] Optionally, there are the following possible implementations for adjusting the first window layout parameters to the second window layout parameters.

[0180] In a possible implementation, the first window layout parameter is the width and height of the window on the current screen, and the second window layout parameter is the width and height of the window in the portrait orientation. The first window layout parameter is adjusted to the second window layout parameter by taking the height of the window in the portrait orientation as the width of the adjusted window and taking the width of the window in the portrait orientation as the height of the adjusted window to obtain the adjusted window layout parameter, i.e., the second window layout parameter. For example, the width of the first window layout parameter is 2 and the height is 1, and the width of the adjusted window layout parameter is 1 and the height is 2, i.e., the width of the second window layout parameter is 1 and the height is 2.

[0181] In another possible implementation, the first window layout parameter is the window direction of the current screen, and the second window layout parameter is the vertical screen window direction. The first window layout parameter is adjusted to the second window layout parameter as follows: the window direction is adjusted from the horizontal screen direction to the vertical screen direction. For example, the window direction of the first window layout parameter is the horizontal screen direction, and the adjusted window direction is the vertical screen direction, that is, the window direction in the second window layout parameter is the vertical screen direction.

[0182] Optionally, the foreground color of the second view being empty may be setting the foreground color layer to an empty value (for example, null) when drawing the second view, or not drawing the foreground color layer when drawing the second view. The implementation method of drawing the second view by the terminal device may be as follows:

[0183] In a possible implementation, the terminal device first draws the background layer of the first view, then draws the layer corresponding to the screen-off display element, and finally draws the empty foreground color layer.

[0184] In another possible implementation, the terminal device first draws the background layer of the first view, and finally draws the layer corresponding to the screen-off display element.

[0185] S505: Display the second view.

[0186] In the embodiment of the present application, the terminal device starts drawing the view before adjusting the window layout parameters. The window layout parameters acquired by the terminal device before drawing are the first window layout parameters (i.e., the window layout parameters when the screen direction is the horizontal screen direction). The terminal device can draw the first view based on the first window layout parameters. In addition, the terminal device adjusts the first window layout parameters to the second window layout parameters and draws the second view.

[0187] In the above method 500, S502 includes a process of drawing a first view, and S504 includes a process of adjusting parameters and drawing a second view. The terminal device may execute S502 and S504 simultaneously, and the terminal device may first execute S502 and then execute S504, which is not limited in this application.

[0188] In the implementation of the embodiment of the present application, the terminal device first completes the drawing of the first view and then completes the drawing of the second view. After the view drawing is completed, the terminal device will trigger the display screen to power on and display the corresponding interface. When the terminal device is powered on, if the second view has not been drawn, the terminal device will first display the first view and then the second view. At this time, method 500 can be executed in the order of S501 to S505, or S502 and S504 can be executed simultaneously. The display interface change order of the terminal device is: screen light interface-screen off interface-first view interface-second view interface.

[0189] In another possible implementation, the terminal device first completes the drawing of the first view and then completes the drawing of the second view. After the view drawing is completed, the terminal device triggers the display screen to power on and display the corresponding interface. When the terminal device is powered on, if the second view has been drawn, the terminal device does not display the first view, but directly displays the second view. In this case, after the terminal device completes S504, it then executes the screen state switching in S503, but does not display the first view, but directly displays the second view. The display interface change order of the terminal device is: screen on interface-screen off interface-second view interface.

[0190] In another possible implementation, the terminal device does not execute S502, nor does it execute the display of the first view in S503. That is, after the terminal device completes S501, it then executes S504. After completing S504, it then executes the screen state switch in S503, but does not display the first view, and then executes S505. That is, the terminal device starts to draw the view after adjusting the window layout parameters. Before drawing, the window layout parameters obtained by the terminal device are the second window layout parameters (i.e., the window layout parameters in the vertical screen direction). The terminal device can draw the second view based on the second window layout parameters. After the second view is drawn, the screen state is switched from the screen-off state to the screen-off display state, and the display screen is triggered to power on to display the second view. The display interface of the terminal device changes in the following order: screen-on interface-screen-off interface-second view interface.

[0191] The embodiment of the present application provides a method for displaying a screen off, which switches the screen state of a terminal device from a screen on state to a screen off state after detecting a screen off signal; when the screen off display is required and the current screen direction of the terminal device is a horizontal screen direction, based on a first window layout parameter, draws a first view, the foreground color of the first view is black, and the first window layout parameter is related to the current screen direction; switches the screen state of the terminal device from a screen off state to a screen off display state, and displays the first view; adjusts the first window layout parameter to a second window layout parameter, and draws and displays a second view based on the second window layout parameter, the foreground color of the second view is empty, and the second window layout parameter is related to the vertical screen display direction. In this way, the terminal device first displays the first view with a black foreground color so that the user cannot see the horizontal screen off display interface, and after the window layout parameter is adjusted, draws and displays the second view with an empty foreground color based on the adjusted window, which can avoid displaying the horizontal screen off display interface when the terminal device has started to draw the view based on the horizontal screen layout parameter, but the vertical screen layout parameter has not been adjusted, thereby avoiding the abnormal display scene of a flashing screen, thereby improving the user experience.

[0192] As an optional embodiment, the battery management service module sends a first screen state switching request to the layer synthesis service module, and the first screen state switching request is used to request to switch the screen state of the terminal device from the on-screen state to the off-screen state; the layer synthesis service module sends the first screen state switching request to the display framework module and the display driver respectively; the display framework module and the display driver respectively switch the screen state of the terminal device from the on-screen state to the off-screen state; when the battery management service module monitors that the screen state in the display framework module has been switched to the off-screen state, the battery management service module sends a power-off request to the display driver; based on the power-off request, the display driver executes the power-off operation of the display screen.

[0193] As an optional embodiment, the battery management service module invokes the off-screen display service through the off-screen display application; the off-screen display application passes the second window layout parameters to the window management service module; the window management service module passes a first drawing request to the off-screen display application, the first drawing request carrying the first window layout parameters; the off-screen display application draws the first view based on the first window layout parameters; the window management service module adjusts the first window layout parameters to second window layout parameters; the window management service module passes a second drawing request to the off-screen display application, the second drawing request carrying the second window layout parameters; the off-screen display application draws the second view based on the second window layout parameters.

[0194] As an optional embodiment, before drawing the first view, the method further includes: the screen-off display application determines that the current screen orientation of the terminal device is a horizontal orientation based on the width and height of the window.

[0195] It should be understood that the width and height of the window are the width and height of the window on the current screen. When the width is greater than the height, the current screen orientation of the terminal device is determined to be horizontal. When the width is less than the height, the current screen orientation of the terminal device is determined to be vertical.

[0196] The screen direction is determined by the width and height of the window. Compared with collecting and reporting gravity data through sensors, the screen direction is determined based on gravity data. The screen direction is calculated more quickly and helps reduce power consumption.

[0197] As an optional embodiment, the battery management service module sends a second screen state switching request to the layer synthesis service module, and the second screen state switching request is used to request to switch the screen state of the terminal device from the screen off state to the screen off display state; the layer synthesis service module sends the second screen state switching request to the display framework module and the display driver respectively; the display framework module and the display driver respectively switch the screen state of the terminal device from the screen off state to the screen off display state; when the screen off display application monitors that the screen state in the display framework module has been switched to the screen off display state, it transmits a backlight down instruction to the battery management service module; the battery management service module responds to the backlight down instruction and sends a power-on request to the display driver; the display driver performs a power-on operation on the display screen based on the power-on request.

[0198] As an optional embodiment, when the battery management service module does not receive a power-on success notification from the display driver, the battery management service module repeatedly sends a power-on request to the display driver until a power-on success notification is received.

[0199] By repeatedly sending power-on requests to the display driver module, it is helpful to avoid the problem of power-on failure caused by the screen state switching of the display framework module being successful but the screen state of the display driver being not successfully switched, which in turn leads to the inability to display the screen off display interface, thereby improving the stability of the terminal device screen display.

[0200] As an optional embodiment, the above method also includes: the battery management service module determines whether the number of repeated sending of the power-on request is equal to the preset upper limit value; when the number of repeated sending of the power-on request is less than the preset upper limit value, the battery management service module repeatedly sends the power-on request.

[0201] It should be understood that if the number of repeated transmissions of the power-on request is greater than the preset upper limit and the power-on still fails, the battery management service module reports a power-on anomaly. The power-on anomaly can be obtained through the code log.

[0202] By setting a preset upper limit value, the problem that the power-on process enters an infinite loop when the display driver fails to power on due to other faults can be solved.

[0203] As an optional embodiment, the above method also includes: when a screen-off display switch of the terminal device is turned on, determining that the screen-off display needs to be performed.

[0204] Specifically, turning on the screen-off display switch means that the user has set the screen-off display to be turned on in the screen-off display application so that the screen-off display interface is displayed after the terminal device turns off the screen.

[0205] As an optional embodiment, when the screen off display switch of the terminal device is turned on and the terminal device meets a first preset condition, it is determined that the screen off display is required, and the first preset condition includes at least one of the following: the battery level of the terminal device is greater than a preset value; or the terminal device does not detect proximity light.

[0206] Specifically, when the terminal device meets the first preset condition, it is determined that the screen needs to be off display, including the following three situations.

[0207] Case 1: When the screen-off display switch of the terminal device is turned on and the battery level of the terminal device is greater than a preset value, it is determined that the screen-off display is required.

[0208] Case 2: When the screen-off display switch of the terminal device is turned on and the terminal device does not detect approaching light, it is determined that the screen-off display needs to be performed.

[0209] Case 3: When the screen-off display switch of the terminal device is turned on, the battery level of the terminal device is greater than a preset value, and the terminal device does not detect approaching light, it is determined that the screen-off display is required.

[0210] Optionally, not detecting the approaching light means that the light sensor of the terminal device does not detect the light source. When the display screen interface of the terminal device is blocked, the light sensor of the terminal device cannot detect the light. For example, the display screen interface of the terminal device is placed facing the desktop. For another example, the terminal device is placed in a pocket.

[0211] By setting the conditions of low power or no proximity light detected, the terminal device can turn off the screen when the user does not need to view the screen-off display interface, thereby reducing power consumption and reducing battery consumption.

[0212] As an optional embodiment, when the screen needs to be displayed off, the current screen orientation of the terminal device is horizontal, and the terminal device meets a second preset condition, a first view is drawn, and the second preset condition includes any one of the following: the display screen is a non-folding screen; or, the display screen is an external display screen of the terminal device, and the folding screen is in a fully folded state.

[0213] It should be understood that the above-mentioned fully folded state means that the inner display screen of the folding screen is in a fully fitted state.

[0214] In a possible implementation, the terminal device is folded in a horizontal manner. The horizontal folding may be understood as folding along the long axis of the terminal device, or may be understood as folding the terminal device left to right.

[0215] Figure 6 6 is a schematic flow chart of another method 600 for displaying a screen off provided in an embodiment of the present application. The hardware structure of the terminal device involved in the method 600 can be as follows: Figure 1 As shown, the software structure can be as follows Figure 2 shown.

[0216] S601, the terminal device determines whether the display screen is in the unfolded state of the folding screen.

[0217] Specifically, when the terminal device detects a screen-off signal and the terminal device needs to display the screen off, the terminal device determines whether the display screen is in the unfolded state of the folding screen.

[0218] If the display screen is not in the unfolded state of the folding screen, execute S602. Otherwise, execute S604.

[0219] S602: The terminal device determines whether the width of the window is greater than the height.

[0220] Specifically, the window is a window of the current screen, and the window may also be called a canvas.

[0221] If the width of the canvas is greater than its height, execute S603. Otherwise, execute S604.

[0222] S603: The terminal device draws a first view, and the foreground color of the first view is black.

[0223] Specifically, the process of drawing the first view may be: first drawing the background layer of the first view, then drawing the layer corresponding to the screen-off display element, and finally drawing the black foreground color layer.

[0224] Optionally, the foreground color is black, which means that the color of the foreground color layer is black, and the color value code of each pixel of the foreground color layer can be set to (0, 0, 0), or the color value code of each pixel of the foreground color layer can be set to #000000 according to a hexadecimal color table.

[0225] S604: The terminal device draws a second view, and the foreground color of the second view is empty.

[0226] Optionally, the foreground color of the second view being empty may be that the foreground color layer is set to an empty value (for example, null) when drawing the second view, or the foreground color layer is not drawn when drawing the second view.

[0227] Figure 7It is a schematic diagram of switching between the four screen states of the terminal device. When the AOD function is turned on in the terminal device, the display screen of the terminal device includes four states, namely: screen on state (can be referred to as on state), screen off state (can be referred to as off state), screen off display state (can be referred to as doze state), and screen off display pause state (can be referred to as doze_suppend state). The above-mentioned abbreviations such as on state, off state, doze state, doze_suppend state are only exemplary, and this application does not limit the abbreviations of the four screen states.

[0228] When the display screen is in the on state, the display screen is powered on, and the user can see the picture displayed on the display screen. When the display screen is in the off state, the display screen is not powered on. When the display screen is in the doze state, the display screen is partially powered on, the screen displays the screen-off display interface, and the AP is in an active state. For example, in this state, when the screen-off display interface includes an animation style, the animation can be played normally. When the display screen is in the doze_suppend state, the screen is partially powered on, the screen displays the screen-off display interface, and the AP is in a dormant state. For example, in this state, when the screen-off display interface includes an animation style, the interface displays a still frame of the animation.

[0229] The switching between different states includes the following four situations.

[0230] Case 1: The screen status of the terminal device is on.

[0231] When AOD is not turned on, the terminal device detects that no user operation is received within a preset time or the terminal device detects that the user presses the power button, and the terminal device controls the screen state to switch to the off state.

[0232] Case 2: The screen status of the terminal device is off.

[0233] The terminal device detects that the user presses the power button, and the terminal device controls the screen state to switch to the on state. When AOD is turned on, in one possible scenario, the terminal device detects that the user touches the screen, and the terminal device controls the screen state to switch to the doze state. In another possible scenario, the terminal device detects that no user operation is received within a preset time or the terminal device detects that the user presses the power button, and the terminal device controls the screen state to switch to the doze state.

[0234] Case 3: The screen state of the terminal device is in doze state.

[0235] The terminal device detects that the user double-clicks the screen, or the terminal device detects that the user presses the power button, and the terminal device controls the screen state to switch to the on state. In one possible scenario, the user has not set the AOD mode to the all-day mode, and the terminal device does not continue to display the screen-off display interface after displaying the screen-off display interface for a preset time, and the terminal device controls the screen state to switch to the off state. In another possible scenario, the terminal device detects that the user has turned on the AOD all-day mode, and the terminal device does not display the animation in the screen-off display interface after displaying the screen-off display interface for a preset time (if the screen-off display interface does not include animation, the screen-off display interface does not change), and the terminal device controls the screen state to switch to the doze_suppend state.

[0236] Case 4: The screen state of the terminal device is in the doze_suppend state.

[0237] The terminal device detects that the user presses the power button, and the terminal device controls the screen state to switch to the on state. The terminal device detects that the user touches the screen, or detects that the user moves the phone, or the AOD display information is updated, and the terminal device controls the screen state to switch to the doze state.

[0238] Below, taking the example of the terminal device displaying the screen-off display interface after the user presses the power button of the terminal device, the internal interaction process of the terminal device is described in detail.

[0239] Figure 8 800 is a schematic flow chart of a method 800 for displaying a screen off provided in an embodiment of the present application. The hardware structure of the terminal device involved in the method 800 can be as follows: Figure 2 As shown, the software structure can be as follows Figure 3 shown.

[0240] S801, in response to a user pressing a power button, the kernel layer transmits pressing data corresponding to the pressing operation to an input management service module, and correspondingly, the input management service module obtains the pressing data.

[0241] It should be understood that the power key sending the pressing data to the input management service module through the kernel layer can also be referred to as the power key reporting the pressing event to the input management service module through the kernel layer.

[0242] Specifically, the above-mentioned pressing data may include a key identifier and a key type of the power key. The key identifier may be a key ID or a key name. The key type may include a short press type and a long press type.

[0243] It should also be understood that the buttons on the terminal device include other buttons besides the power button, such as a volume up button and a volume down button. Different buttons correspond to different button identification information.

[0244] Optionally, the action corresponding to the pressing operation is: pressing the key first and then lifting it, and the corresponding state bit change information is: pressing first and then lifting it. When the time interval from pressing to lifting the state bit of the key is less than or equal to a preset threshold, the key type is determined to be a short press type. When the time interval from pressing to lifting the state bit of the key is greater than a preset threshold, the key type is determined to be a long press type.

[0245] For example, the key identifier of the power key may be "ID=26". The time interval from pressing to lifting the state bit of the power key is 150ms, and the preset threshold is 200ms. 150ms is less than the preset threshold of 200ms. The power key determines that the key type is a short press type.

[0246] S802: The input management service module transmits the pressing data to the battery management service module. Correspondingly, the battery management service module obtains the pressing data.

[0247] S803, based on the pressing data and the screen status, the battery management service module determines whether the screen status needs to be switched to the off state.

[0248] Optionally, before the pressing operation, the screen state may include four states: screen on state, screen off state, screen off display state, and screen off display pause. The pressing data may include two types: a long press of the power button and a short press of the power button. The battery management service module determines which state the screen state switches to based on the pressing data and the screen state, including the following situations.

[0249] Case 1: When the screen is in any of the following states: on, off, off, and paused, and the pressing data is a long press of the power button, the battery management service module determines that the terminal device is about to be shut down, and the display screen displays a shutdown selection interface, which includes a restart or shutdown selection button for the user to make a selection.

[0250] Case 2: When the screen state is any of the following states: screen off state, screen off display state, and screen off display pause state, and the pressing data is a short press type of the power button, the battery management service module determines that the screen state needs to be switched to the screen on state.

[0251] Case 3: When the screen state is on and the pressing data is a short press type of the power button, the battery management service module determines that the screen state needs to be switched to off.

[0252] That is, in the above situation 3, the battery management service module determines that the screen state needs to be switched to the off state, and in the above situation 1 or situation 2, the battery management service module determines that the screen state does not need to be switched to the off state.

[0253] S804, when the battery management service module determines that the screen state needs to be switched to the screen-off state, the battery management service module transmits a first screen state switching request to the layer synthesis service module, and correspondingly, the layer synthesis service module obtains the first screen state switching request.

[0254] It should be understood that the first screen state switching request is used to switch the screen state from the screen-on state to the screen-off state.

[0255] After S804, the layer composition service module executes S805 and S806 simultaneously.

[0256] S805: The layer composition service module transmits a first screen state switching request to the display framework module. Correspondingly, the display framework module obtains the first screen state switching request.

[0257] S806: The layer composition service module transmits a first screen state switching request to the display driver module. Correspondingly, the display driver module obtains the first screen state switching request.

[0258] S807 is executed after S805, and S808 is executed after S806.

[0259] S807, the display framework module updates the screen state saved in the display framework module to a screen-off state.

[0260] S808, the display driver module updates the screen state saved in the display driver to a screen-off state.

[0261] Optionally, the display driver module may update the screen state to a screen-off state by adjusting the screen refresh rate and the maximum screen brightness value.

[0262] It should be understood that different screen states correspond to different screen refresh rates and maximum screen brightness values.

[0263] S809, the battery management service module monitors whether the screen state saved by the display framework module has been updated to the screen-off state.

[0264] S810: When the screen status saved in the display framework module has been updated to the screen-off status, the battery management service module requests the display driver module to power off.

[0265] S811, the display driver module performs a power-off operation.

[0266] S812, based on the pressing data and the screen status change, the battery management service module determines whether it is necessary to activate the screen off display service.

[0267] It should be understood that the screen state change refers to the screen switching from one of the above four states to another state within a preset time. For example, the screen switches from the on state to the off state within 200ms.

[0268] Optionally, when the pressing data is a short press type of the power button and the screen state switches from the on screen state to the off screen state within a preset time, the battery management service module determines that the off screen display service needs to be activated. Otherwise, the battery management service module determines that the off screen display service does not need to be activated.

[0269] S813: When the battery management service module determines that the screen off display needs to be activated, the battery management service module activates the service of the screen off display application.

[0270] It should be understood that invoking the service of the off-screen display application can enable the off-screen display application to execute subsequent steps related to the off-screen display.

[0271] Exemplarily, the battery management service module invokes the service of the screen-off display application through the DreamController class.

[0272] Optionally, S814, the screen off display application determines whether the screen off display can be executed.

[0273] Optionally, when the screen-off display function is turned on, the screen-off display application can be configured not to perform the screen-off display under a preset condition. The preset condition can be any one of the following conditions: the battery level of the terminal device is lower than a preset value and the terminal device detects approaching light. If the preset condition is met, the screen-off display application determines to perform the screen-off display. If the preset condition is not met, the screen-off display application determines not to perform the screen-off display.

[0274] For example, when the power of the terminal device is less than 10%, the screen-off display application determines to execute the screen-off display. For another example, when the screen of the terminal device is blocked, the screen-off display application determines not to execute the screen-off display.

[0275] Optionally, S815, the screen off display application determines whether the screen state is the folding screen unfolded state.

[0276] Specifically, the terminal device may include a straight terminal device and a foldable terminal device. The folding screen unfolded state refers to the screen form of the foldable terminal device being in a non-fully folded state. When the display screen is a display screen of a straight terminal device, or the display screen is an external display screen of a foldable terminal device in a fully folded state, it is determined that the screen form of the display screen of the terminal device is not in a folding screen unfolded state.

[0277] Exemplarily, the terminal device is a mobile phone, and the mobile phone includes a straight-screen phone and a folding-screen phone. When the screen is a display screen of a straight-screen phone, or when the screen is an external display screen of a folding-screen phone in a fully folded state, it is determined that the screen state is not in the unfolded state of the folding screen.

[0278] S816, when the screen state is not the unfolded state of the folding screen, the screen off display application passes the screen off display view and the default window layout parameters to the window management service module, and the screen direction parameter in the default window layout parameters is the first parameter, and the first parameter indicates that the screen direction is the vertical direction.

[0279] It should be understood that the screen-off display view includes at least one subview. For example, the at least one subview may be one or more of a date field subview, an animation subview, a background subview, and the like.

[0280] It should also be understood that the screen direction parameter in the default window layout parameter is set by the developer and is used by the terminal device to display the screen off display interface based on the screen direction parameter in the default window layout parameter. The terminal device displays the vertical screen off display interface based on the screen direction parameter in the default window layout parameter.

[0281] Optionally, the default window layout parameters may include the size of the window, the layout mode of the window (whether full screen layout), and whether the window can respond to touch signals, etc. For example, the size of the window can be the same as the screen size, the layout of the window can be a full screen layout (i.e., the interface does not display the status bar), and the interface corresponding to the window cannot respond to the user's touch operation. The window can be understood as a container that carries a view.

[0282] Optionally, the first parameter may be represented by a numerical value. For example, a first parameter of 1 indicates that the screen orientation is a vertical orientation.

[0283] It should be understood that when the screen state is the folding screen unfolded state, the off-screen display application passes the off-screen display view and the default window layout parameters to the window management service module, and the screen direction parameter in the default window layout parameters can be a third parameter, and the third parameter indicates that the screen direction follows the direction of the terminal device. Alternatively, when the terminal device is in the folding screen unfolded state, the default window layout parameters passed by the off-screen display application to the window management service module do not include the screen direction parameter.

[0284] Exemplarily, the screen-off display application can call the add view function through the window management interface to transmit the screen-off display view and the default window layout parameters to the window management service module. The window management interface can be a WindowManager interface, and the add view function can be an addView function.

[0285] After S816, the following S817 may be executed, or S832 may be executed simultaneously.

[0286] S817: The window management service module transmits a first drawing request to the screen-off display application. The first drawing request carries window layout parameters of the current screen.

[0287] It should be understood that the first drawing request is used to instruct the off-screen display application to execute a process of drawing a view. The first drawing request can also be called a trigger request, that is, the window management service module triggers the off-screen display application to draw the off-screen display view.

[0288] Specifically, the window layout parameters of the screen may include the width and height of the current window.

[0289] S818: The screen-off display application determines whether a black foreground color needs to be drawn for the screen-off display view.

[0290] Optionally, the screen-off display application compares the width and height of the current window. When the width is greater than the height, the screen-off display application determines to draw a black foreground color for the screen-off display view.

[0291] It should be understood that the current window can also be called a canvas, and the screen-off display view is drawn on the canvas.

[0292] S819: When the off-screen display application needs to draw a black foreground color for the off-screen display view, the off-screen display application draws a first view with a black foreground color.

[0293] It should be understood that the screen-off display application draws the first view according to the width and height obtained above.

[0294] Specifically, the process of drawing the first view may be: first drawing the view background layer, then drawing the layer corresponding to the screen-off display element, and finally drawing the black foreground color layer.

[0295] It should be understood that the layer corresponding to the screen-off display style may include multiple subviews. When drawing each of the multiple subviews, it is necessary to measure the width and height of each subview and draw the corresponding subview according to the width and height of each subview.

[0296] It should also be understood that, in the case where the screen-off display application does not need to draw a black foreground color for the screen-off display view, the screen-off display application draws a second view that does not include a black foreground color.

[0297] Optionally, the process of drawing the second view may be: first drawing the view background layer, and then drawing the layer corresponding to the screen-off display style.

[0298] S820: The screen is off display and the application notifies the battery management service module that the view drawing is complete.

[0299] S821, the battery management service module transmits a second screen state switching request to the layer composition service module, and correspondingly, the layer composition service module obtains the second screen state switching request.

[0300] It should be understood that the second screen state switching request is used to switch the screen state from the screen off state to the screen off display state, that is, to switch the screen state from the off state to the doze state.

[0301] After S821, the layer composition service module executes S822 and S823 simultaneously.

[0302] S822, the layer composition service module transmits a second screen state switching request to the display framework module, and correspondingly, the display framework module obtains the second screen state switching request.

[0303] S823, the layer composition service module transmits the second screen state switching request to the display driver module, and correspondingly, the display driver module obtains the second screen state switching request.

[0304] S824 is executed after S822, and S825 is executed after S823.

[0305] S824, the display framework module updates the screen state saved in the display framework module to the screen-off display state.

[0306] S825, the display driver module updates the screen state saved in the display driver to the screen-off display state.

[0307] S826, the screen-off display application monitors whether the screen state saved by the display framework module has been updated to the screen-off state.

[0308] S827, when the screen status saved in the display framework module has been updated to the screen-off status, the screen-off display application transmits a backlight-off instruction to the battery management service module. The backlight-off instruction carries the screen brightness information. Correspondingly, the battery management service module obtains the backlight-off instruction.

[0309] Optionally, the screen off display application determines screen brightness information according to the ambient brightness, and transmits the screen brightness information to the battery management service module.

[0310] S828, the battery management service module requests the display driving module to power on based on the backlight off instruction.

[0311] S829, the display driving module performs a power-on operation based on the backlight down instruction.

[0312] It should be understood that the power-on operation can also be understood as the display driver module controlling the screen to emit light. Power-on can also be understood as setting the backlight.

[0313] In one possible case, the above S824 is completed faster than S825. That is, the screen state saved in the display framework module has been updated to the off-screen display state, while the screen state saved in the display driver module has not been updated to the off-screen display state. This will result in the display driver module failing to power on in S829. After the power-on failure in S829, the steps from S828 to S829 are continuously executed in a loop until the display driver module is successfully powered on.

[0314] S830, after the display driver module is powered on successfully, notify the battery management service module to complete the power-on.

[0315] S831, the off screen displays the application displaying the first view.

[0316] S832: The window service management module determines whether the screen direction parameter in the default window layout parameters is the same as the screen direction parameter in the window layout parameters of the current screen.

[0317] It should be understood that the screen direction may include a horizontal screen direction or a vertical screen direction. When the screen direction is a horizontal screen direction, the corresponding screen direction parameter may be a second parameter, and when the screen direction is a vertical screen direction, the corresponding screen direction parameter may be a first parameter. When the screen direction parameter in the window layout parameters of the current screen is the second parameter, the window service management module determines that the screen direction parameter in the default window layout parameters is different from the screen direction parameter in the window layout parameters of the current screen. When the screen direction parameter in the window layout parameters of the current screen is the first parameter, the window service management module determines that the screen direction parameter in the default window layout parameters is the same as the screen direction parameter in the window layout parameters of the current screen.

[0318] S833, when the screen direction parameter in the default window layout parameters is different from the screen direction parameter in the window layout parameters of the current screen, the window service management module adjusts the screen direction parameter in the window layout parameters of the current screen to the first parameter to obtain the adjusted window layout parameters.

[0319] It should be understood that adjusting the screen direction parameter in the window layout parameters of the current screen to the first parameter means adjusting the window direction of the current screen to the vertical screen direction.

[0320] It should also be understood that, when the screen direction parameter in the default window layout parameters is the same as the screen direction parameter in the window layout parameters of the current screen, the window service management module does not need to adjust the parameters and does not draw the second view.

[0321] S834, the window service management module transmits a second drawing request to the screen-off display application, where the second drawing request carries the adjusted window layout parameters.

[0322] It should be understood that the adjusted window layout parameters are the window layout parameters in the vertical screen direction.

[0323] It should also be understood that the second drawing request is used to instruct the off-screen display application to execute drawing of the second view. The second drawing request can also be called a trigger request, that is, the window management service module triggers the off-screen display application to draw a view.

[0324] S835: The screen-off display application draws a second view based on the adjusted window layout parameters.

[0325] Specifically, the screen-off display application draws the second view based on the adjusted width and height of the window.

[0326] Optionally, drawing the second view may include multiple implementations.

[0327] In a possible implementation, the screen-off display application updates the first view according to the adjusted width and height of the window, and deletes the black foreground color layer in the first view to obtain the second view.

[0328] In another possible implementation, the screen-off display application first draws the view background layer according to the adjusted width and height of the window, and then draws the layer corresponding to the screen-off display style.

[0329] S836, display the second view.

[0330] In the above method 800, S817 to S819 are the process of drawing the first view, and S832 to S835 are the process of drawing the second view. The terminal device may execute S817 to S819 and S832 to S835 at the same time. The terminal device may first execute S817 to S819 and then execute S832 to S835, which is not limited in this application.

[0331] The present application embodiment includes the following multiple possible implementation methods:

[0332] In method 1, the terminal device draws and displays the first view and the second view.

[0333] The terminal device first completes the drawing of the first view, and then completes the drawing of the second view. After completing the view drawing, the terminal device will trigger the display screen to power on and display the corresponding interface. When the terminal device is powered on, if the second view has not been drawn, the terminal device will first display the first view, and then display the second view. That is, after executing S816, the terminal device first executes S817 to S819, and then executes S832 to S835, and S835 is completed after S829. After the display driver is powered on, the terminal device first displays the first view, and then displays the second view.

[0334] In this implementation, the interface display of the terminal device changes as follows: screen-on interface-screen-off interface-first view interface-second view interface.

[0335] Mode 2: The terminal device draws the first view and the second view, does not display the first view, and only displays the second view.

[0336] The terminal device first completes the drawing of the first view, and then completes the drawing of the second view. After completing the view drawing, the terminal device will trigger the display screen to power on and display the corresponding interface. When the terminal device is powered on, if the second view has been drawn, the terminal device does not display the first view, but directly displays the second view. That is, after executing S816, the terminal device first executes S817 to S819, and then executes S832 to S835, and S835 is completed before S829. Then, after the display driver is powered on, the terminal device does not display the first view, but directly displays the second view.

[0337] In this implementation, the display interface of the terminal device changes in the following order: screen-on interface - screen-off interface - second view interface.

[0338] Mode 3: The terminal device draws the second view and displays the second view.

[0339] The terminal device does not execute the process of drawing and displaying the first view. The terminal device starts to draw the view after adjusting the window layout parameters. Before drawing, the window layout parameters obtained by the terminal device are the second window layout parameters (i.e., the window layout parameters in the vertical screen direction). The terminal device can draw the second view based on the second window layout parameters. After the second view is drawn, the screen state is switched from the screen off state to the screen off display state, and the display screen is triggered to power on and display the second view. That is, after executing S816, the terminal device executes S832 to S835, then executes S820 to S830, and finally executes S836.

[0340] In this implementation, the display interface of the terminal device changes in the following order: screen-on interface - screen-off interface - second view interface.

[0341] It should be understood that Figure 8 The method 800 shown is a flowchart corresponding to the above-mentioned method 1, and methods 2 to 3 are other possible implementation methods. Figure 8 Not shown.

[0342] Combination of the above Figures 2 to 8 , describes in detail the screen-off display method of the embodiment of the present application, and will now be combined with Fig. 9 The terminal device of the embodiment of the present application is described in detail.

[0343] Fig. 9Another terminal device 900 provided in an embodiment of the present application is shown. The terminal device 900 includes a processor 901, a communication interface 902, and a memory 903. The processor 901, the communication interface 902, and the memory 903 communicate with each other through an internal connection path, the memory 903 is used to store instructions, the processor 901 is used to execute the instructions stored in the memory 903, the communication interface 902 can be used to receive signals from other modules (for example, the memory 903), and the communication interface 902 can also be used to send signals to other modules.

[0344] It should be understood that the terminal device 900 can be specifically the terminal device in the above-mentioned embodiment, and can be used to execute the various steps and / or processes corresponding to the terminal device in the above-mentioned method embodiment. Optionally, the memory 903 may include a read-only memory and a random access memory, and provide instructions and data to the processor. A part of the memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type. The processor 901 may be used to execute instructions stored in the memory, and when the processor 901 executes the instructions stored in the memory, the processor 901 is used to execute the various steps and / or processes of the above-mentioned method embodiment corresponding to the terminal device. Exemplarily, the communication interface 902 can read the instructions stored in the memory 903 and send the instructions to the processor 901. When the instructions shown are executed by the processor 901, the terminal device can execute the various steps executed by the terminal device in the above-mentioned embodiment.

[0345] It should be understood that in the embodiments of the present application, the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.

[0346] In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in a processor or an instruction in the form of software. The steps of the method disclosed in conjunction with the embodiment of the present application can be directly embodied as a hardware processor for execution, or a combination of hardware and software modules in a processor for execution. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor executes the instructions in the memory, and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it is not described in detail here.

[0347] The present application also provides a computer-readable storage medium, which is used to store a computer program, and the computer program is used to implement the method corresponding to the terminal device in the above embodiment.

[0348] The present application also provides a computer program product, which includes a computer program (also referred to as code or instruction). When the computer program runs on a computer, the computer can execute the method corresponding to the terminal device shown in the above embodiment.

[0349] Those of ordinary skill in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0350] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and modules described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0351] In the several embodiments provided in the present application, it should be understood that the disclosed systems, 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 is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, 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 modules, which can be electrical, mechanical or other forms.

[0352] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0353] In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.

[0354] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0355] The above is only a specific implementation of the present application, but the protection scope of the embodiments of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the embodiments of the present application, which should be included in the protection scope of the embodiments of the present application. Therefore, the protection scope of the embodiments of the present application should be based on the protection scope of the claims.

Claims

1. A method for displaying a screen off, characterized in that: Applied to a terminal device provided with a display screen, the method comprises: When a screen-off signal is detected, the screen state of the terminal device is switched from a screen-on state to a screen-off state; When the screen is off and the current screen orientation of the terminal device is horizontal, a first view is drawn based on a first window layout parameter, wherein the first view includes a background layer, a layer corresponding to the screen off display element, and a foreground color layer, wherein the foreground color layer is black, and the first window layout parameter is related to the current screen orientation; Switching the screen state of the terminal device from a screen-off state to a screen-off display state, and displaying the first view; Adjusting the first window layout parameter to a second window layout parameter, and drawing a second view based on the second window layout parameter, wherein the second view includes a background layer, a layer corresponding to an off-screen display element, and an empty foreground color layer; or, the second view includes the background layer and a layer corresponding to the off-screen display element, and the second window layout parameter is related to a vertical screen orientation; The second view is displayed.

2. The method according to claim 1, characterized in that The switching of the screen state of the terminal device from a screen-on state to a screen-off state includes: The battery management service module sends a first screen state switching request to the layer synthesis service module, where the first screen state switching request is used to request to switch the screen state of the terminal device from a screen-on state to a screen-off state; The layer synthesis service module sends the first screen state switching request to the display framework module and the display driver respectively; The display framework module and the display driver respectively switch the screen state of the terminal device from a screen-on state to a screen-off state; When the battery management service module monitors that the screen state in the display framework module has been switched to the screen-off state, the battery management service module sends a power-off request to the display driver; The display driver performs a power-off operation of the display screen based on the power-off request.

3. The method according to claim 2, characterized in that Drawing the first view based on the first window layout parameter includes: The battery management service module invokes the screen-off display service through the screen-off display application; The screen-off display application transmits the first window layout parameter to the window management service module; The window management service module transmits a first drawing request to the screen-off display application, where the first drawing request carries the first window layout parameter; The screen-off display application draws the first view based on the first window layout parameters; The adjusting the first window layout parameter to a second window layout parameter includes: The window management service module adjusts the first window layout parameter to the second window layout parameter; Drawing the second view based on the second window layout parameter includes: The window management service module transmits a second drawing request to the screen-off display application, where the second drawing request carries the second window layout parameter; The screen-off display application draws the second view based on the second window layout parameters.

4. The method according to claim 3, characterized in that: Before drawing the first view, the method further includes: The screen-off display application determines that the current screen orientation of the terminal device is a horizontal orientation based on the width and height of the window.

5. The method according to any one of claims 2 to 4, characterized in that The switching of the screen state of the terminal device from the screen-off state to the screen-off display state includes: The battery management service module sends a second screen state switching request to the layer synthesis service module, where the second screen state switching request is used to request to switch the screen state of the terminal device from a screen-off state to a screen-off display state; The layer synthesis service module sends the second screen state switching request to the display framework module and the display driver respectively; The display framework module and the display driver respectively switch the screen state of the terminal device from the screen-off state to the screen-off display state; When the screen status in the display framework module is monitored to be switched to the screen status, the off-screen display application transmits a backlight down instruction to the battery management service module; The battery management service module sends a power-on request to the display driver in response to the backlight down instruction; The display driver performs a power-on operation of the display screen based on the power-on request.

6. The method according to claim 5, characterized in that The battery management service module sends a power-on request to the display driver in response to the backlight down instruction, including: In the case where the battery management service module does not receive the power-on success notification from the display driver, the battery management service module repeatedly sends the power-on request to the display driver for multiple times until the power-on success notification is received.

7. The method according to claim 6, characterized in that The method further comprises: The battery management service module determines whether the number of repeated transmissions of the power-on request is equal to a preset upper limit value; The repeatedly sending the power-on request to the display driver comprises: When the number of repeated transmissions of the power-on request is less than the preset upper limit, the battery management service module repeatedly transmits the power-on request for multiple times.

8. The method according to claim 1, characterized in that The switching of the screen state of the terminal device from a screen-on state to a screen-off state includes: The screen status parameters are set to a first gear, wherein the screen status parameters include a screen refresh frequency and a screen brightness, the screen refresh frequency corresponding to the first gear is a first frequency, and the screen brightness corresponding to the first gear is a first brightness.

9. The method according to claim 1, characterized in that: The switching of the screen state of the terminal device from the screen-off state to the screen-off display state includes: The screen status parameters are set to a second gear, wherein the screen status parameters include a screen refresh frequency and a screen brightness. The screen refresh frequency corresponding to the second gear is a second frequency. The screen brightness corresponding to the second gear is between a first brightness and a second brightness.

10. The method according to claim 1, characterized in that The method further comprises: When the screen-off display switch of the terminal device is turned on, it is determined that the screen-off display needs to be performed.

11. The method according to claim 10, characterized in that The determining that the screen-off display needs to be performed includes: When the screen-off display switch of the terminal device is turned on and the terminal device meets a first preset condition, it is determined that the screen-off display needs to be performed, and the first preset condition includes at least one of the following: The power of the terminal device is greater than a preset value; or, The terminal device does not detect the approaching light.

12. The method according to claim 1, characterized in that Drawing the first view includes: When the screen needs to be off, the current screen orientation of the terminal device is horizontal, and the terminal device meets a second preset condition, the first view is drawn, and the second preset condition includes any one of the following: The display screen is a non-folding screen; or, The display screen is an external display screen of the terminal device, and the folding screen is in a fully folded state.

13. The method according to claim 1, characterized in that The screen-off signal is generated based on the user pressing the power button; or, the screen-off signal is generated based on the terminal device not detecting a user operation within a preset time.

14. A terminal device, characterized in that: include: A processor, wherein the processor is coupled to a memory, wherein the memory is used to store a computer program, and when the processor calls the computer program, the terminal device executes the method according to any one of claims 1 to 13.

15. A computer-readable storage medium, characterized in that: Used to store a computer program, the computer program comprising instructions for implementing the method according to any one of claims 1 to 13.

16. A computer program product, characterized in that The computer program product includes computer program codes, and when the computer program codes are executed on a computer, the computer is enabled to implement the method according to any one of claims 1 to 13.