Display method and related device

By setting the screen-off application view to be invisible after the screen is off of the electronic device, the problem of black frames flashing when fingerprint unlocking is solved after the screen is off, and the user experience is improved.

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

Patent Information

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

AI Technical Summary

Technical Problem

After the screen of the electronic device is turned off, when the user uses a fingerprint to unlock the device, a black image may flash after the system application desktop is displayed, affecting the user experience.

Method used

After the screen of the electronic device is turned off, the view of the screen-off application is set to be invisible, and the unlocking interface is not displayed until the fingerprint is successfully unlocked, thereby avoiding the display of the screen-off image.

Benefits of technology

It has reduced the phenomenon of black frames flashing after the system application desktop or wallpaper is displayed when the electronic device is successfully unlocked after turning off the screen, improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117785348B_ABST
    Figure CN117785348B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a display method and related devices, which are applied to the field of terminal technology. The method includes: when the screen of an electronic device is on, at a first moment, in response to pressing the power button of the electronic device, the screen of the electronic device is turned off; after the first moment, the view of the screen-off application is not visible; at a second moment, in response to an unlocking operation, the electronic device displays a first interface, and the first interface is an interface indicating that the display screen of the electronic device has been unlocked. In this way, the probability of a black image flashing after the electronic device displays the system application desktop or wallpaper when the electronic device is successfully unlocked after the screen is turned off can be reduced.
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 display method and related devices. Background Art

[0002] Some electronic devices have a side fingerprint unlocking function, for example, the fingerprint recognition area of ​​the electronic device is set on the power button. When the screen of the electronic device is on, the user can press the power button to turn off the screen of the electronic device. After the screen of the electronic device is turned off but before the screen off interface is displayed, if the user touches the power button with a fingerprint, the electronic device performs fingerprint recognition. If the fingerprint recognition is successful, the electronic device is unlocked.

[0003] However, after the electronic device turns off its screen but before displaying the off-screen interface, if the user touches the power button with a fingerprint and unlocks it successfully, the electronic device may display a system application desktop and then flash a black image, affecting the user experience. Summary of the invention

[0004] The embodiment of the present application provides a display method and related devices, which are applied in the field of terminal technology. After the screen of an electronic device is turned off, before the screen-off image is displayed, the view of the screen-off application is controlled to be invisible, so that before the screen-off image is displayed, if the fingerprint unlocking is successful, the electronic device will not display the screen-off image, thereby reducing the probability of a black image flashing after the electronic device displays the system application desktop or wallpaper when the electronic device is successfully unlocked after the screen is turned off.

[0005] In a first aspect, an embodiment of the present application provides a display method, comprising:

[0006] In the screen-on state of the electronic device, at a first moment, in response to pressing the power button of the electronic device, the screen of the electronic device is turned off. After the first moment, the view of the screen-off application is not visible. At a second moment, in response to the unlocking operation, the electronic device displays a first interface, which is an interface indicating that the display screen of the electronic device has been unlocked.

[0007] In this way, when the screen of the electronic device is on, in the scenario where the electronic device receives a fingerprint unlocking operation after the power button is pressed, the screen-off application can set the root view of the screen-off application to be invisible. When the root view of the screen-off application is invisible, the screen-off application will not transmit the screen-off image to the synthesis module, that is, the screen-off image will not be displayed. In this way, when the screen of the electronic device is off, if the electronic device is unlocked successfully, the display screen can display the system application desktop or wallpaper, and there will be no flashing of a frame of the screen-off image, and there will be no flashing of a black frame after displaying the system application desktop or wallpaper.

[0008] In a possible implementation, in response to pressing a power button of the electronic device, the method further includes: setting the root view of the screen-off application to be invisible.

[0009] In this way, the view of the off-screen application can be made invisible, and the off-screen image drawn by the off-screen application can be prevented from being displayed. When the electronic device is unlocked successfully, there will be no flashing black frame after the display screen displays the system application desktop or wallpaper.

[0010] In a possible implementation, the electronic device includes a synthesis module, which is used to synthesize and display images transmitted by the application. When the root view of the off-screen application is not visible, the off-screen application does not transmit the image drawn by the off-screen application to the synthesis module.

[0011] In this way, when the electronic device is unlocked successfully, the display screen will not flash a black frame after the system applies the desktop or wallpaper.

[0012] In a possible implementation, the electronic device includes a power management service, a synthesis module, and a display screen driver. In response to the operation of pressing the power button of the electronic device, the method further includes: the power management service transmits first information to the synthesis module. The first information is information indicating that the display screen of the electronic device is in an off state. Based on the first information, the synthesis module transmits second information to the display screen driver. The second information is information indicating that the display screen is controlled to be in a first power consumption mode. The first power consumption mode is the power consumption mode before the display screen is powered off. The display screen driver controls the display screen to be in the first power consumption mode. The display screen driver controls the display screen to be powered off and in an off state.

[0013] In this way, pressing the power button indicates that the user has no intention of using the electronic device. In response to the operation of pressing the power button, the display screen is controlled to be powered off and in an off state, which can reduce the power consumption of the electronic device.

[0014] In a possible implementation, the electronic device further includes a window management service, and the window management service is used to manage views added to the window management service by the application. In response to the operation of pressing the power button of the electronic device, the method further includes: the power management service starts the screen-off application. The screen-off application initializes and sets the root view of the screen-off application to be invisible, and adds the view of the screen-off application to the window management service. The window management service starts a process including drawing and rendering, and the screen-off application executes the process to draw the first frame image.

[0015] In this way, the screen-off application is started, and when the root view of the screen-off application is invisible, the screen-off application executes the process to draw the first frame of the image, but does not render it, and the drawn image will not be displayed, thereby achieving the goal of not displaying the image drawn by the screen-off application.

[0016] In one possible implementation, the electronic device includes a fingerprint framework, a lock screen service, a power management service, a synthesis module, and a display driver. In response to the unlocking operation, the method also includes: the fingerprint framework transmits third information representing the fingerprint unlocking operation to the lock screen service. Based on the third information, the lock screen service transmits fourth information representing the control of the display screen of the electronic device to the power management service. Based on the fourth information, the power management service transmits fifth information to the synthesis module. The fifth information is information indicating that the display screen of the electronic device is in an on state. Based on the fifth information, the synthesis module transmits sixth information to the display driver. The sixth information is information indicating that the display screen is controlled to be in a second power consumption mode, and the power consumption of the display screen in the second power consumption mode is greater than the power consumption of the display screen in the off state. The display driver controls the display screen to be in the second power consumption mode.

[0017] In this way, the second power consumption mode can be power consumption mode 2, which indicates that the preparation work before the display screen is powered on has been completed. The display screen is controlled to be in the second power consumption mode, so that the display screen can be lit up in time when fingerprint recognition is successful (or fingerprint unlocking is successful).

[0018] In a possible implementation, after the lock screen service transmits fourth information indicating control of turning on the display screen of the electronic device to the power management service, the method further includes: based on the fourth information, the power management service transmits seventh information indicating destruction of the off-screen display to the off-screen application. The off-screen application clears the root view of the off-screen application.

[0019] In this way, by clearing the root view of the screen-off application, the unexecuted processes related to the screen-off application can be prevented from being executed, thereby reducing the power consumption of the electronic device.

[0020] In a possible implementation, in response to the unlocking operation, the method further includes: the fingerprint framework performs fingerprint recognition. The fingerprint framework transmits eighth information indicating successful fingerprint recognition to the lock screen service. The lock screen service transmits the eighth information to the power management service, and the lock screen service exits. Based on the eighth information, the power management service transmits ninth information indicating the lower backlight to the display driver. The ninth information includes a first value indicating the brightness of the display. The display driver controls the display to power on, and controls the brightness of the display to the first value.

[0021] In this way, the lock screen service exit can be understood as the lock screen service stopping running, which can reduce power consumption. The first value can be a screen brightness value. When the fingerprint recognition is successful, the display brightness is controlled to the first value, and the unlocking interface can be clearly displayed, and the unlocking interface is, for example, a system application desktop or wallpaper.

[0022] In a possible implementation, the method further includes: at a third moment, in response to an operation of pressing a power button, the electronic device turns off the screen. Between the second moment and the third moment, the electronic device is in a screen-on state. After the third moment, the view of the screen-off application is not visible. At a fourth moment, the view of the screen-off application is visible, and the electronic device displays a second interface. The second interface includes a screen-off image.

[0023] In this way, in a scenario where the power button is pressed and no fingerprint unlocking operation is received when the screen of the electronic device is on, the view of the off-screen application is first invisible and then visible. When the view of the off-screen application is invisible, if the electronic device is unlocked, the system application desktop can be displayed without flashing a black frame. When it is determined that the user has no intention to use the electronic device, the electronic device can control the view of the off-screen application to be visible. When the view of the off-screen application is visible, the off-screen application can draw and render the off-screen image, and transmit the drawn and rendered off-screen image to the synthesis module to display the off-screen image.

[0024] In one possible implementation, after the view of the screen-off application is invisible, the method further includes: when the screen-off application completes drawing of the first frame image and the screen-off application has not received the seventh information indicating destruction of the screen-off display, setting the root view of the screen-off application to be visible.

[0025] In this way, when the off-screen application completes drawing the first frame of the image, the off-screen application does not receive the seventh information indicating the destruction of the off-screen display, indicating that the user has no intention to use the electronic device, and the root view of the off-screen application can be set to be visible to control the view of the off-screen application to be visible. When the view of the off-screen application is visible, the off-screen application can draw and render the off-screen image to display the drawn and rendered off-screen image.

[0026] In one possible implementation, the electronic device includes a synthesis module, a power management service, a display module, and a display driver. Before setting the root view of the screen-off application to be visible, the method also includes: the screen-off application transmits the tenth information indicating the switching of the power consumption mode to the power management service. Based on the tenth information, the power management service transmits the eleventh information to the synthesis module. The eleventh information is information indicating that the display screen of the electronic device is in a sleep state. Based on the eleventh information, the synthesis module transmits the twelfth information to the display driver and the display module respectively. The twelfth information is information indicating that the display screen is controlled to be in a third power consumption mode. The power consumption of the display screen in the third power consumption mode is greater than the power consumption of the display screen in the screen-off state, and the power consumption of the display screen in the third power consumption mode is less than the power consumption of the display screen in the screen-on state. The display driver controls the display screen to be in the third power consumption mode, and the display module transmits the thirteenth information indicating that the display screen is in the third power consumption mode to the screen-off application.

[0027] In this way, the display screen can be prepared for lighting up while reducing the power consumption of the electronic device, so that the display screen can be powered on and lit up in time when the fifteenth information indicating the lower backlight is received.

[0028] In one possible implementation, after setting the root view of the screen-off application to be visible, the method further includes: the screen-off application transmits fourteenth information indicating the lower backlight display to the power management service. Based on the fourteenth information, the power management service transmits fifteenth information indicating the lower backlight to the display driver. The fifteenth information includes a second value indicating the brightness of the display. The brightness corresponding to the second value is less than the brightness of the display in the screen-on state. The display driver controls the display to power on, and controls the brightness of the display to the second value. The electronic device displays a second interface, including: the display screen displays an image synthesized by a synthesis module, and the synthesized image includes an image drawn and rendered by the screen-off application.

[0029] In this way, in a scenario where the power button of the electronic device is pressed but no fingerprint unlocking operation is received when the screen is on, the electronic device displays an off-screen image.

[0030] In a possible implementation, a fingerprint recognition area is provided on the power button.

[0031] In this way, the electronic device can be made thinner and lighter.

[0032] In a second aspect, an embodiment of the present application provides an electronic device, which includes: a processor and a memory; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, so that the electronic device performs the method of the first aspect.

[0033] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the method of the first aspect is implemented.

[0034] In a fourth aspect, an embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed, the computer executes the method of the first aspect.

[0035] In a fifth aspect, an embodiment of the present application provides a chip, the chip including a processor, the processor being used to call a computer program in a memory to execute the method described in the first aspect.

[0036] It should be understood that the second to fifth aspects of the present application correspond to the technical solutions of the first aspect of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 A scene diagram of a possible implementation in which the electronic device receives a fingerprint unlocking operation after the power button is pressed;

[0038] Figure 2 A flowchart of module interaction of an electronic device in a possible implementation;

[0039] Figure 3 A module interaction flow chart provided for an embodiment of the present application;

[0040] Figure 4 A scene diagram of an electronic device receiving a fingerprint unlocking operation after a power button is pressed provided in an embodiment of the present application;

[0041] Figure 5 A schematic diagram of the structure of an electronic device 100 provided in an embodiment of the present application;

[0042] Figure 6 Another module interaction flow chart provided for an embodiment of the present application;

[0043] Figure 7 Another module interaction flow chart provided for an embodiment of the present application;

[0044] Figure 8 A scene diagram of an electronic device not receiving a fingerprint unlocking operation after the power button is pressed provided in an embodiment of the present application;

[0045] Fig. 9 A block diagram related to a software architecture of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0046] In order to clearly describe the technical solutions of the embodiments of the present application, some terms and technologies involved in the embodiments of the present application are briefly introduced below:

[0047] 1. Turn off the screen

[0048] Screen off can be understood as the display screen of the electronic device being black and not displaying any image.

[0049] 2. Backlight

[0050] Backlight can be understood as an external light source that provides display for the display screen, also known as backlight.

[0051] The backlight of an electronic device can be understood as lighting up the display screen of the electronic device.

[0052] 3. Screen status

[0053] The screen state may also be referred to as the display screen state. The display screen state may be any one of the following: the display screen is in an OFF state, the display screen is in an ON state, or the display screen is in a DOZE state.

[0054] Among them, the display screen being in the off state can be understood as the state in which the display screen is powered off and the screen is off. The display screen being in the on state can be understood as the state in which the display screen is on. The display screen being on can be understood as the display screen displaying any interface of the system application desktop, wallpaper or other application interface. Other applications do not include off-screen applications. The display screen being in the sleep state can be understood as the state in which the display screen displays an off-screen image.

[0055] Before the display screen is turned on, the display screen may be in power mode 2 (PowerMode_2). The display screen being in power mode 2 can be understood as the preparation work before the display screen is powered on has been completed, but the display screen has not been powered on. Exemplarily, the display screen driver can control the display screen to be in power mode 2. When the display screen is in power mode 2, the display screen driver can control the display screen to be powered on and control the display screen to be at a bright screen brightness value. In this way, the display screen is turned on.

[0056] Before the display screen is turned off, the display screen may be in power mode 0 (PowerMode_0). The display screen being in power mode 0 can be understood as the preparation work before the display screen is powered off has been completed, and the display screen has not been powered off. Exemplarily, the display screen driver can control the display screen to be in power mode 0. When the display screen is in power mode 0, the display screen driver can control the display screen to be powered off and in a screen-off state. In this way, the display screen is turned off.

[0057] Before the display screen is in sleep mode, the display screen may be in power mode 1 (PowerMode_1). The display screen being in power mode 1 can also be understood as the preparation work before the display screen is powered on has been completed, but the display screen has not yet been powered on. Exemplarily, the display screen driver can control the display screen to be in power mode 1. When the display screen is in power mode 1, the display screen driver can control the display screen to be powered on and control the display screen to be at the off-screen brightness value. In this way, the display screen is turned off.

[0058] The power consumption of the display screen in power consumption mode 0 is less than the power consumption of the display screen in power consumption mode 1 and less than the power consumption of the display screen in power consumption mode 2. The brightness value of the screen off is less than the brightness value of the screen on.

[0059] 4. Image synthesis

[0060] Image synthesis can be understood as that before the electronic device displays the image, the electronic device superimposes the images transmitted by multiple applications obtained by the electronic device in a superposition order to obtain a synthesized image.

[0061] The stacking order may be the order of the layer levels of images transmitted by multiple applications. The layer level may be understood as a value pre-assigned by the electronic device to the images of each application, which indicates the stacking position when the images are synthesized. A larger value may indicate a higher layer level, or a smaller value may indicate a higher layer level.

[0062] Take the layer level of the always on display (AOD) application > the layer level of the lock screen application > the layer level of the desktop application > the layer level of the wallpaper application as an example. Exemplarily, the electronic device obtains the off-screen image transmitted by the off-screen application, the system application desktop transmitted by the desktop application, and the wallpaper transmitted by the wallpaper application before displaying the image. The electronic device can superimpose the layer containing the off-screen image, the layer containing the system application desktop, and the layer containing the wallpaper in the order of the size of the layer levels of each view, that is, in the order of off-screen image → system application desktop → wallpaper, to obtain a composite image.

[0063] It should be understood that the composite image may include at least one layer. In the composite image, the layer with the highest layer level is located at the top layer. When the electronic device displays the composite image, the top layer may be displayed.

[0064] 5. Other terms

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

[0066] In the embodiments of the present application, "at least one" refers to one or more, and "plurality" refers to 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 represent: 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, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.

[0067] In the embodiment of the present application, "at..." may be the instant when a certain situation occurs, or may be a period of time after a certain situation occurs, and the embodiment of the present application does not specifically limit this. In addition, the display interface provided in the embodiment of the present application is only an example, and the display interface may also include more or less content.

[0068] Figure 1 A scene diagram showing a possible implementation in which an electronic device receives a fingerprint unlocking operation after a power button is pressed.

[0069] like Figure 1 As shown in a of FIG. 1 , a power button 101 is provided on the side of the electronic device, and a fingerprint recognition area is provided on the power button 101. When the screen of the electronic device is on, the electronic device can display Figure 1 The interface shown in a. Figure 1 The interface shown in a in , which includes a status bar, an icon for a settings application, an icon for a calendar application, an icon for a Youdao Dictionary application, an icon for a WeChat application, an icon for a notes application, an icon for a Toutiao application, an icon for a phone application, an icon for a camera application, and an icon for a text message application.

[0070] Figure 1 The interface shown in a in FIG. 1 may be referred to as the system application desktop. It should be understood that Figure 1 The interface shown in a is only an example of the system application desktop and is not a limitation of the system application desktop.

[0071] Display on electronic devices Figure 1 In the case of the interface shown in a, the user can press the power button 101, and the electronic device can turn off the screen and display Figure 1 The interface shown in b in the figure. Figure 1 In the interface shown in b, the display screen of the electronic device is black and does not display any image.

[0072] When the electronic device turns off the screen and displays Figure 1 In the case of the interface shown in b in FIG. 1 , the user can use the fingerprint to touch the power button 101. Since the power button 101 is provided with a fingerprint recognition area, when receiving the operation of the fingerprint touching the power button 101, the electronic device can perform fingerprint recognition. If the fingerprint recognition is successful, the electronic device is unlocked, and the electronic device can display Figure 1 The interface shown in c in the figure flashes as follows Figure 1 The interface shown in d in the figure. Figure 1 The interface shown in d is displayed Figure 1 The interface shown in e.

[0073] in, Figure 1 The contents of the interface shown in c can be found in Figure 1 The content of the interface shown in a, Figure 1 The contents of the interface shown in e can be found in Figure 1 The contents of the interface shown in a in the figure are not described here. Figure 1 The interface shown in d in FIG. 1 includes a black background view 102, a view 103, a view 104 representing time and date, a view 105 representing the system, and a view 106 representing power. Figure 1 The image in the interface shown in d may be a screen-off image.

[0074] like Figure 1 As shown in c, d and e in FIG, when the electronic device is unlocked with the screen off, a screen-off image will flash after the electronic device displays the system application desktop. Since the screen-off image is a black image, there is a large visual difference between the system application desktop and the screen-off image, and as a result, a black frame will flash after the electronic device displays the system application desktop, resulting in a reduced user experience.

[0075] Combine the following Figure 2 illustrate Figure 1 The reason why a black frame flashes after the electronic device displays the system application desktop is shown. For example, Figure 2 A flowchart of module interaction of an electronic device in a possible implementation is shown.

[0076] like Figure 2 As shown, the software architecture of some electronic devices includes power management service (power manager service, PMS), screen off (AOD) application, window management service (window manager service, WMS), lock screen service (key guard), synthesis module (surface flinger) and display driver.

[0077] In a scenario where the electronic device receives a fingerprint unlocking operation after the power button is pressed when the screen of the electronic device is on, the module interaction process of the electronic device may include S201-S212.

[0078] S201: The power management service receives a key event indicating that a power key is pressed.

[0079] S202: The power management service transmits information to the display screen driver indicating that the display screen of the electronic device is in an OFF state.

[0080] When receiving information indicating that the display screen of the electronic device is in the OFF state, the display screen driver can control the display screen to be powered off and in the off state.

[0081] S203: The power management service starts the screen-off application.

[0082] The power management service starting the screen-off application can be called the power management service pulling up the screen-off application.

[0083] S204, initializing the screen-off application.

[0084] Exemplarily, after the screen-off application is initialized, the root view of the screen-off application is visible.

[0085] S205: The screen-off application adds the root view of the screen-off application to the window management service.

[0086] Since other views of the screen-off application are subordinate to the root view of the screen-off application, by adding the root view of the screen-off application to the window management service, it is possible to add all views of the screen-off application to the window management service.

[0087] S206: The screen-off application draws and renders the screen-off image.

[0088] For example, when the root view of the off-screen application is added to the window management service, the window management service can call the drawing (do frame) method of the off-screen application to trigger a process including drawing and rendering. When the root view of the off-screen application is visible, the off-screen application executes the process to draw and render the first frame of the off-screen image.

[0089] S207. The screen-off application can transmit the first frame of the screen-off image that has been drawn and rendered to the synthesis module to display the screen-off image.

[0090] For example, when the synthesis module receives the screen-off image transmitted by the screen-off application, the synthesis module can synthesize the screen-off image to obtain a synthesized image. The synthesis module can drive the transmission of the synthesized image to the display screen so that the lit display screen displays the synthesized image.

[0091] Some electronic devices may take a long time to complete steps S204-S206 due to poor performance. During the execution of steps S204-S206, the electronic device may receive a fingerprint unlocking operation in which the user touches the power button with a fingerprint. In response to the fingerprint unlocking operation, the electronic device may execute steps S208-S212.

[0092] S208. The lock screen service receives information indicating a fingerprint unlocking operation.

[0093] For example, during the execution of steps S204-S205, the electronic device may receive a fingerprint unlocking operation. The kernel layer of the electronic device may process the fingerprint unlocking operation to obtain a fingerprint event. The kernel layer transmits the fingerprint event to the fingerprint framework. The fingerprint framework transmits information indicating the fingerprint unlocking operation to the lock screen service. Figure 2 Not shown.

[0094] During the execution of step S206, the lock screen service may receive information about the fingerprint unlocking operation, and the lock screen service may execute S209.

[0095] S209: The lock screen service transmits information indicating control of lighting the display screen to the power management service.

[0096] S210. The power management service transmits information indicating that the display screen is in an ON state to the display screen driver.

[0097] When receiving the information indicating that the display screen is controlled to be in the turned-on state, the display screen driver controls the display screen to be in power consumption mode 2.

[0098] S211. When the lock screen service receives information indicating successful fingerprint recognition, the lock screen service may transmit information indicating successful fingerprint recognition to the power management service.

[0099] It is understandable that when the fingerprint framework receives a fingerprint event, the fingerprint framework can perform fingerprint recognition on the fingerprint collected in the fingerprint recognition area. If the fingerprint recognition is successful, the fingerprint framework transmits information indicating the success of the fingerprint recognition to the lock screen service.

[0100] S212: When receiving information indicating successful fingerprint recognition, the power management service transmits information indicating the lower backlight to the display screen driver, and the display screen driver controls the display screen to power on to light up the display screen.

[0101] Since it takes a long time for the screen-off application to draw and render the screen-off image, the screen-off application has not completed the drawing and rendering of the first frame of the screen-off image when the display screen is turned on. When the synthesis module does not receive the screen-off image transmitted by the screen-off application, the synthesis module can perform image synthesis on the stored system application desktop and wallpaper to obtain a composite image A that is a superposition of a layer containing the system application desktop and a layer containing the wallpaper. The image contained in the topmost layer of the composite image A is the system application desktop. The synthesis module can transmit the composite image A to the display driver, and the display driver transmits the composite image A to the display. When the display screen is turned on, it can display the following: Figure 1 The system application desktop shown in c.

[0102] Display on electronic devices Figure 1 In the case of the system application desktop shown in c in FIG, the off-screen application transmits the first frame of the off-screen image drawn and rendered to the synthesis module. The synthesis module synthesizes the off-screen image transmitted by the off-screen application to obtain a synthesized image B of the layer containing the off-screen image. Among them, the image contained in the top layer of the synthesized image B is the off-screen image. The synthesis module transmits the synthesized image B to the display driver, and the display driver transmits the synthesized image B to the display screen, and the display screen displays as shown in FIG. Figure 1The screen-off image shown in d.

[0103] Because when the power management service transmits information indicating that the control display screen is turned on to the display driver, the power management service can transmit information indicating the destruction of the off-screen display to the off-screen application, and the off-screen application clears the root view of the off-screen application. Because the off-screen application draws the first frame of the off-screen image before receiving the information indicating the destruction of the off-screen display, the information indicating the destruction of the off-screen display can affect the process that the off-screen application has not executed, but will not affect the process that the off-screen application is executing. Therefore, after the off-screen application completes the drawing and rendering of the first frame of the off-screen image, it can transmit the drawn and rendered first frame of the off-screen image to the synthesis module, so that the display screen displays as shown below. Figure 1 The screen-off image shown in d.

[0104] Because the window management service can be used to manage the views added by the application, when the window management service identifies that the root view of the managed off-screen application is cleared, the window management service transmits information indicating clearing of the off-screen image to the synthesis module.

[0105] The display shows Figure 1 When the off-screen image shown in d in the figure is displayed, and the synthesis module receives information indicating that the off-screen image is cleared, the synthesis module releases the cache storing the off-screen image, and the synthesis module synthesizes the stored system application desktop and wallpaper to obtain a synthesized image C. The top layer of the synthesized image C contains an image of the system application desktop, thereby realizing the display screen display as shown in FIG. Figure 1 The implementation principle of displaying the composite image C is similar to the implementation principle of displaying the composite image A.

[0106] like Figure 2 In the illustrated embodiment, due to the poor performance of the electronic device, the initialization of the screen-off application and the drawing and rendering of the screen-off image may take a long time. There is a scenario in which the electronic device receives a fingerprint unlocking operation after the power button is pressed but before the drawing and rendering of the first frame of the screen-off image are completed. In this scenario, before the screen-off application completes the drawing and rendering of the first frame of the screen-off image, if the screen-off application receives information indicating the destruction of the screen-off display, the drawing, rendering and transmission of the first frame of the screen-off image to the synthesis module are not affected by the information indicating the destruction of the screen-off display. This results in a phenomenon in which a frame of the screen-off image flashes after the electronic device is successfully unlocked in the screen-off state and the system application desktop is displayed.

[0107] In view of this, an embodiment of the present application provides a display method, which controls the view of the screen-off application to be invisible after the electronic device screen is turned off and before the screen-off image is displayed. In this way, before the screen-off image is displayed, if the fingerprint unlocking is successful, the electronic device will not display the screen-off image, thereby reducing the probability of a frame of the screen-off image flashing after the system application desktop is displayed when the electronic device is successfully unlocked after the screen is turned off.

[0108] For the scenario where the electronic device receives a fingerprint unlocking operation after the power button is pressed when the screen is on, Figure 3 A module interaction flow chart provided in an embodiment of the present application is shown. Figure 3 Example and Figure 2 The difference between the embodiments is that Figure 3 S304 in the embodiment and Figure 2 S204 in the embodiment is different. Figure 3 S306 in the embodiment and Figure 2 S206 in the embodiment is different. Figure 2 The embodiment includes S207, Figure 3 The embodiment does not include the step corresponding to S207, that is, in Figure 3 In the embodiment, the screen-off application will not transmit the drawn screen-off image to the synthesis module. Figure 3 The specific implementation principles of S301-S303, S305, S307-S311 in the embodiment can be found in Figure 2 The specific implementation principles of S201-S203, S205, S208-S212 in the embodiment.

[0109] For example, Figure 3 As shown, when the screen of the electronic device is on, after the power button is pressed, the electronic device receives a fingerprint unlocking operation, and the module interaction process may include:

[0110] S301: The power management service may receive a key event indicating that a power key is pressed.

[0111] S302: The power management service may transmit information indicating that the display screen of the electronic device is in an OFF state to the display screen driver.

[0112] Exemplarily, when receiving information indicating that the display screen of the electronic device is in an OFF state, the display screen driver may control the display screen to be in power consumption mode 0.

[0113] When the display screen is in power consumption mode 0, the display screen driver can control the display screen to power off and be in a screen-off state.

[0114] S303: The power management service can start a screen-off application.

[0115] Exemplarily, the power management service may call a method of starting a screen-off application (startDream(: startAOD)) to start a screen-off application.

[0116] Optionally, S302 and S303 may be executed concurrently. S302 and S303 may also be executed sequentially, for example, the power management service may execute S303 after executing step S302, or may execute S302 after executing step S303.

[0117] S302 and S303 are executed concurrently, or the power management service executes S303 after executing step S302, so that the screen of the electronic device can be turned off as soon as possible to reduce power consumption. The power management service executes S302 after executing step S303, so that the screen-off application can complete the relevant process as soon as possible, so that the electronic device can display the screen-off image as soon as possible to improve the user experience.

[0118] S304: Initialize the screen-off application and set the root view of the screen-off application to be invisible.

[0119] It can be understood that, since other views of the screen-off application are subordinate to the root view of the screen-off application, when the root view is invisible, other views of the screen-off application that are subordinate to the root view of the screen-off application are also invisible.

[0120] S305: The screen-off application adds the root view of the screen-off application to the window management service.

[0121] Exemplarily, the screen-off application may call the root view adding (windowManager.addView(rootView)) method to add the root view of the screen-off application to the window management service.

[0122] Exemplarily, the following pseudo code shows the specific implementation of steps S304-S305:

[0123] If(true){

[0124] / / Set the root layout to be invisible

[0125] rootView.setVisibility(View.INVISIBLE);

[0126] }

[0127] mWindowManager.addView(rootView,someLayoutParams);

[0128] Among them, true means that the fingerprint setting mode of the electronic device is the side fingerprint mode. For example, the fingerprint recognition area of ​​the side fingerprint mode is set on the power button. If (true) means if the fingerprint setting mode of the electronic device is the side fingerprint mode. rootView represents the root view. setVisibility means setting visibility. View.INVISIBLE means that the view is invisible. rootView.setVisibility(View.INVISIBLE) means setting the root view to invisible. WindowManager represents window management. addView means adding a view. someLayoutParams means the layout parameters of the off-screen view. mWindowManager.addView(rootView, someLayoutParams) means calling the window management add view method to add the layout parameters of the root view and the off-screen view.

[0129] It is understandable that when the root view of the screen-off application is added to the window management service, the screen-off application also adds an entity including the layout parameters of the screen-off view and the related methods of the video application to the window management service. The related methods of the video application may include a drawing (do frame) method, so that the window management service can call the related methods of the video application to trigger the process corresponding to the related methods of the video application.

[0130] S306: The screen-off application draws a screen-off image.

[0131] Exemplarily, when the root view of the off-screen application is added to the window management service, the window management service can call the drawing (do frame) method of the off-screen application to trigger (or start) a process including drawing and rendering. When the root view of the off-screen application is not visible, the off-screen application executes the process to draw the first frame of the off-screen image. The off-screen application does not render the drawn off-screen image, nor does it transmit the image drawn by the off-screen application (or the off-screen image) to the synthesis module.

[0132] During the process of the electronic device executing steps S304-S306, the electronic device may receive a fingerprint unlocking operation in which the user touches the power button with a fingerprint. In response to the fingerprint unlocking operation, the electronic device may execute steps S308-S311.

[0133] S307: The lock screen service receives third information indicating a fingerprint unlocking operation.

[0134] Exemplarily, during the execution of step S306, the lock screen service may receive third information indicating a fingerprint unlocking operation.

[0135] The specific implementation principle of this step can be found in Figure 2The specific implementation principle of step S208 in the embodiment will not be repeated here.

[0136] S308. Based on the third information, the lock screen service transmits fourth information indicating controlling the display screen to light up to the power management service.

[0137] Exemplarily, the lock screen service may call a quick screen on / off method to transmit the fourth information to the power management service.

[0138] S309: The power management service transmits information indicating that the display screen is in an on state to the display screen driver.

[0139] When receiving the information indicating that the display screen is controlled to be in the turned-on state, the display screen driver controls the display screen to be in power consumption mode 2.

[0140] S310. When the lock screen service receives information indicating successful fingerprint identification, the lock screen service transmits information indicating successful fingerprint identification to the power management service.

[0141] The specific implementation principle of this step can be found in Figure 2 The specific implementation principle of step S211 in the embodiment will not be repeated here.

[0142] S311. The power management service transmits information indicating the backlight to the display screen driver, and the display screen driver controls the display screen to power on to light up the display screen.

[0143] In a possible implementation, in order to display the system application desktop in a timely manner, the synthesis module of the electronic device will store the system application desktop transmitted by the desktop application and the wallpaper transmitted by the wallpaper application, and the stored system application desktop will not be cleared due to the desktop application exiting the foreground, and the stored wallpaper will not be cleared due to the wallpaper application exiting the foreground.

[0144] When the electronic device is unlocked and the display is lit, the desktop application can run in the foreground. When the system application desktop changes, the desktop application can transmit the latest system application desktop to the synthesis module, and the synthesis module stores the latest system application desktop transmitted by the desktop application. Changes in the system application desktop include changes in the time of the status bar. The latest system application desktop is the system application desktop after the time of the status bar changes. It should be understood that each time the synthesis module receives an image transmitted by an application, it will synthesize the received and stored images to obtain a synthesized image, and transmit the synthesized image to the display driver so that the display can update the displayed image.

[0145] Since it takes a long time for the off-screen application to draw and render the off-screen image, the off-screen application may not have completed the drawing of the first frame of the off-screen image when the display screen is turned on. When fingerprint recognition is successful and the synthesis module has not received the off-screen image transmitted by the off-screen application, the synthesis module can perform image synthesis on the stored system application desktop and wallpaper to obtain a first synthesized image that is a superposition of a layer containing the system application desktop and a layer containing the wallpaper. The image contained in the topmost layer of the first synthesized image is the system application desktop. The synthesis module can transmit the first synthesized image to the display driver, and the display driver transmits the first synthesized image to the display. When the display screen is turned on, the system application desktop contained in the topmost layer of the first synthesized image can be displayed.

[0146] When the electronic device is unlocked successfully, regardless of whether the off-screen application completes the process including drawing and rendering, the off-screen application will not transmit the off-screen image to the synthesis module. In this way, the display screen will not display the off-screen image, and the display screen can display the system application desktop. When the display screen displays the system application desktop, the display screen will not flash black frames.

[0147] It is understandable that when the power management service transmits information to the display driver indicating that the control display is in the on state, the power management service can transmit information to the screen-off application indicating the destruction of the screen-off display, and the screen-off application clears the root view of the screen-off application to clear the processes related to the screen-off application that have not been executed. In this way, the ineffective power consumption of the electronic device can be reduced. For example, when the screen-off application clears the root view of the screen-off application, and the screen-off application completes the process corresponding to the drawing of the first frame of the screen-off image, the screen-off application will not draw the next frame of the screen-off image.

[0148] When the window management service detects that the root view of the screen-off application managed by it is cleared, the window management service transmits information indicating clearing the screen-off image to the synthesis module. When the synthesis module receives the information indicating clearing the screen-off image and does not receive the image transmitted by the screen-off application, the synthesis module may not process it.

[0149] Figure 4 A scene diagram showing an electronic device receiving a fingerprint unlocking operation after a power button provided in an embodiment of the present application is pressed is shown.

[0150] like Figure 4 As shown in a of FIG. 1 , a power button 101 is provided on the side of the electronic device, and a fingerprint recognition area is provided on the power button 101. When the screen of the electronic device is on, the electronic device can display Figure 4 The interface shown in a. Figure 4 The contents of the interface shown in a can be found in Figure 1 The contents of the interface shown in a are not repeated here.

[0151] Display on electronic devices Figure 4 In the case of the interface shown in a, the user can press the power button 101, and the electronic device can turn off the screen and display Figure 4 The interface shown in b. Figure 4 The contents of the interface shown in b can be found in Figure 1 The contents of the interface shown in b will not be repeated here.

[0152] When the electronic device turns off the screen and displays Figure 4 In the case of the interface shown in b in FIG. 1 , the user can use the fingerprint to touch the power button 101. When receiving the operation of the fingerprint touching the power button 101, the electronic device can perform fingerprint recognition. If the fingerprint recognition is successful, the electronic device is unlocked, and the electronic device can display Figure 4 The interface shown in c in the figure will be displayed, and the screen off image will not flash. Figure 4 The contents of the interface shown in c can be found in Figure 1 The contents of the interface shown in c will not be repeated here.

[0153] like Figure 3 and Figure 4 As shown in the embodiment, when the screen of the electronic device is on, after the power button is pressed and the electronic device receives a fingerprint unlocking operation, the off-screen application sets the root view to be invisible before adding the root view to the window management service, so that the off-screen application only draws the off-screen image without rendering it, and does not transmit the drawn off-screen image to the synthesis module. In this way, the off-screen image will not flash after the electronic device is successfully unlocked and the system application desktop is displayed.

[0154] In a possible implementation, the system application desktop stored in the synthesis module can be cleared because the desktop application exits the foreground, and the wallpaper stored in the synthesis module will not be cleared because the wallpaper application exits the foreground. When the wallpaper application is running in the foreground and the wallpaper application changes, it can also transmit the latest wallpaper (or the changed wallpaper) to the synthesis module, and the synthesis module stores the latest wallpaper transmitted by the wallpaper application. The change in wallpaper can be caused by the user replacing the wallpaper. When the screen of the electronic device is on, in the scenario where the power button is pressed and the electronic device receives a fingerprint unlocking operation, the electronic device will not flash an off-screen image after the wallpaper is successfully unlocked and displayed. Among them, the specific implementation principle of the electronic device not flashing an off-screen image after the wallpaper is successfully unlocked and displayed is similar to the above. Figure 3 The specific implementation principle of the electronic device shown in the embodiment not flashing an off-screen image after successfully unlocking the system application desktop is similar and will not be repeated here.

[0155] It can be understood that the electronic device in the embodiments of the present application may include a handheld device, a vehicle-mounted device, etc. with an image processing function. For example, some electronic devices are: mobile phones, tablet computers, PDAs, laptop computers, mobile internet devices (MIDs), wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in industrial control, wireless terminals in self driving, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, cellular phones, cordless phones, session initiation protocol (SIP) phones, wireless local loop (WLL) stations, personal digital assistants (PDAs), handheld devices with wireless communication capabilities, computing devices or other processing devices connected to wireless modems, vehicle-mounted devices (such as vehicle computers), wearable devices, terminal devices in 5G networks or future evolved public land mobile communication networks (public land mobile The embodiments of the present application do not limit this.

[0156] To facilitate the understanding of electronic equipment, Figure 5 A schematic structural diagram of an electronic device 100 provided in an embodiment of the present application is shown.

[0157] like Figure 5As shown, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a fingerprint sensor 180H. The electronic device 100 may also include a power button. The power button is not shown. Figure 5 Shown in.

[0158] When the display screen of the electronic device 100 is on, the user may press the power button. The processor 110 may control the display screen to power off and turn off the screen through the power management module 141. Figure 5 As shown in . The processor 110 can execute the step of setting the root view of the off-screen application to be invisible. When the display screen of the electronic device 100 is off, if the electronic device 100 receives an operation of a fingerprint touching the fingerprint recognition area of ​​the power button. The fingerprint sensor 180H can collect fingerprints. The processor 110 can perform fingerprint recognition on the fingerprint collected by the fingerprint sensor 180H. If the fingerprint recognition is successful, the processor 110 can power on the display screen through the power management module 141. The display screen is lit and can display the system application desktop without flashing the off-screen image.

[0159] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0160] Combine the following Figure 6 , explaining the software architecture and module interaction of electronic devices. Figure 6 Another module interaction flow chart provided in an embodiment of the present application is shown.

[0161] like Figure 6 As shown, the software architecture of the electronic device may include an application framework layer, an application layer, and a kernel layer. The electronic device may also include a hardware layer. The software architecture of the electronic device may also refer to Fig. 9For ease of understanding, Fig. 9 The embodiments are described later.

[0162] The application framework layer may include power management services, window management services, fingerprint framework, lock screen services, display services, and synthesis modules. The application layer may include screen-off applications. The kernel layer may include display drivers. The hardware layer may include power buttons and display screens. The display screen may be a liquid crystal display (LCD) or an organic light-emitting diode (OLED) display screen.

[0163] Figure 6 The module interaction process shown in S601-S621 describes the module interaction process in a scenario where the electronic device receives a fingerprint unlocking operation after the power button is pressed while the screen of the electronic device is on. Figure 6 The module interaction process shown in S601-S609 and S622 in the figure describes the module interaction process in a scenario where the electronic device does not receive a fingerprint unlocking operation after the power button is pressed when the screen of the electronic device is on. Figure 6 The module interaction processes in these two scenarios are explained respectively.

[0164] For example, when the screen of the electronic device is on and the power button is pressed and the electronic device receives a fingerprint unlocking operation, the module interaction process may include:

[0165] S601: The power management service may receive a key event indicating that a power key is pressed.

[0166] The specific implementation of this step can be found in Figure 3 The specific implementation method of S301 in will not be repeated here.

[0167] S602: The power management service may transmit first information to the synthesis module.

[0168] The first information may be information indicating that a display screen of the electronic device is in a turned-off state.

[0169] S603: Based on the first information, the synthesis module may transmit second information to the display screen driver.

[0170] The second information is information indicating that the display screen is in the first power consumption mode. The first power consumption mode is the power consumption mode before the display screen is powered off, for example, the first power consumption mode is the power consumption mode when the display screen has completed the preparation work for powering off and has not been powered off. The first power consumption mode may be power consumption mode 0.

[0171] Exemplarily, the synthesis module may call the setPowermode_0 method to transmit the second information to the display screen driver.

[0172] S604: When receiving the second information, the display screen driver can control the display screen to be in the first power consumption mode. When the display screen is in the first power consumption mode, the display screen driver can control the display screen to be powered off and in a screen-off state.

[0173] The electronic device receives an operation indicating that the power button is pressed, which may indicate that the user has no intention to use the electronic device. By transmitting the second information to the display driver, the display driver can control the first power consumption mode of the display based on the second information, and also control the display to be powered off and in a screen-off state, thereby reducing the power consumption of the electronic device and reducing the probability of the occurrence of a short battery life of the electronic device.

[0174] S605: Based on the first information, the synthesis module may also transmit second information to the display module.

[0175] Exemplarily, the synthesis module may call a method for switching to the first power consumption mode (setPowermode_0: switch to OFF) to transmit the second information to the display screen driver.

[0176] When the screen-off application registers for monitoring with the display module, each time the display module receives the second information transmitted by the synthesis module, the display module can maintain the identifier indicating the state of the display screen as an identifier indicating that the display screen is in the first power consumption mode, and transmit information indicating that the display screen is in the first power consumption mode to the screen-off application.

[0177] In this way, the screen-off application can obtain information indicating the latest status of the display screen in a timely manner when the status of the display screen changes.

[0178] S606: The power management service may start a screen-off application.

[0179] Optionally, step S606 and step S602 may be performed concurrently. Step S606 and step S602 may be performed sequentially. For example, the power management service may perform step S602 and then perform step S606. The power management service may also perform step S606 and then perform step S602.

[0180] S606 and S602 are executed concurrently, or the power management service can execute S606 after executing step S602, so that the electronic device screen can be turned off as soon as possible to reduce power consumption. The power management service executes S602 after executing step S606, so that the screen-off application can complete the relevant process as soon as possible, so that the electronic device can display the screen-off image as soon as possible, which can improve the user experience.

[0181] S607: Initialize the screen-off application and set the root view of the screen-off application to be invisible.

[0182] S608: The screen-off application adds the root view of the screen-off application to the window management service.

[0183] S609: The screen-off application draws a screen-off image.

[0184] For the specific implementation of steps S606-S609, please refer to Figure 3 The specific implementation method of S303-S306 in will not be repeated here.

[0185] During the process of the electronic device executing steps S607-S609, the electronic device may receive a fingerprint unlocking operation. In response to the fingerprint unlocking operation, the electronic device may execute steps S610-S621.

[0186] S610: The fingerprint framework receives a fingerprint event transmitted by the kernel layer of the electronic device.

[0187] S611. The fingerprint framework transmits third information indicating a fingerprint unlocking operation to the lock screen service.

[0188] For the specific implementation of S610-S611, please refer to Figure 3 The specific implementation method of S307 in the embodiment will not be repeated here.

[0189] S612. Based on the third information, the lock screen service transmits fourth information indicating control of lighting up the display screen to the power management service.

[0190] The specific implementation of this step can be found in Figure 3 The specific implementation method of S308 in the embodiment will not be repeated here.

[0191] S613: Based on the fourth information, the power management service transmits fifth information to the synthesis module.

[0192] The fifth information is information indicating that the display screen of the electronic device is in the on state.

[0193] S614: Based on the fifth information, the synthesis module transmits sixth information to the display screen driver.

[0194] The sixth information is information indicating that the display screen is controlled to be in the second power consumption mode. The power consumption of the display screen in the second power consumption mode is greater than the power consumption of the display screen in the screen off state. The second power consumption mode may be power consumption mode 2.

[0195] Exemplarily, the synthesis module may call the setPowermode_2 method to transmit the sixth information to the display screen driver.

[0196] The display driver can control the display to be in the second power consumption mode. In this way, when the fingerprint recognition of the electronic device is successful, the display can be quickly powered on and lit up, and the system application desktop can be displayed in time, so that the user can perform subsequent operations in a timely manner.

[0197] S615: Based on the fifth information, the synthesis module may transmit sixth information to the display module.

[0198] Exemplarily, the synthesis module may call the setPowermode_2: switch ON method to transmit the sixth information to the display module.

[0199] The specific implementation principle and technical effect of this step are similar to those of S605 and will not be repeated here.

[0200] S616. Based on the fourth information, the power management service transmits seventh information indicating destruction of the off-screen display to the screen-off application.

[0201] Exemplarily, based on the fourth information, the power management service can call the stopDream(:destroy AOD) method to transmit the seventh information indicating the destruction of the off-screen display to the off-screen application. It can be understood that the startDream(:pull up AOD) method and the stopDream(:destroy AOD) method are both methods of the power management service.

[0202] When the screen-off application receives the seventh information, the screen-off application clears the root view of the screen-off application. In this way, the processes related to the screen-off application that have not been executed can be cleared, thereby reducing the invalid power consumption of the electronic device.

[0203] Optionally, step S616 and step S613 may be performed concurrently. Step S616 and step S613 may be performed sequentially. For example, the power management service may perform step S613 and then perform step S616. The power management service may also perform step S616 and then perform step S613.

[0204] S616 and S613 are executed concurrently, or the power management service executes S616 after executing step S613, so that the electronic device can be placed in power consumption mode 2 as soon as possible, so that the display screen can be lit in time when the fingerprint recognition is successful. The power management service executes S613 after executing step S616, so that the screen-off application can clear the root view of the screen-off application as soon as possible, reducing invalid power consumption.

[0205] S617: The fingerprint framework transmits eighth information indicating successful fingerprint identification to the lock screen service. Successful fingerprint identification may also be referred to as successful fingerprint unlocking.

[0206] For example, when the fingerprint framework receives a fingerprint event, the fingerprint framework may perform fingerprint recognition on the fingerprint collected by the electronic device. Alternatively, in response to an unlocking operation of fingerprint unlocking, the fingerprint framework performs fingerprint recognition.

[0207] If the fingerprint recognition is successful, the fingerprint framework may transmit the eighth information indicating the success of the fingerprint recognition to the lock screen service, and the lock screen service executes step S618.

[0208] If the fingerprint recognition is unsuccessful, the fingerprint framework can transmit the seventeenth information indicating that the fingerprint recognition is unsuccessful to the lock screen service, and the lock screen service can transmit the seventeenth information to the power management service. When the power management service receives the seventeenth information, the power service can execute step S602, so that the probability of the electronic device's battery life being short can be reduced.

[0209] S618. The lock screen service transmits the eighth information to the power management service.

[0210] S619: Based on the eighth information, the power management service transmits ninth information indicating the lower backlight to the display screen driver, wherein the ninth information includes a first value indicating the brightness of the display screen, which may be a bright screen brightness value.

[0211] S620: The display screen driver controls the display screen to power on, and controls the brightness of the display screen to a first value, so as to light up the display screen.

[0212] Since the synthesis module of the electronic device can store the system application desktop transmitted by the desktop application and the wallpaper transmitted by the wallpaper application, and the stored system application desktop will not be cleared due to the desktop application exiting the foreground, the stored wallpaper will not be cleared due to the wallpaper application exiting the foreground.

[0213] When the synthesis module transmits the sixth information to the display screen driver, the synthesis module can synthesize the stored system application desktop and wallpaper to obtain a first synthesized image. The synthesis module can transmit the first synthesized image to the display screen driver, and the display screen driver transmits the first synthesized image to the display screen. When the display screen is lit, the system application desktop can be displayed.

[0214] Optionally, when the display screen driver lights up the display screen, the display screen driver can obtain the composite image of the most recent image synthesis from the synthesis module, transmit the obtained composite image to the display screen, and the display screen displays the composite image.

[0215] S621. When the lock screen service receives the eighth information, the lock screen service exits.

[0216] Exemplarily, when receiving the eighth information, the lock screen service transmits information to the lock screen application to destroy the lock screen display, and the lock screen service exits to stop running. Wherein, the lock screen application is started by the lock screen service when the lock screen service receives the third information.

[0217] Upon receiving the eighth information, the lock screen service transmits information to destroy the lock screen display to the lock screen application. The lock screen application can clear the root view of the lock screen application when initialization is completed so as not to add the root view of the lock screen application to the window management service. In this way, the lock screen application will not draw the image of the lock screen application to reduce the power consumption of the electronic device.

[0218] In the embodiment shown in S601-S621, when the screen of the electronic device is on, in a scenario where the electronic device receives a fingerprint unlocking operation after the power button is pressed, the screen-off application sets the root view before adding the root view to the window management service. When the root view of the screen-off application is invisible, the screen-off application will not transmit the screen-off image to the synthesis module, that is, the screen-off application will not display the screen-off image. In this way, when the screen of the electronic device is off and the screen-off application executes a process including drawing and rendering, if the electronic device is unlocked successfully, the display screen can display the system application desktop, and there will be no phenomenon of flashing a frame of the screen-off image.

[0219] In a possible implementation, the system application desktop stored in the synthesis module can be cleared because the desktop application exits the foreground, and the wallpaper stored in the synthesis module will not be cleared because the wallpaper application exits the foreground. When the electronic device screen is on, in the scenario where the electronic device receives a fingerprint unlocking operation after the power button is pressed, the electronic device will not flash an off-screen image after the wallpaper is successfully unlocked and displayed. The specific implementation principle of the electronic device not flashing an off-screen image after the wallpaper is successfully unlocked is similar to the specific implementation principle of the embodiments shown in S601-S621, and will not be repeated here.

[0220] Exemplarily, in a scenario where the electronic device has a screen on and does not receive a fingerprint unlocking operation after the power button is pressed, the module interaction process may include: S601-S609 and S622.

[0221] Among them, S601-S609 are as shown above and will not be repeated here.

[0222] S622: When the screen-off application completes drawing the first frame of the image and does not receive information indicating the destruction of the screen-off display, the screen-off application can set the root view of the screen-off application to be visible to display the screen-off image.

[0223] For example, when the screen-off application sets the root view of the screen-off application to be visible, and the window management service identifies that the root view of the screen-off application has changed (or the root view has become visible), the window management service can trigger the process including drawing and rendering again. When the root view of the screen-off application is visible, the screen-off application executes the process to draw and render the screen-off image.

[0224] The screen-off application transmits the first frame of the screen-off image drawn and rendered to the synthesis module. The synthesis module synthesizes the screen-off image transmitted by the screen-off application, the stored system application desktop and wallpaper, and obtains a second synthesized image by superimposing a layer containing the system application desktop, a layer containing the wallpaper, and a layer containing the first frame of the screen-off image. Among them, the image contained in the topmost layer of the second synthesized image is the screen-off image.

[0225] The synthesis module drives the transmission of the second synthesized image to the display screen so that the screen-off image contained in the second synthesized image is displayed after the display screen is powered on.

[0226] When the screen-off application transmits the drawn and rendered first frame of the screen-off image to the synthesis module, the screen-off application may transmit fourteenth information representing the backlight display to the power management service.

[0227] Based on the fourteenth information, the power management service transmits fifteenth information indicating the lower backlight to the display screen driver, wherein the fifteenth information includes a second value indicating the brightness of the display screen.

[0228] When the display screen driver receives the fifteenth information, the display screen driver can control the display screen to be powered on, and control the brightness of the display screen to be a second value. The brightness corresponding to the second value is less than the brightness when the electronic device is in a bright screen state. The brightness when the electronic device is in a bright screen state can be a bright screen brightness value.

[0229] When the display screen driver receives the fifteenth information, the display screen driver transmits the second composite image to the display screen, and the display screen displays the screen-off image contained in the uppermost layer of the second composite image.

[0230] In the embodiments shown in S601-S609 and S622, when the screen of the electronic device is on and the electronic device does not receive a fingerprint unlocking operation after the power button is pressed, the root view is set to invisible before the off-screen application adds the root view to the window management service to reduce the probability of the off-screen view flashing after the electronic device is unlocked and the system application desktop is displayed. When the off-screen application completes drawing the first frame of the off-screen image and the off-screen application does not receive the seventh information indicating the destruction of the off-screen display, the root view of the off-screen application is set to visible. In this way, the off-screen application can draw and render the off-screen image and transmit the drawn and rendered off-screen image to the synthesis module. The synthesis module synthesizes the received off-screen image with the stored system application desktop and wallpaper to obtain a second synthesized image. When the display screen is on, the off-screen image contained in the topmost layer of the second synthesized image is displayed.

[0231] For the scenario where the electronic device does not receive the fingerprint unlocking operation after the power button is pressed when the screen is on, Figure 7 Another module interaction flow chart provided in an embodiment of the present application is shown.

[0232] like Figure 7 As shown, in the scenario where the electronic device does not receive a fingerprint unlocking operation after the power button is pressed when the screen of the electronic device is on, the module interaction process may include:

[0233] S701. The power management service may receive a key event.

[0234] The specific implementation of this step can be found in Figure 6 The specific implementation of S601 in the embodiment will not be described in detail here.

[0235] S702: The power management service starts the screen-off application.

[0236] The specific implementation of this step can be found in Figure 6 The specific implementation of S606 in the embodiment will not be described in detail here.

[0237] S703: The screen-off application creates a view of the screen-off application and sets the layer of the screen-off application to be invisible.

[0238] For example, when the screen-off application is started, the screen-off application may execute the following steps: Figure 6 S607-S609 in the embodiment is to create a view of the screen-off application, and complete setting the layer of the screen-off application to be invisible.

[0239] S704: When the power management service starts the screen-off application, the power management service may transmit information indicating mode switching preparation to the screen-off application.

[0240] For example, when the power management service receives a key event, the electronic device may execute the following steps: Figure 6 S602-S605 in the embodiment realizes turning off the display screen. When the power management service starts the screen-off application, the power management service can call the mode switching preparation (onDreamingStart) method to transmit information indicating the mode switching preparation to the screen-off application, thereby instructing the screen-off application to prepare for the mode switching. The screen-off application's mode switching preparation may include setting the trigger frequency of the screen-off application triggering the process including drawing and rendering, so that when the display screen displays the screen-off image, the screen-off application draws and renders the screen-off image according to the trigger frequency, and transmits the drawn and rendered screen-off image to the synthesis module, so that the display screen updates the displayed screen-off image according to the trigger frequency. The trigger frequency may be triggered once per second.

[0241] It is understandable that in Figure 6 In the embodiment shown in S601-S621 of FIG. 1 , since the off-screen application receives information indicating the destruction of the off-screen display during the drawing of the off-screen image, the off-screen application will clear the root view of the off-screen application, resulting in the unexecuted processes related to the off-screen application being cleared. The unexecuted processes related to the off-screen application include the processes to which steps S704-S714 in this embodiment belong. Therefore, in Figure 6 In the embodiment shown in S601-S621, the electronic device will not execute the steps shown in S704-S714.

[0242] S705: When the screen-off application completes mode switching preparation, the screen-off application may transmit tenth information indicating switching of power consumption mode to the power management service. The tenth information may be information indicating that the mode switching preparation of the screen-off application is completed.

[0243] S706. Based on the tenth information, the power management service transmits the eleventh information to the synthesis module.

[0244] Among them, the eleventh information is information indicating that the display screen of the electronic device being controlled is in a sleep state.

[0245] S707: Based on the eleventh information, the synthesis module may transmit the twelfth information to the display screen driver.

[0246] The twelfth information is information indicating that the display screen is in the third power consumption mode. The power consumption of the display screen in the third power consumption mode is greater than the power consumption of the display screen in the screen-off state, and the power consumption of the display screen in the third power consumption mode is less than the power consumption of the display screen in the screen-on state. The third power consumption mode may be power consumption mode 1.

[0247] S708: When the display screen driver receives the twelfth information, the display screen driver controls the display screen to be in the third power consumption mode.

[0248] S709: Based on the eleventh information, the synthesis module may also transmit twelfth information to the display module.

[0249] S710. The display module transmits thirteenth information indicating that the display screen is in the third power consumption mode to the screen-off application.

[0250] Exemplarily, when the display module receives the twelfth information, the display module may maintain the identifier representing the display screen state as an identifier indicating that the display screen is in the third power consumption mode, and transmit the thirteenth information indicating that the display screen is in the third power consumption mode to the screen-off application.

[0251] S711. When the screen-off application receives the thirteenth information, the screen-off application may set the root view of the screen-off application to be visible, and complete the display of the first frame of the screen-off image.

[0252] The specific implementation principle of this step can be found in Figure 6 The specific implementation principle of S622 in the embodiment will not be repeated here.

[0253] Among them, setting the root view of the off-screen application to be visible, then the views of the off-screen application subordinate to the root view are also visible. Off-screen application Setting the root view of the off-screen application to be visible can be understood as setting the layer of the off-screen application to be visible.

[0254] It is understandable that in the scenario where the electronic device receives the operation of pressing the power button but does not receive the fingerprint unlocking operation, when the screen-off application completes the drawing of the first frame image, the screen-off application will not receive the seventh information indicating the destruction of the screen-off display. In this way, when the screen-off application completes the drawing of the first frame image and the screen-off application does not receive the seventh information indicating the destruction of the screen-off display, the root view of the screen-off application is set to be visible, so as to realize the display of the screen-off image.

[0255] S712: When the screen-off application sets the root view of the screen-off application to be visible, the screen-off application may transmit fourteenth information indicating the backlight display to the power management service.

[0256] S713: Based on the fourteenth information, the power management service may transmit fifteenth information indicating the lower backlight to the display screen driver.

[0257] The fifteenth information includes a second value indicating the brightness of the display screen. The brightness corresponding to the second value is less than the brightness of the display screen in the bright screen state.

[0258] S714: When the fifteenth information is received, the display screen driver controls the display screen to be powered on, and controls the brightness of the display screen to be a second value.

[0259] It should be understood that the display screen driver controls the brightness of the display screen to be the second value, which means that the display screen is lit.

[0260] When the display screen brightness is the second value, the display screen displays the second composite image transmitted by the display screen driver. The image of the topmost layer of the second composite image is the screen-off image drawn and rendered by the screen-off application. In this way, the display screen displays the screen-off image.

[0261] For example, an implementation of setting the root view of the off-screen application to be visible and then lighting up the display screen can be seen in the following pseudo code:

[0262] If(true){

[0263] / / Set the root layout to be visible

[0264] rootView.post(()->{

[0265] if(rootView!=null){

[0266] rootView.setVisibility(View.VISIBLE);

[0267] }

[0268] });

[0269] }

[0270] / / First time backlighting

[0271] setFirstBrightness();

[0272] Wherein, If(true) indicates if the fingerprint setting mode of the electronic device is the side fingerprint mode. rootView.post(() indicates the next root view. if(rootView!=null) indicates if the root view is not empty. rootView.setVisibility(View.VISIBLE) indicates setting the root view to be visible. setFirstBrightness() may indicate the first time the backlight is turned off, or may indicate lighting up the display screen.

[0273] In this embodiment, when the screen of the electronic device is on and the electronic device does not receive a fingerprint unlocking operation after the power button is pressed, the root view of the off-screen application is set to invisible before the root view is added to the window management service to reduce the probability of a black frame flashing after the electronic device is unlocked and the system application desktop is displayed. When the off-screen application completes drawing the first frame of the off-screen image, the off-screen application does not receive the seventh information indicating the destruction of the off-screen display, and the display screen is in the third power consumption mode, the root view of the off-screen application is set to visible. When the root view of the off-screen application is visible, the off-screen application can draw and render the off-screen image, and transmit the drawn and rendered off-screen image to the synthesis module, so that the synthesis module synthesizes the received off-screen image with the stored system application desktop and wallpaper to obtain a second synthesized image, so that the off-screen image contained in the topmost layer of the second synthesized image can be displayed when the display screen is on.

[0274] Figure 8 A scene diagram is shown in which the electronic device does not receive a fingerprint unlocking operation after the power button provided in an embodiment of the present application is pressed.

[0275] When the screen of the electronic device is on, the electronic device can display Figure 8 The interface shown in a. Figure 8 The contents of the interface shown in a can be found in Figure 1 The contents of the interface shown in a are not repeated here.

[0276] Display on electronic devices Figure 8 In the case of the interface shown in a in FIG. 1 , the user can press the power button 101, the electronic device can turn off the screen, and the electronic device displays Figure 8 The interface shown in b can be displayed Figure 8 The interface shown in c. Figure 8 The contents of the interface shown in b can be found in Figure 1 The content of the interface shown in b, Figure 8 The contents of the interface shown in c can be found in Figure 1 The contents of the interface shown in d will not be repeated here.

[0277] In this embodiment, in a scenario where no fingerprint unlocking operation is received after the power button of the electronic device is pressed while the screen is on, in response to the operation of pressing the power button of the electronic device, the screen of the electronic device is turned off, and the electronic device displays Figure 8 The interface shown in b can be displayed Figure 8 The screen-off image shown in c in FIG.

[0278] Fig. 9 A block diagram related to a software architecture of an electronic device provided in an embodiment of the present application is shown.

[0279] like Fig. 9 As shown, the software of electronic devices can be divided into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. The software architecture of electronic devices can be divided into application layer, application framework layer and kernel layer from top to bottom.

[0280] The application layer can include a series of application packages, including camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, screen-off application, desktop application, system service (systemserver) or theme applications. Fig. 9 A portion of the application is shown.

[0281] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.

[0282] The application framework layer may include window management services, content providers, view systems, phone managers, resource managers, notification managers, synthesis modules, power management services, fingerprint frameworks, dream services, or sensor management, among which some are in Fig. 9 Shown in.

[0283] The window management service can also be used to manage window programs. The window management service can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.

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

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

[0286] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, input driver, fingerprint driver, camera driver, audio driver or sensor driver.

[0287] The hardware layer may include a display screen, a power button, a proximity light sensor or an ambient light sensor, etc. Among them, a fingerprint recognition area may be provided on the power button.

[0288] Combine the following Fig. 9, exemplarily illustrating the workflow of the electronic device software and hardware in a scenario where the electronic device receives a fingerprint unlocking operation after the power button is pressed.

[0289] like Fig. 9 As shown, in the scenario where the electronic device receives a fingerprint unlocking operation after the power button is pressed, the workflow of software and hardware includes:

[0290] S901: The interruption of the power key being pressed is transmitted to the input driver. Pressing the power key may be referred to as a key operation.

[0291] S902: The input driver transmits a screen-off request to the power management service.

[0292] Exemplarily, the input driver may transmit a key event indicating that the power key is pressed to the power management service, thereby transmitting a screen-off request to the power management service.

[0293] S903: The power management service transmits information to the display screen driver indicating that the display screen of the electronic device is in a turned-off state.

[0294] Among them, the information indicating that the display screen of the electronic device is in the off state may include the screen off brightness value.

[0295] S904. When receiving information indicating that the display screen of the electronic device is in the off state, the display screen driver controls the brightness of the display screen to the screen-off brightness value, controls the display screen to be in power consumption mode 0, and controls the display screen to be powered off and in the screen-off state.

[0296] The specific implementation principle of steps S901-S904 can also be found in Figure 6 The specific implementation principles of S601-S604 in the embodiment are not repeated here.

[0297] S905: When a key event is received, the power management service starts a screen-off application.

[0298] S906. Initialize the screen-off application, set the root view of the screen-off application to be invisible, and add the root view to the window management service.

[0299] For the specific implementation principle of S905-S906, please refer to Figure 6 The specific implementation principles of S606-S609 in the embodiment are not repeated here.

[0300] S907: The fingerprint driver receives an interrupt indicating a fingerprint touch.

[0301] S908: The fingerprint driver transmits the fingerprint event to the fingerprint framework.

[0302] When a fingerprint event is received, the fingerprint framework obtains the fingerprint collected in the fingerprint recognition area through the fingerprint driver and performs fingerprint recognition.

[0303] S909: When the fingerprint recognition is successful, the fingerprint framework transmits information indicating the fingerprint recognition is successful and information indicating that the display screen is controlled to light up to the power management service.

[0304] The specific implementation principle of this step can be found in Figure 6 The specific implementation principles of S611 - S612 in the embodiment will not be repeated here.

[0305] S910. The power management service transmits information indicating lighting up the display screen to the display screen driver.

[0306] The information about lighting up the display screen includes the brightness value of the screen. For example, Figure 6 The first value in the embodiment.

[0307] The specific implementation principle of this step can be found in Figure 6 The specific implementation principles of S613-S619 in the embodiment will not be repeated here.

[0308] S911. The display screen driver controls the display screen to power on and controls the display screen brightness to a bright screen brightness value.

[0309] The specific implementation principle of this step can be found in Figure 6 The specific implementation principle of S620 in the embodiment will not be repeated here.

[0310] In this way, as shown in the embodiments of S901-S911, when the screen of the electronic device is on, in a scenario where the electronic device receives a fingerprint unlocking operation after receiving an operation of pressing the power button, the screen-off application can set the root view of the screen-off application to be invisible during the initialization process. In this way, when the screen of the electronic device is off and the screen-off application executes a process including drawing and rendering, if the electronic device is unlocked successfully, the display screen can display the system application desktop, and there will be no flashing of a frame of the screen-off image.

[0311] Recombination Fig. 9 , exemplifying the workflow of the electronic device software and hardware in a scenario where the electronic device does not receive a fingerprint unlocking operation after the power button is pressed.

[0312] like Fig. 9 As shown, in the scenario where the electronic device receives a fingerprint unlocking operation after the power button is pressed, the software and hardware workflows include: S901-S906 and S912-S913.

[0313] The specific implementation principles of S901-S906 are as shown above and will not be repeated here. S912-S913 are as follows:

[0314] S912: When the root view of the screen-off application is visible, the screen-off application transmits the drawn and rendered screen-off image to the synthesis module.

[0315] It is understandable that after step S906 and before step S912, the off-screen application can set the root view to be visible. Figure 7 The specific implementation principles of S704-S711 in the embodiment are not repeated here.

[0316] S913. The synthesis module performs image synthesis on the screen-off image transmitted by the screen-off application to obtain a second synthesized image.

[0317] Exemplarily, the synthesis module performs image synthesis on the off-screen image transmitted by the off-screen application, the stored system application desktop and wallpaper to obtain a second synthesized image.

[0318] The synthesis module transmits the second synthesized image to the display screen driver. The display screen driver controls the display screen to power on and controls the display screen brightness to a second value, and the display screen displays the off-screen image contained in the topmost layer of the second synthesized image.

[0319] The specific implementation principle of powering on the display screen and controlling the brightness of the display screen to the second value can be found in Figure 7 The specific implementation principle of S712-S714 in the embodiment will not be described in detail here. The synthesized image can also be called a layer to be displayed.

[0320] As shown in the embodiments of S901-S911, in a scenario where no fingerprint unlocking operation is received after the power button is pressed when the screen of the electronic device is on, after the screen-off application completes drawing the first frame of the screen-off image, the screen-off application does not receive the seventh information indicating destruction of the screen-off display, and the display screen is in the third power consumption mode, the root view of the screen-off application is set to be visible. When the root view of the screen-off application is visible, the screen-off application can draw and render the screen-off image, and transmit the drawn and rendered screen-off image to the synthesis module. The synthesis module synthesizes the received screen-off image to obtain a second synthesized image. The second synthesized image can be displayed when the display screen is on, so as to realize the display of the screen-off image.

[0321] The embodiment of the present application also provides a display method, the method comprising: in a screen-on state of an electronic device, in response to pressing a power button of the electronic device at a first moment, the screen of the electronic device is turned off. After the first moment, the view of the screen-off application is not visible. In response to an unlocking operation at a second moment, the electronic device displays a first interface, the first interface being an interface indicating that the display screen of the electronic device has been unlocked.

[0322] Among them, the operation of pressing the power button of the electronic device can be Figure 2 Example - Figure 7 The operation corresponding to the key event in any of the embodiments. The unlock operation can be Figure 2 Example - Figure 7 The operation corresponding to the fingerprint event in any of the embodiments.

[0323] For example, at the first moment, in response to the operation of pressing the power button of the electronic device, the specific implementation principle of turning off the screen of the electronic device can be seen in Figure 3 The specific implementation principle of S302 in the embodiment or Figure 2 The specific implementation principle of S202 in the embodiment, the first moment can be Figure 3 In the embodiment, S302 or Figure 2 In the embodiment, S202 is the moment when the display screen driver controls the display screen to be powered off and in the off-screen state. After the first moment, the specific implementation principle of the view of the off-screen application is invisible can be found in Figure 3 The specific implementation principle of S304 in the embodiment. At the second moment, in response to the unlocking operation, the electronic device displays the first interface. Figure 3 The specific implementation principle of the embodiment that the display screen can display the system application desktop when it is lit. The second moment can be the moment when the display screen is lit and the system application desktop is displayed. The first interface can be the system application desktop.

[0324] For example, at the first moment, in response to the operation of pressing the power button of the electronic device, the specific implementation principle of turning off the screen of the electronic device can be seen in Figure 6 The specific implementation principle of S604 in the embodiment, the first moment can be Figure 6 The display screen driver shown in S604 in the embodiment controls the moment when the display screen is powered off and is in the off-screen state. After the first moment, the view of the off-screen application is invisible. For the specific implementation principle, see Figure 6 The specific implementation principle of S607 in the embodiment. At the second moment, in response to the unlocking operation, the electronic device displays the first interface. Figure 6 The specific implementation principle of the embodiment that the display screen can display the system application desktop when it is lit. The second moment can be the moment when the display screen is lit and the system application desktop is displayed. The first interface can be the system application desktop.

[0325] In this embodiment, the fingerprint recognition area can be set on the power button. For the scenario where the fingerprint recognition area is set on the power button, please refer to Figure 1 , Figure 4 or Fig. 9 Embodiment. Optionally, the power button and the fingerprint recognition area can be located at different positions on the electronic device. For example, the power button is located on the side of the electronic device, and the fingerprint recognition area is located at any position on the back of the electronic device. The back of the electronic device can be understood as the surface opposite to the display screen of the electronic device, or the back of the electronic device can be understood as the surface where the rear camera of the electronic device is located. In the case where the user uses both hands to operate the electronic device, a scenario may occur in which the electronic device receives a fingerprint unlocking operation after the power button is pressed but before the screen-off application has completed drawing the screen-off image.

[0326] It is understandable that the first interface can also be a wallpaper.

[0327] In this way, when the screen of the electronic device is on, in the scenario where the electronic device receives a fingerprint unlocking operation after the power button is pressed, the screen-off application can set the root view of the screen-off application to be invisible. When the root view of the screen-off application is invisible, the screen-off application will not transmit the screen-off image to the synthesis module, that is, the screen-off image will not be displayed. In this way, when the screen of the electronic device is off, if the electronic device is unlocked successfully, the display screen can display the system application desktop or wallpaper, and there will be no flashing of a frame of the screen-off image, and there will be no flashing of a black frame after displaying the system application desktop or wallpaper.

[0328] Optionally, the display method provided in the embodiment of the present application further includes:

[0329] At the third moment, in response to the operation of pressing the power button, the electronic device turns off the screen. Between the second moment and the third moment, the electronic device is in the screen-on state. After the third moment, the view of the screen-off application is not visible. At the fourth moment, the view of the screen-off application is visible, and the electronic device displays the second interface. The second interface includes the screen-off image.

[0330] For example, at the third moment, in response to the operation of pressing the power button, the specific implementation principle of the electronic device turning off the screen can be found in Figure 6 The specific implementation principle of S604 in the embodiment. The third moment can be the electronic device referring to Figure 6 In the implementation principle shown in S604 of the embodiment, the display screen driver controls the moment when the display screen is powered off and is in the off state. The time period between the second moment and the third moment can be from when the electronic device presses Figure 6 The implementation principle of S620 in the embodiment is to light up the display screen and display the system application desktop at the beginning of the electronic device reference time Figure 6In the implementation principle shown in S604 of the embodiment, the display screen driver controls the time period when the display screen is powered off and is in the off state. After the third moment, the view of the off-screen application is invisible. For the specific implementation principle, see Figure 7 At the fourth moment, the view of the off-screen application is visible, and the specific implementation principle of the electronic device displaying the second interface can be found in Figure 7 In the embodiment shown, when the display screen brightness is the second value, the display screen displays the second composite image driven and transmitted by the display screen, realizing the implementation principle of the display screen displaying the off-screen image. The fourth moment may be the moment when the display screen displays the second composite image.

[0331] Among them, the specific implementation principle of making the view of the off-screen application visible can be found in Figure 7 Specific implementation principle of S711 in the embodiment. The second interface includes a screen-off image. It should be understood that the screen-off interface includes a screen-off image, so the second interface can also be a screen-off interface.

[0332] For example, the third moment may be when the electronic device displays Figure 8 The fourth moment may be when the electronic device displays the interface shown in b. Figure 8 The moment of the interface shown in c.

[0333] In this way, in a scenario where the power button is pressed and no fingerprint unlocking operation is received when the screen of the electronic device is on, the view of the off-screen application is first invisible and then visible. When the view of the off-screen application is invisible, if the electronic device is unlocked, the system application desktop can be displayed without flashing a black frame. When it is determined that the user has no intention to use the electronic device, the electronic device can control the view of the off-screen application to be visible. When the view of the off-screen application is visible, the off-screen application can draw and render the off-screen image, and transmit the drawn and rendered off-screen image to the synthesis module to display the off-screen image.

[0334] Optionally, after the view of the off-screen application is invisible, the method further includes: when the off-screen application completes drawing of the first frame image and the off-screen application has not received the seventh information indicating destruction of the off-screen display, setting the root view of the off-screen application to be visible.

[0335] For example, the electronic device refers to Figure 7 Specific implementation principle of S703 in the embodiment After setting the root view of the off-screen application to be invisible, when the off-screen application does not receive the seventh information indicating the destruction of the off-screen display and the drawing of the off-screen image of the off-screen application is completed, the electronic device may execute Figure 7 In the embodiment, the root view of the screen-off application set as shown in S711 is visible.

[0336] Optionally, the electronic device may also perform Figure 7 Steps S704-S711 in the embodiment are to set the root view of the off-screen application to be visible when the off-screen application completes drawing the first frame image and the off-screen application has not received the seventh information indicating destruction of the off-screen display.

[0337] In this way, the off-screen application can draw and render the off-screen image, and transmit the drawn and rendered off-screen image to the synthesis module, so that the synthesis module can synthesize the received off-screen image and the stored system application desktop and wallpaper to obtain a second synthesized image, so that the off-screen image contained in the topmost layer of the second synthesized image can be displayed when the display screen is lit.

[0338] Optionally, the electronic device includes a synthesis module, a power management service, a display module and a display screen driver.

[0339] Before setting the root view of the off-screen application to be visible, the method also includes:

[0340] The screen-off application transmits information indicating switching of power consumption mode to the power management service.

[0341] Based on the tenth information, the power management service transmits the eleventh information to the synthesis module. The eleventh information is information indicating that the display screen of the electronic device is in a sleep state.

[0342] Based on the eleventh information, the synthesis module transmits the twelfth information to the display screen drive and the display module respectively. The twelfth information is information indicating that the display screen is controlled to be in the third power consumption mode. The power consumption of the display screen in the third power consumption mode is greater than the power consumption of the display screen in the off state, and the power consumption of the display screen in the third power consumption mode is less than the power consumption of the display screen in the on state.

[0343] The display screen driver controls the display screen to be in the third power consumption mode, and the display module transmits thirteenth information indicating that the display screen is in the third power consumption mode to the screen-off application.

[0344] Wherein, based on the eleventh information, the specific implementation principle of the synthesis module transmitting the twelfth information to the display screen driver and the display module respectively can be seen in Figure 7 The specific implementation principle of S707 and S709 in the embodiment.

[0345] The specific implementation principle of the display driver controlling the display to be in the third power consumption mode, and the display module transmitting the thirteenth information indicating that the display is in the third power consumption mode to the screen-off application can be found in Figure 7 The specific implementation principle of S708 and S710 in the embodiment.

[0346] In this way, the display screen can be prepared for lighting up while reducing the power consumption of the electronic device, so that the display screen can be powered on and lit up in time when the fifteenth information indicating the lower backlight is received.

[0347] Optionally, after setting the root view of the screen-off application to be visible, the method further includes:

[0348] The screen-off application transmits fourteenth information indicating the backlight display to the power management service.

[0349] Based on the fourteenth information, the power management service transmits the fifteenth information indicating the lower backlight to the display screen driver. The fifteenth information includes a second value indicating the brightness of the display screen. The brightness corresponding to the second value is less than the brightness of the display screen in the bright screen state.

[0350] The display screen driver controls the display screen to power on, and controls the brightness of the display screen to a second value.

[0351] The electronic device displays a second interface, including:

[0352] The display screen displays the image synthesized by the synthesis module, and the synthesized image includes the image drawn and rendered by the off-screen application.

[0353] Exemplarily, the image synthesized by the synthesis module may be a synthesized image obtained after the synthesis module synthesizes images, for example Figure 7 The second composite image in the embodiment: The image of the topmost layer of the second composite image is the screen-off image drawn and rendered by the screen-off application.

[0354] In this way, in a scenario where no fingerprint unlocking operation is received after the power button is pressed when the screen of the electronic device is on, the electronic device displays an off-screen image.

[0355] The display method of the embodiment of the present application has been described above, and the device for executing the above display method provided by the embodiment of the present application is described below. Those skilled in the art can understand that the method and the device can be combined and referenced with each other, and the relevant device provided by the embodiment of the present application can execute the steps in the above display method.

[0356] The display method provided in the embodiment of the present application can be applied to electronic devices with communication functions. The electronic devices include terminal devices, and the specific device form of the terminal devices can refer to the above related descriptions, which will not be repeated here.

[0357] An embodiment of the present application provides an electronic device, which includes: a processor and a memory; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, so that the electronic device executes the above method.

[0358] The embodiment of the present application provides a chip. The chip includes a processor, and the processor is used to call a computer program in a memory to execute the technical solution in the above embodiment. Its implementation principle and technical effect are similar to those of the above related embodiments, and will not be repeated here.

[0359] The embodiments of the present application also provide a computer-readable storage medium. The computer-readable storage medium stores a computer program. The above method is implemented when the computer program is executed by the processor. The method described in the above embodiment can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. If implemented in software, the function can be stored as one or more instructions or codes on a computer-readable medium or transmitted on a computer-readable medium. Computer-readable media can include computer storage media and communication media, and can also include any medium that can transfer a computer program from one place to another. The storage medium can be any target medium that can be accessed by a computer.

[0360] In one possible implementation, a computer-readable medium may include RAM, ROM, compact disc read-only memory (CD-ROM) or other optical disk storage, disk storage or other magnetic storage devices, or any other medium that is intended to carry or store the required program code in the form of instructions or data structures and can be accessed by a computer. Moreover, any connection is appropriately referred to as a computer-readable medium. For example, if a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL) or wireless technology (such as infrared, radio and microwave) is used to transmit software from a website, server or other remote source, the coaxial cable, fiber optic cable, twisted pair, DSL or wireless technology such as infrared, radio and microwave are included in the definition of medium. Disks and optical disks as used herein include optical disks, laser disks, optical disks, digital versatile disks (DVD), floppy disks and Blu-ray disks, where disks usually reproduce data magnetically, while optical disks reproduce data optically using lasers. Combinations of the above should also be included in the scope of computer-readable media.

[0361] An embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed, the computer executes the above method.

[0362] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable device to generate a machine, so that the instructions executed by the processing unit of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0363] The above specific implementation methods further illustrate the purpose, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific implementation methods of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solutions of the present invention should be included in the scope of protection of the present invention.

Claims

1. A display method, characterized in that: include: The electronic device is in a screen-on state, and at a first moment, in response to pressing the power button of the electronic device, the screen of the electronic device is turned off; After the first moment, the view of the screen-off application is not visible; At a second moment, in response to an unlocking operation, the electronic device displays a first interface, where the first interface is an interface indicating that the display screen of the electronic device has been unlocked; In response to an operation of pressing a power key of the electronic device, the method further includes: Set the root view of the screen-off application to be invisible; The electronic device includes a synthesis module, and the synthesis module is used to synthesize and display the image transmitted by the application; When the root view of the screen-off application is not visible, the screen-off application does not transmit the image drawn by the screen-off application to the synthesis module.

2. The method according to claim 1, characterized in that: The electronic device includes a power management service, a synthesis module and a display screen driver; In response to an operation of pressing a power key of the electronic device, the method further includes: The power management service transmits first information to the synthesis module; the first information is information indicating that the display screen of the electronic device is controlled to be in a closed state; Based on the first information, the synthesis module transmits second information to the display screen driver; the second information is information indicating that the display screen is controlled to be in a first power consumption mode; the first power consumption mode is a power consumption mode before the display screen is powered off; The display screen driver controls the display screen to be in the first power consumption mode; The display screen driver controls the display screen to power off and be in a screen-off state.

3. The method according to claim 2, characterized in that The electronic device further comprises a window management service, wherein the window management service is used to manage views added to the window management service by an application; In response to an operation of pressing a power key of the electronic device, the method further includes: The power management service starts the screen-off application; The screen-off application is initialized and the root view of the screen-off application is set to be invisible, and the view of the screen-off application is added to the window management service; The window management service starts a process including drawing and rendering, and the screen-off application executes the process to draw the first frame image.

4. The method according to any one of claims 1 to 3, characterized in that The electronic device includes a fingerprint framework, a lock screen service, a power management service, a synthesis module and a display screen driver; In response to the unlocking operation, the method further includes: The fingerprint framework transmits third information indicating a fingerprint unlocking operation to the lock screen service; Based on the third information, the lock screen service transmits fourth information indicating controlling the display screen of the electronic device to light up to the power management service; Based on the fourth information, the power management service transmits fifth information to the synthesis module; the fifth information is information indicating that the display screen of the electronic device is in an on state; Based on the fifth information, the synthesis module transmits sixth information to the display screen driver; the sixth information is information indicating that the display screen is controlled to be in a second power consumption mode, and the power consumption of the display screen in the second power consumption mode is greater than the power consumption of the display screen in a screen-off state; The display screen driver controls the display screen to be in the second power consumption mode.

5. The method according to claim 4, characterized in that After the lock screen service transmits fourth information indicating control of lighting a display screen of the electronic device to the power management service, the method further includes: Based on the fourth information, the power management service transmits seventh information indicating destruction of the off-screen display to the off-screen application; The screen-off application clears the root view of the screen-off application.

6. The method according to claim 5, characterized in that In response to the unlocking operation, the method further includes: The fingerprint framework performs fingerprint recognition; The fingerprint framework transmits eighth information indicating successful fingerprint recognition to the lock screen service; The lock screen service transmits the eighth information to the power management service, and the lock screen service exits; Based on the eighth information, the power management service transmits ninth information representing the lower backlight to the display screen driver; the ninth information includes a first value representing the brightness of the display screen; The display screen driver controls the display screen to power on, and controls the brightness of the display screen to be the first value.

7. The method according to any one of claims 1-3, 5-6, characterized in that: Also includes: At a third moment, in response to an operation of pressing the power button, the electronic device turns off the screen; Between the second moment and the third moment, the electronic device is in a screen-on state; After the third moment, the view of the screen-off application is not visible; At the fourth moment, the view of the screen-off application is visible, and the electronic device displays a second interface; the second interface includes a screen-off image.

8. The method according to claim 7, characterized in that After the view of the screen-off application is no longer visible, the method further includes: When the screen-off application completes drawing of the first frame image and the screen-off application has not received the seventh information indicating destruction of the screen-off display, the root view of the screen-off application is set to be visible.

9. The method according to claim 8, characterized in that The electronic device includes a synthesis module, a power management service, a display module and a display screen driver; Before setting the root view of the screen-off application to be visible, the method further includes: The screen-off application transmits tenth information indicating switching of power consumption mode to the power management service; Based on the tenth information, the power management service transmits an eleventh information to the synthesis module; the eleventh information is information indicating that the display screen of the electronic device is in a sleep state; Based on the eleventh information, the synthesis module transmits twelfth information to the display screen driver and the display module respectively; the twelfth information is information indicating that the display screen is controlled to be in a third power consumption mode; the power consumption of the display screen in the third power consumption mode is greater than the power consumption of the display screen in a screen-off state, and the power consumption of the display screen in the third power consumption mode is less than the power consumption of the display screen in a screen-on state; The display screen driver controls the display screen to be in the third power consumption mode, and the display module transmits thirteenth information indicating that the display screen is in the third power consumption mode to the screen-off application.

10. The method according to claim 9, characterized in that After setting the root view of the screen-off application to be visible, the method further includes: The screen-off application transmits fourteenth information indicating lower backlight display to the power management service; Based on the fourteenth information, the power management service transmits fifteenth information indicating the lower backlight to the display screen driver; the fifteenth information includes a second value indicating the brightness of the display screen; the brightness corresponding to the second value is less than the brightness of the display screen in the bright screen state; The display screen driver controls the display screen to power on, and controls the brightness of the display screen to be the second value; The electronic device displays a second interface, including: The display screen displays the image synthesized by the synthesis module, and the synthesized image includes the image drawn and rendered by the off-screen application.

11. The method according to any one of claims 1-3, 5-6, 8-10, characterized in that: A fingerprint recognition area is provided on the power button.

12. An electronic device, characterized in that: include: Processor and memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the electronic device performs the method according to any one of claims 1 to 11.

13. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 11 is implemented.

14. A computer program product, characterized in that The invention comprises a computer program, which, when being executed, enables a computer to execute the method according to any one of claims 1 to 11.