Screen locking image display method, electronic equipment and readable storage medium
By implementing a lock screen image display method that responds to bright screen operations in electronic devices, using the combination of foreground and background images, the problem of displaying depth of field lock screen images after bright screen is solved, and a personalized lock screen display method is realized, improving the User experience.
Patent Information
- Application Number
- CN202310972725.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-03
- Publication Date
- 2025-02-14
AI Technical Summary
In electronic devices, how to ensure the depth of field lock screen image is displayed after the screen is bright, especially when the magazine lock screen function is turned on.
By implementing a method of displaying a lock screen image in an electronic device, in response to the screen-deactivate and brighten the screen, the combination of foreground image and background image is used to ensure that the depth of field lock screen image is displayed in the lock screen interface and during sliding operation Switch to the adjacent magazine lock screen image.
It realizes the fixed display of the target depth of field lock screen image after each light-up, providing a personalized lock screen display method, improving the user experience.
Smart Images

Figure CN119440357A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal technology, and in particular to a method for displaying a lock screen image, an electronic device, and a readable storage medium. Background Art
[0002] The lock screen image is an image displayed in the lock screen interface. For example, when the electronic device is set with a lock screen password, the lock screen image is displayed in the lock screen interface when the electronic device turns off the screen and then turns on the screen again. With the rapid development of terminal technology, the display methods of the lock screen images of electronic devices are becoming more and more diverse, for example, including but not limited to static lock screen images, dynamic lock screen images, magazine lock screen images, etc. Summary of the invention
[0003] The present application provides a lock screen image display method, an electronic device, and a readable storage medium, which can solve the problem of how to ensure that the depth of field lock screen image is displayed after the screen is turned on when the electronic device uses a depth of field lock screen image and the magazine lock screen function is turned on. The technical solution is as follows:
[0004] In a first aspect, a method for displaying a lock screen image is provided, which is applied to an electronic device, wherein a magazine lock screen function is enabled in the electronic device, and the method comprises:
[0005] In response to the screen-off operation, the electronic device enters a screen-off state;
[0006] The electronic device receives a first screen-lighting operation;
[0007] In response to the first screen-lighting operation, the electronic device applies a depth-of-field lock screen image as a lock screen image;
[0008] In response to the first screen-lighting operation, the electronic device displays a target depth-of-field lock screen image of the current application in the lock screen interface, wherein the depth-of-field lock screen image includes a foreground image and a background image, and when the depth-of-field lock screen image is displayed in the lock screen interface, the foreground image is displayed in an upper layer of a layer where a system time indicator in the lock screen interface is located and partially blocks the system time indicator;
[0009] In response to a horizontal sliding operation in the lock screen interface, the electronic device displays a magazine lock screen image adjacent to the target depth of field lock screen image.
[0010] In this way, the electronic device will display the target depth of field lock screen image every time the screen is turned on again, which provides a personalized lock screen display method, thereby improving the user experience.
[0011] As an example of the present application, in response to the first screen-lighting operation, the electronic device displays a target depth-of-field lock screen image of the current application in the lock screen interface, including:
[0012] In response to the first screen-lighting operation, the electronic device queries whether a depth-of-field lock screen image is currently applied as a lock screen image;
[0013] In a case where the electronic device currently applies a depth of field lock screen image as a lock screen image, the electronic device displays the target depth of field lock screen image currently applied in the lock screen interface.
[0014] In this way, when the first screen-lighting operation is received, it is first queried whether the depth-of-field lock screen image is currently applied, and if it is determined that the depth-of-field lock screen image is applied, the applied target depth-of-field lock screen image is displayed in the lock screen interface, providing a personalized lock screen image display method and improving the user experience.
[0015] As an example of the present application, the lock screen interface also includes at least one of a notification bar, a system status bar and a function control. The layer where the notification bar is displayed is located at the top layer of the lock screen interface, the layer where the system status bar is located is between the layer where the background image is located and the layer where the system time indicator is located, the layer where the function control is located is above the layer where the foreground image is located, and the function control is a control of the function of any application.
[0016] In this way, the layer where the system status bar is located is set between the layer where the background image is located and the layer where the system time indicator is located, thereby avoiding the system status bar from blocking other interface elements in the lock screen interface. By displaying at least one function control on the upper layer of the image body, the user can trigger the function control to implement the function of the corresponding application without entering the desktop, thereby improving human-computer interactivity.
[0017] As an example of the present application, in response to the screen-off operation, before the electronic device enters the screen-off state, the process further includes:
[0018] The electronic device receives a lock screen image setting operation;
[0019] In response to the lock screen image setting operation, the electronic device sets the original image selected in the lock screen image setting operation as the target depth of field lock screen image, the original image is an image belonging to a depth of field image theme or an image in the gallery of the electronic device, and the depth of field image theme is an image theme in the electronic device.
[0020] In this way, by providing users with different channels for setting depth of field lock screen images, users can set different types of depth of field lock screen images according to their needs, enriching the way of setting depth of field lock screen images.
[0021] As an example of the present application, in response to the first screen-lighting operation, the electronic device displays a target depth-of-field lock screen image of the current application in the lock screen interface, including:
[0022] In response to the first screen lighting operation, the electronic device controls the screen to light up;
[0023] The electronic device displays a first view through a background view page component on the lock screen interface, and displays a second view through a foreground view page component, wherein a background image of the target depth-of-field lock screen image is rendered in the first view, and a foreground image of the target depth-of-field lock screen image is rendered in the second view;
[0024] The background view page component and the foreground view page component synchronously respond to the sliding operation in the lock screen interface. In this way, hand tracking can be achieved when the user slides the lock screen interface.
[0025] As an example of the present application, in response to the first screen lighting operation, before the electronic device controls the screen to light up, the method further includes:
[0026] In response to a screen-off operation of the electronic device, the electronic device obtains first detail information of the target depth-of-field lock screen image from a magazine lock screen data list, the magazine lock screen data list including detail information of each lock screen image in a plurality of lock screen images, the plurality of lock screen images including a plurality of magazine lock screen images and the target depth-of-field lock screen image, the first detail information being added to the magazine lock screen data list when the target depth-of-field lock screen image is applied;
[0027] The electronic device determines, according to the first detail information and the first indication information, a foreground image of the target depth-of-field lock screen image, wherein the first indication information is used to indicate that the lock screen image currently applied by the electronic device is a depth-of-field lock screen image, and the first indication information is recorded when the target depth-of-field lock screen image is applied;
[0028] The electronic device obtains the background image of the target depth-of-field lock screen image from the first detailed information;
[0029] The electronic device renders the background image of the target depth of field lock screen image into the first view in the background view page component, and renders the foreground image of the target depth of field lock screen image into the second view in the foreground view page component.
[0030] In this way, when the screen of the electronic device is off, the background image of the target depth of field lock screen image is rendered in advance into the background view page component, and the foreground image of the target depth of field lock screen image is rendered in advance into the foreground view page component, so that after the screen of the electronic device is turned on, the background image and the foreground image can be directly displayed through the background view page component and the foreground view page component respectively, thereby achieving the effect of displaying the target depth of field lock screen image.
[0031] As an example of the present application, the first detail information includes first index information, where the first index information is used to indicate the type of the target depth of field lock screen image;
[0032] The electronic device determines, according to the first detail information and the first indication information, a foreground image of the target depth-of-field lock screen image, including:
[0033] When the first indication information indicates that the electronic device is currently applying a depth of field lock screen image, and the first index information indicates that the target depth of field lock screen image is a depth of field lock screen image, the electronic device obtains the foreground image of the target depth of field lock screen image from a first designated directory, and the first designated directory is used to store foreground images of depth of field lock screen images.
[0034] In this way, according to the first detail information and the first indication information, the foreground image of the target depth of field lock screen image is obtained from the first specified directory, so that the foreground image can be rendered into the foreground view page component.
[0035] As an example of the present application, the electronic device renders the background image of the target depth of field lock screen image to the first view in the background view page component, and renders the foreground image of the target depth of field lock screen image to the second view in the foreground view page component, including:
[0036] The electronic device renders the background image included in the first detail information into the first view, and records a correspondence between the view identifier of the first view and the first index information;
[0037] The electronic device renders the foreground image of the target depth-of-field lock screen image into the second view, and records the correspondence between the view identifier of the second view and the first index information.
[0038] In this way, by recording the mapping relationship between the first view and the first index information, and recording the mapping relationship between the second view and the first index information, when the user slides the lock screen interface, the detailed information of the next or previous lock screen image can be found based on the mapping relationship and added to the foreground view page component and the background view page component.
[0039] As an example of the present application, the method further includes:
[0040] The electronic device obtains, from the magazine lock screen data list, second detailed information of a previous magazine lock screen image of the target depth of field lock screen image and third detailed information of a next magazine lock screen image of the target depth of field lock screen image;
[0041] The electronic device renders the background thumbnail of the previous magazine lock screen image into a previous view adjacent to the first view in the background view page component based on the second detail information, and renders the background thumbnail of the next magazine lock screen image into a next view adjacent to the first view in the background view page component based on the third detail information;
[0042] The electronic device records in the foreground view page component that the foreground image of the previous magazine lock screen image is empty, and that the foreground image of the next magazine lock screen image is empty.
[0043] In this way, by loading the foreground image and background image of the adjacent lock screen image of the target depth of field lock screen image in advance, the user's sliding operation can be responded to in time when the user slides the lock screen interface to display the next or previous lock screen image.
[0044] As an example of the present application, in response to the first screen-lighting operation, before the electronic device displays the target depth-of-field lock screen image of the current application in the lock screen interface, the electronic device further includes:
[0045] In response to a lock screen image setting operation on the target depth of field lock screen image, the electronic device modifies the original index information of the target depth of field lock screen image into first index information, so that the first index information is used to indicate the type of the target depth of field lock screen image, and the type of the target depth of field lock screen image includes a theme depth of field lock screen image and a custom depth of field lock screen image;
[0046] The electronic device obtains a background image of the target depth-of-field lock screen image;
[0047] The electronic device encapsulates the background image of the target depth-of-field lock screen image and the first index information into the first detailed information;
[0048] The electronic device adds the first detail information to the magazine lock screen data list and records the first indication information.
[0049] In this way, when the target depth of field lock screen image is set, by encapsulating the relevant data of the target lock screen image and adding it to the magazine lock screen data list, it is equivalent to adding the target depth of field lock screen image to the magazine lock screen resource, so that when the target depth of field lock screen image needs to be displayed in the future, the relevant data of the target depth of field lock screen image can be obtained from the magazine lock screen data list, so as to display the target depth of field lock screen image, and after the user slides, the previous magazine lock screen image or the next magazine lock screen image of the target depth of field lock screen image can be displayed according to the magazine lock screen data fence.
[0050] As an example of the present application, the electronic device adds the first detail information to the magazine lock screen data list, including:
[0051] In the case where the target depth of field lock screen image is a theme depth of field lock screen image, if the magazine lock screen data list contains detailed information of a custom depth of field lock screen image set last time, the detailed information of the custom depth of field lock screen image set last time is replaced with the first detailed information, the theme depth of field lock screen image is an image belonging to a depth of field image theme, the depth of field image theme is an image theme in the electronic device, and the custom depth of field lock screen image is an image set from a gallery of the electronic device;
[0052] When the target depth-of-field lock screen image is the custom depth-of-field lock screen image, the first detail information is inserted into any position in the magazine lock screen data list.
[0053] In this way, when the target depth of field lock screen image is a custom depth of field lock screen image, by directly inserting the custom depth of field lock screen image into the magazine lock screen data list, in the subsequent process of displaying the lock screen image, when the theme depth of field lock screen image is displayed, the theme depth of field lock screen image can still be displayed as an ordinary lock screen image, that is, the custom depth of field lock screen image has a depth of field effect, and the theme depth of field lock screen image does not have a depth of field effect, enriching the display form of the lock screen image.
[0054] As an example of the present application, when the target depth of field lock screen image is the custom depth of field lock screen image, the first indication information is 0; when the target depth of field lock screen image is the theme depth of field lock screen image, the first indication information is 3.
[0055] In this way, by marking different types of depth of field lock screen images, it is possible to determine which type of depth of field lock screen image is currently set based on the first marked information, so as to correctly display the target depth of field lock screen image.
[0056] As an example of the present application, in response to the first screen-lighting operation, after the electronic device displays the target depth-of-field lock screen image of the current application in the lock screen interface, the further comprises:
[0057] In a case where the target depth-of-field lock screen image is a custom depth-of-field lock screen image, receiving a user lock operation on the target depth-of-field lock screen image, wherein the custom depth-of-field lock screen image is an image set from a gallery of the electronic device;
[0058] In response to the user locking operation, the target depth-of-field lock screen image is set as a locked lock screen image, where the locked lock screen image is a lock screen image displayed after the screen is turned on based on the user locking operation marked.
[0059] In this way, when the target depth of field lock screen image is a custom depth of field lock screen image, the target depth of field lock screen image can be locked so that the target depth of field lock screen image is fixedly displayed after the screen is turned on, thereby improving the user experience.
[0060] As an example of the present application, in response to the first screen-lighting operation, the electronic device displays a target depth-of-field lock screen image of the current application in the lock screen interface, including:
[0061] If there is no locked lock screen image, then in response to the first screen light operation, the electronic device displays the target depth of field lock screen image in the lock screen interface, and the locked lock screen image is a lock screen image displayed after the screen is lighted based on the user's lock operation.
[0062] In this way, by judging whether there is a locked lock screen image, and displaying the target depth of field lock screen image after the screen is turned on when it is determined that there is no locked lock screen image, otherwise, the target depth of field lock screen image is not displayed after the screen is turned on, but the locked lock screen image is displayed, thereby better meeting the actual needs of users.
[0063] As an example of the present application, the magazine lock screen function is enabled in the electronic device, and the method further includes:
[0064] The electronic device receives a second screen-lighting operation, wherein the electronic device does not apply a depth-of-field lock screen image as a lock screen image;
[0065] In response to the second screen-lighting operation, the electronic device displays a target lock screen image in a lock screen interface, where the target lock screen image is any magazine lock screen image.
[0066] In this way, when the depth of field lock screen image is not set as the lock screen image, after the screen is turned on, the electronic device will randomly select a magazine lock screen image to display. It can be seen that when the depth of field lock screen image is set, a personalized lock screen display method is provided.
[0067] In a second aspect, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in the first aspect when executing the computer program.
[0068] In a third aspect, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is executed on a computer, the computer executes the method for displaying a lock screen image described in the first aspect.
[0069] In a fourth aspect, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the method for displaying a lock screen image as described in the first aspect.
[0070] The technical effects obtained by the above-mentioned second, third, fourth and fifth aspects are similar to the technical effects obtained by the corresponding technical means in the above-mentioned first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] Figure 1 is a schematic diagram of a depth of field lock screen image according to an exemplary embodiment;
[0072] Figure 2 is a schematic diagram showing an application scenario according to an exemplary embodiment;
[0073] Figure 3 is a schematic diagram of an application scenario according to another exemplary embodiment;
[0074] Figure 4 is a schematic diagram of an application scenario according to another exemplary embodiment;
[0075] Figure 5 is a schematic diagram of an application scenario according to another exemplary embodiment;
[0076] Figure 6 is a schematic diagram of an application scenario according to another exemplary embodiment;
[0077] Figure 7 is a framework diagram of a software system of an electronic device according to an exemplary embodiment;
[0078] Figure 8 is a schematic diagram of a frame of displaying a lock screen image according to an exemplary embodiment;
[0079] Fig. 9 is a schematic diagram showing an initialization process according to an exemplary embodiment;
[0080] Fig.10 is a schematic diagram of a process of adding detailed information of a customized depth of field lock screen image to a magazine lock screen data list according to an exemplary embodiment;
[0081] Fig.11 is a schematic diagram of a process of adding detailed information of a theme depth of field lock screen image to a magazine lock screen data list according to an exemplary embodiment;
[0082] Fig.12 is a schematic diagram showing a process of updating a background image in a background view page component according to an exemplary embodiment;
[0083] Fig.13 is a schematic diagram showing a process of updating a foreground image to a foreground view page component according to an exemplary embodiment;
[0084] Fig.14 is a schematic diagram of a method flow for displaying a lock screen image according to an exemplary embodiment;
[0085] Fig.15 is a schematic diagram showing a view relationship according to an exemplary embodiment;
[0086] Fig.16 is a schematic diagram of an application scenario according to another exemplary embodiment;
[0087] Fig.17 is a schematic diagram of a method flow for displaying a lock screen image according to another exemplary embodiment;
[0088] Fig.18 The diagram is a schematic diagram showing the structure of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0089] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.
[0090] It should be understood that the "multiple" mentioned in this application refers to two or more. In the description of this application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in order to facilitate the clear description of the technical solution of this application, the words "first" and "second" are used to distinguish between the same items or similar items with basically the same functions and effects. Those skilled in the art can understand that the words "first" and "second" do not limit the quantity and execution order, and the words "first" and "second" do not limit them to be different.
[0091] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0092] Before introducing in detail the method for displaying a lock screen image provided in an embodiment of the present application, a brief introduction to the custom vocabulary and terms involved in the embodiment of the present application is first given.
[0093] Lock screen interface: refers to the user interface that is first displayed when the electronic device is locked with a password after the system is restarted or the screen is turned on again after being turned off.
[0094] Lock screen image: is the image applied to the lock screen interface. Users can usually set the lock screen image from the theme, or they can customize the lock screen image from the gallery.
[0095] Depth of field lock screen image: refers to an image with depth of field capability (referred to as depth of field image) as the lock screen image. The depth of field image includes a foreground image and a background image. When the depth of field image is displayed in the lock screen interface, the foreground image is displayed above the layer where the system time indicator in the lock screen interface is located, and partially blocks the system time indicator. For example, please refer to Figure 1 , Figure 1 is a schematic diagram of a depth-of-field lock screen image according to an exemplary embodiment, wherein part of the time information is partially blocked by the foreground image (ie, the image subject A).
[0096] Theme: refers to the interface style presented by the electronic device, including but not limited to: desktop images, lock screen images and other content. Users can set their favorite themes in electronic devices. When electronic devices apply different themes, the interface styles presented by the electronic devices are different. Theme-related lock screen images usually include dynamic lock screen images, depth of field lock screen images, etc. Dynamic lock screen images refer to lock screen images with dynamic effects. As an example, the depth of field lock screen image applied from the theme can be referred to as the theme depth of field lock screen image.
[0097] Customized lock screen image: usually refers to an image in the gallery application that is used as the lock screen image. Customized lock screen images usually include customized normal lock screen images and customized depth of field lock screen images. Among them, the customized depth of field lock screen image refers to an image with depth of field capability selected by the user from the gallery application as the lock screen image; the customized normal lock screen image usually refers to an image without depth of field capability, that is, the customized normal lock screen image refers to an ordinary image selected by the user from the gallery application as the lock screen image.
[0098] Magazine lock screen: refers to providing multiple different magazine lock screen images for electronic devices. When the magazine lock screen function is turned on, when the electronic device is in the lock screen state and the screen is on, one of the multiple magazine lock screen images is displayed in the lock screen interface, and when the user slides left or right in the lock screen interface, in response to the user's sliding operation, the electronic device can display the next or previous magazine lock screen image in the lock screen interface. These magazine lock screen images can come from one or more of the local preset resources, cloud resources, or resources manually added by the user.
[0099] In one application scenario, when the electronic device has the magazine lock screen function turned on, the electronic device will randomly display a magazine lock screen image from the magazine lock screen resource after the screen is turned on. For example, if the electronic device is a mobile phone, please refer to Figure 2 In Figure (a), when the magazine lock screen function is turned on on the mobile phone, the magazine lock screen image P1 in the magazine lock screen resource is displayed when the mobile phone screen turns on again after being turned off. Please refer to Figure 2 In Figure (b), the user triggers the phone screen to turn off, and then the user triggers the phone screen to turn on again. Figure 2In Figure (c), the mobile phone displays the magazine lock screen image P2 in the magazine lock screen resource. It can be seen that when the magazine lock screen function is turned on in the mobile phone, each time the screen is turned off and then on, the mobile phone will randomly display a magazine lock screen image in the lock screen interface. However, in a possible application scenario, the user may set a depth of field lock screen image on the basis of turning on the magazine lock screen function. In this case, the user usually needs the mobile phone to display the set depth of field lock screen image when the screen is turned off and then on again. To this end, the embodiment of the present application provides a method for displaying a lock screen image that can meet this demand of users.
[0100] To facilitate understanding, several exemplary application scenarios involved in the embodiments of the present application are introduced below.
[0101] Please refer to Figure 3 , Figure 3 is a schematic diagram of an application scenario according to an exemplary embodiment. In a possible application scenario, based on the magazine lock screen function of the mobile phone, if the user wants the mobile phone to display a depth of field lock screen image in the lock screen interface, the depth of field image setting can be performed through the theme application. Figure 3 In Figure (a), the user can click on the application identifier of the setting application; the mobile phone responds to the click operation on the application identifier of the setting application by displaying the following Figure 3 In the setting interface S1 shown in FIG. (b), the user can click the "wallpaper" option in the setting interface S1; in response to the click operation on the "wallpaper" option, the mobile phone displays the following Figure 3 The wallpaper setting interface S2 shown in FIG. (c) in FIG. 1 shows the type of lock screen image options, such as the "wallpaper" option (which is usually an option for a static lock screen image), the "theme" option, the "magazine lock screen" option, etc. The user can click the "theme" option. In response to the click operation on the "theme" option, the mobile phone displays the following Figure 3 The theme selection interface S3 shown in FIG. (d) in FIG. 1 displays lock screen images corresponding to different themes. For example, dynamic lock screen images corresponding to dynamic image themes named “Wandering (dynamic)”, “Forest (dynamic)” and “Stars (dynamic)” are displayed, and depth of field images corresponding to depth of field image themes named “People (depth of field)” are displayed. The user can select the depth of field image named “People (depth of field)” as the lock screen image. In response to the selection operation of the depth of field image named “People (depth of field)”, the mobile phone displays the following: Figure 3In the preset theme interface S4 shown in FIG. (e), if the user decides to use the depth-of-field image as the lock screen image, the user clicks the "Apply" option in the preset theme interface S4; in response to the click operation on the "Apply" option, the mobile phone sets the depth-of-field image as the lock screen image; thereafter, when the lock screen interface is displayed after the mobile phone is turned on, the lock screen image displayed in the lock screen interface of the mobile phone is as shown in FIG. Figure 3 As shown in Figure (f) in the figure. That is, even if the magazine lock screen function is turned on, if a theme depth of field lock screen image is set, the theme depth of field lock screen image set is displayed in the lock screen interface after the phone turns on the screen. The theme depth of field lock screen image includes a foreground image, that is, image subject A. Image subject A is on the upper layer of the system time indicator and partially covers the system time indicator. When the user slides the lock screen interface to the left (or right), in response to the user's sliding operation, the phone displays a magazine lock screen image in the magazine lock screen resource, that is, the lock screen image displayed in the lock screen interface after sliding does not have a depth of field effect.
[0102] Optionally, in response to a click operation on the "Apply" option, the mobile phone may also display a setting completion prompt message (not shown in the figure), where the setting completion prompt message is used to prompt the user that the selected depth of field image has been set as the lock screen image.
[0103] Please refer to Figure 4 , Figure 4 is a schematic diagram of an application scenario according to another exemplary embodiment. In another possible application scenario, based on the magazine lock screen function of the mobile phone, the user can also set the depth of field lock screen image in a customized manner. For example, please refer to Figure 4 In (a) of FIG. 1 , the user can click on the application logo of the gallery application; in response to the click operation on the application logo of the gallery application, the mobile phone displays the following Figure 4 The gallery preview interface S5 shown in FIG. (b) in FIG. 1 shows thumbnails of multiple stored images. The user can select one of the thumbnails and set the image corresponding to the selected thumbnail as the lock screen image. For example, the user can long-press the thumbnail of the selected image H. In response to the long-press operation on the thumbnail of image H, the following is displayed: Figure 4 In the editing window S6 shown in FIG. (c), the editing window S6 displays a "Set as wallpaper" option; the user can click the "Set as wallpaper" option, and in response to the click operation on the "Set as wallpaper" option, the mobile phone sets the selected image H as the lock screen image. If the image H is an image with depth of field capability, then when the lock screen interface is displayed after the mobile phone is turned on, the lock screen interface of the mobile phone displays the lock screen image. Figure 4Similarly, even if the magazine lock screen function is turned on, if a custom depth of field lock screen image is set, the custom depth of field lock screen image set is displayed in the lock screen interface after the phone turns on the screen. When the user slides the lock screen interface to the left (or right), in response to the user's sliding operation, the phone displays a lock screen image in the magazine lock screen resource, that is, the lock screen image displayed in the lock screen interface after sliding does not have a depth of field effect.
[0104] It should be noted that, through the above Figure 4 When setting the lock screen image in the manner shown, if the image H is an image with depth of field capability, the mobile phone can automatically display the image H in the lock screen interface in the form of depth of field effect after the screen is turned on, or in a possible implementation, the user can also select the display effect of the image H during the process of setting the lock screen image. For example, see Figure 5 , the phone displays Figure 5 In the case of the editing window S6 shown in FIG. (a), the user clicks the "Set as wallpaper" option; in response to the click operation on the "Set as wallpaper" option, when the image H is an image with depth of field capability, the mobile phone displays the following Figure 5 The display effect selection window S7 shown in FIG. (b) in FIG. 10 can be used to select an image H from the display effect selection window S7 as the display effect when the lock screen image is displayed. If the user clicks the "depth of field effect display" option, then in response to the click operation on the "depth of field effect display" option, the mobile phone can set the selected image H as the lock screen image. Afterwards, when the lock screen interface is displayed after the mobile phone screen is turned on, the lock screen interface of the mobile phone displays the lock screen image as shown in FIG. Figure 5 As shown in Figure (c).
[0105] As an example of the present application, after setting the depth of field lock screen image, the user can also manually trigger the mobile phone to lock the depth of field lock screen image. For example, please refer to Figure 6 In (a) of FIG. 1 , when the mobile phone displays a depth of field lock screen image H (such as a custom depth of field lock screen image or a theme depth of field lock screen image), the mobile phone also displays a setting option 61 in the lock screen interface, and the user can click the setting option 61. Please refer to Figure 6 In Figure (b), in response to the user clicking on the setting option 61, the mobile phone displays the setting window S8 in the lock screen interface. The setting window S8 includes a "Lock" option. The user can select the "Lock" option. In response to the user triggering the "Lock" option, the mobile phone sets the depth of field lock screen image H as the lock screen image. In this way, when the screen is turned on again after being turned off, the mobile phone always displays the depth of field lock screen image H.
[0106] It should be noted that the embodiment of the present application is explained by taking the lock screen image locked by the user as a depth of field lock screen image as an example. In another example, the user can also lock the magazine lock screen image. In this case, the locked magazine lock screen image can be displayed after the mobile phone screen is turned off and on.
[0107] It should be noted that the above description is based on the example that the electronic device is a mobile phone. In another example, the electronic device may also be, but is not limited to, a mobile phone with a folding screen, a sports camera (GoPro), a digital camera, a tablet computer, a desktop, a laptop, a handheld computer, a notebook computer, a vehicle-mounted device, an ultra-mobile personal computer (UMPC), a netbook, etc., which is not limited in the embodiments of the present application.
[0108] Next, the software system architecture of the electronic device is described. The software system of the electronic device can adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Android system with a layered architecture as an example to exemplify the software system of the electronic device.
[0109] Figure 7 is a block diagram of a software system of an electronic device provided in an embodiment of the present application. Figure 7 The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom, namely, the application layer, the application framework layer, the Android runtime (Android runtime) and the system layer, and the kernel layer.
[0110] The application layer can include a series of application packages. Figure 7 As shown, the application layer may include system applications (System UI), theme applications, gallery applications, etc.
[0111] System UI is the first user-visible application during the system startup process of an electronic device, such as the lock screen interface displayed after the electronic device is turned on, and the desktop and status bar displayed after unlocking. System UI is a set of UI components that provide users with system-level information display and interaction, and can be used to control the display of lock screen images and desktop images. In an embodiment of the present application, System UI can be used to interact with a theme application or a gallery application to display the set depth of field lock screen image in the lock screen interface after the screen is turned on when a depth of field lock screen image is applied in the electronic device. In one example, please refer to Figure 7, System UI includes multiple functional modules, including but not limited to static image service module, broadcast monitoring module, lock screen image processing module, lock screen image drawing module, foreground view page component, foreground view adapter, background view page component and background view adapter. The static image service module is used to control the display of static images; the broadcast monitoring module is used to monitor the broadcast message of wallpaper change; the lock screen image processing module is used to determine whether the changed lock screen image is a depth of field lock screen image when the wallpaper is changed, and is also used to control the display of the lock screen image; the lock screen image drawing module is used to notify the view to render the view; the foreground view page component includes multiple views, each view can be used to render the foreground image of the depth of field lock screen image, and the foreground view adapter is used to fill the view in the foreground view page component; the background view page component includes multiple views, each view can be used to render the background image of the depth of field lock screen image, and the background view adapter is used to fill the view in the background view page component. In one example, the foreground view adapter is coupled to the foreground view page component, and the background view adapter is coupled to the background view page component. In another example, the foreground view adapter is decoupled from the foreground view page component, and the background view adapter is decoupled from the background view page component.
[0112] The theme application provides a variety of theme images for users to set as the desktop image or lock screen image of the electronic device. The theme application can be a system built-in application or an installed third-party application.
[0113] The gallery application is used to store images, for example, images can be taken or from the cloud. As an example of the present application, the gallery application includes ordinary images and images with depth of field capabilities. Ordinary images do not have a depth of field effect when applied to the lock screen interface, and images with depth of field capabilities have a depth of field effect when applied to the lock screen interface. Users can select any image from the gallery application and set it as the lock screen image of the electronic device.
[0114] 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.
[0115] As an example of the present application, the application framework layer includes a wallpaper management service module, which is used to send a wallpaper change broadcast message to the System UI when it monitors the notification of the wallpaper change event of the theme application or the gallery application, so that the System UI performs wallpaper change processing. In one example, the wallpaper management service module is named WallpaperManagerService.
[0116] Please refer to Figure 7 The application framework layer also includes a power management service module and a window management service module. The power management service module is used to control the screen to turn off or on when there is a screen off event or screen on event in the electronic device, and send a screen off notification or screen on notification to related modules. The window management service module is responsible for the management of the lock screen interface, such as displaying a lock screen image in the lock screen interface. In an example, the power management service module is named PowerManagerService, and the window management service module is named WindowManagerService.
[0117] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system. The core library consists of two parts: one is the function that the Java language needs to call, and the other is the Android core library. The application layer and the application framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0118] The system library can include multiple functional modules, such as: surface manager, media library, 3D graphics processing library (such as: OpenGL ES), 2D graphics engine (such as: SGL), etc. The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications. The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc. The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing, etc. The 2D graphics engine is a drawing engine for 2D drawing.
[0119] The kernel layer is the layer between hardware and software. The kernel layer contains at least the screen on / off driver, display driver, and camera driver. The screen on / off driver is used to detect the user's trigger operation on the button used to trigger the screen on / off.
[0120] Next, the method for displaying the lock screen image provided in an embodiment of the present application is introduced.
[0121] Please refer to Figure 8 , Figure 8 is a schematic diagram of a framework for displaying a lock screen image according to an exemplary embodiment. In implementation, Figure 3 As shown, users can set a lock screen image from the Themes app, or as Figure 4 As shown, the user can also set the lock screen image from the gallery application. As an example of the present application, no matter which method the user uses to set the lock screen image, when the lock screen image set by the user is a depth of field lock screen image, the foreground image (i.e., the image body) and background image of the set depth of field lock screen image will be stored in the lock screen directory and renamed separately. At most one background image and one foreground image are stored in the lock screen directory, that is, in the process of updating the background image and foreground image in the lock screen directory, the names of the updated foreground image and the updated background image in the lock screen directory remain unchanged. For example, the lock screen directory is data / themes / 0 / wallpaper, the foreground image is named unlock_depth_effect_wallpaper_0.jpg in the lock screen directory, and the background image is named unlock_wallpaper_0.jpg in the lock screen directory.
[0122] In one example, when a user sets a lock screen image from a theme application, after the user selects theme depth of field lock screen image A and applies it, that is, triggers the lock screen image setting operation, the theme application obtains a compressed package of theme depth of field lock screen image A, which includes a foreground image and a background image of theme depth of field lock screen image A, wherein the compressed package may be preset locally on the electronic device or preset in the cloud and obtained by the electronic device. Afterwards, the theme application decompresses the compressed package and stores the decompressed foreground image and background image in the lock screen directory. At the same time, the theme application can send a theme change message to the System UI to enable the System UI to change the layout of the lock screen interface.
[0123] In another example, when the user sets the lock screen image from a gallery application, after the user selects a custom depth of field lock screen image B in a gallery application and applies it, that is, triggers the lock screen image setting operation, the gallery application obtains the foreground image and background image of the pre-stored custom depth of field lock screen image B, and then saves the foreground image and background image of the custom depth of field lock screen image B to the lock screen directory.
[0124] It should be noted that the foreground image and background image of the custom depth of field lock screen image B pre-stored in the image application may be generated by the electronic device when it is idle, or may be generated by the electronic device when it is charging. Exemplarily, in the charging state, the electronic device can traverse the depth of field images in the gallery application, and each time a depth of field image is traversed, if the depth of field image has not been traversed before, the background image and foreground image of the depth of field image currently traversed can be separated by an artificial intelligence (AI) subject recognition method, and then the separated foreground image and background image are stored correspondingly with the depth of field image currently traversed. In this way, when the user sets any depth of field image in the gallery application as the lock screen image, the gallery application can directly save the foreground image and background image of any pre-stored depth of field image to the lock screen directory. In one example, after the user selects a depth of field image in the gallery application to be applied to the lock screen image, the gallery application can also store the background image of the depth of field image in the custom wallpaper frame of the electronic device.
[0125] It should also be noted that the above description is based on the example that the lock screen image set by the user is a depth of field image. In another example, if the lock screen image set by the user is not a depth of field image, the images stored in the lock screen directory only include a background image, which is the set lock screen image itself, that is, in this case, there is no foreground image in the lock screen directory.
[0126] Please continue to refer to Figure 8 After receiving the user's lock screen image setting operation, the theme application or gallery application notifies the wallpaper management service module of the wallpaper change event. After the wallpaper management service module listens to the notification, it sends a wallpaper change broadcast message to the System UI so that the System UI can perform some initialization processing on the display of the lock screen image. For details, please refer to Fig. 9 The initialization processing operations of System UI can include the following:
[0127] Step 901: Receive a wallpaper change broadcast message.
[0128] In one possible case, the wallpaper change broadcast message is sent to the System UI after the wallpaper management service module monitors the wallpaper change event notification sent by the theme application. For example, see Figure 3 After the user sets a theme depth of field lock screen image in the theme application, the theme application notifies the wallpaper management service module of a wallpaper change event, after which the wallpaper management service module sends a wallpaper change broadcast message to the System UI.
[0129] In another possible case, the wallpaper change broadcast message is sent to the System UI after the wallpaper management service module monitors the wallpaper change event notification sent by the gallery application. Figure 4 After the user sets a custom depth of field lock screen image in the gallery application, the gallery application notifies the wallpaper management service module of a wallpaper change event. After that, the wallpaper management service module sends a wallpaper change broadcast message to the System UI.
[0130] As an example of the present application, System UI can receive wallpaper change broadcast messages through a broadcast monitoring module.
[0131] In one example, a wallpaper change broadcast message may carry second indication information, and the second indication information is used to indicate whether the currently set lock screen image is a theme lock screen image or a custom lock screen image. Specifically, since the wallpaper management service module can know whether the wallpaper change event is notified by the theme application or the gallery application, the wallpaper management service module can determine whether the currently set lock screen image is from the theme application or the gallery application. Based on this, when sending a wallpaper change broadcast message to the System UI, the second indication information can be carried in the wallpaper change broadcast message, so that the System UI can determine whether the currently set lock screen image is a theme lock screen image or a custom lock screen image based on the wallpaper change broadcast message. Exemplarily, when the second indication information is a preset identifier, the second indication information is used to indicate that the currently set lock screen image is a custom lock screen image, otherwise, when the second indication information is not a preset identifier, the second indication information is used to indicate that the currently set lock screen image is a theme lock screen image.
[0132] Optionally, the wallpaper change broadcast message may also carry event description information, and the event description information is used to indicate the application object of the wallpaper change, and the application object includes a user interface or a lock screen interface, that is, the event description information is used to indicate whether the desktop image is changed or the lock screen image is changed. The embodiment of the present application is described by taking the example that the event description information is used to indicate that the application object of the wallpaper change is the lock screen interface.
[0133] Step 902: After receiving the wallpaper change broadcast message, determine whether the current system is restarting.
[0134] according to Figure 8 As can be seen from the previous records, after the user sets the lock screen image, System UI will receive a wallpaper change broadcast message. In another possible case, after the electronic device is turned on and restarted, System UI will also receive a wallpaper change broadcast message. For example, the wallpaper management service module can send a wallpaper change broadcast message to System UI when the electronic device is turned on and restarted. For the above two situations, System UI handles them differently. Therefore, after receiving the wallpaper change message, System UI can first determine whether the current system is restarting.
[0135] In one example, the System UI can query whether the electronic device is currently displaying the desktop. If the electronic device is currently displaying the desktop, it is determined that the system has not been restarted. Otherwise, if the electronic device is not currently displaying the desktop, it is determined that the system has been restarted. Further, the System UI can determine whether the electronic device is currently displaying the desktop by querying the restart identifier. For example, when the restart identifier is true, it is determined that the electronic device is currently displaying the desktop, so that it can be determined that the system has not been restarted; when the restart identifier is false, it is determined that the electronic device is not currently displaying the desktop, so that it can be determined that the system has been restarted.
[0136] If it is determined that the current system is not restarting, the process proceeds to step 903. Otherwise, if it is determined that the current system is restarting, the process proceeds to step 908.
[0137] Step 903: Determine whether the currently set lock screen image is a custom lock screen image.
[0138] As an example of the present application, the System UI can determine whether the currently set lock screen image is a custom lock screen image based on the second indication information carried in the wallpaper change broadcast message. For example, when the second indication information is a preset identifier, it is determined that the currently set lock screen image is a custom lock screen image; otherwise, when the second indication information is not a preset identifier, it is determined that the currently set lock screen image is not a custom lock screen image.
[0139] If the currently set lock screen image is a custom lock screen image, proceed to the operation of step 904. Otherwise, if the currently set lock screen image is not a custom lock screen image, it means that the currently set lock screen image is a theme lock screen image, in which case, proceed to the operation of step 908.
[0140] Step 904: Determine whether the currently set custom lock screen image has depth of field capability.
[0141] As an example of the present application, since the lock screen directory is only used to store lock screen images, and when the set lock screen image is a depth of field image, the lock screen directory includes two images, unlock_depth_effect_wallpaper_0.jpg (foreground image) and unlock_wallpaper_0.jpg (background image), and when the set lock screen image is not a depth of field image, the lock screen directory only includes one image, unlock_wallpaper_0.jpg (background image), so the System UI can query whether there are both foreground images and background images in the lock screen directory, so as to determine whether the currently set custom lock screen image has depth of field capability. Specifically, when both foreground images and background images exist in the lock screen directory, it can be determined that the custom lock screen image currently set by the user has depth of field capability. Otherwise, when only the background image exists in the lock screen directory, it is determined that the custom lock screen image currently set by the user does not have depth of field capability.
[0142] If the currently set custom lock screen image has depth of field capability (hereinafter referred to as custom depth of field lock screen image), the following operations of step 905 to step 906 are performed. Otherwise, if the currently set custom lock screen image does not have depth of field capability, the following operation of step 907 is performed.
[0143] Step 905: Mark the type of the currently set lock screen image as 0.
[0144] In one example, the System UI may mark the type of the currently set lock screen image in the lightweight database. That is, when the currently set lock screen image is a custom depth of field lock screen image, the System UI writes the type of the currently set lock screen image in the lightweight database as 0. Exemplarily, the System UI may indicate the type of the currently set lock screen image through the first indication information.
[0145] It should be noted that the type of the currently set lock screen image recorded in the lightweight database is unique. The lightweight database may be SharedPreferences.
[0146] Step 906: Add detailed information of the customized depth of field lock screen image to the magazine lock screen data list.
[0147] As an example of the present application, the detailed information of the custom depth of field lock screen image includes the background thumbnail, index information, image description information, etc. of the custom depth of field lock screen image. The background thumbnail is an image that is compressed according to a certain ratio of the background image of the custom depth of field lock screen image, where the background image can be obtained from the lock screen directory. The index information is used to query the detailed information of the custom depth of field lock screen image from the magazine lock screen data list. The image description information includes application widgets, text information, etc. The text information can be used to describe what the custom depth of field lock screen image represents, for example Figure 4 As shown in Figure (c), the text message is "Leisure time is a rainbow."
[0148] The magazine lock screen data list includes detailed information of each magazine lock screen image in multiple magazine lock screen images. As an example of the present application, regardless of whether the magazine lock screen function is turned on or not, the detailed information of the custom lock screen image can be added to the magazine lock screen data list. When the magazine lock screen function is turned off, the currently set lock screen image can be displayed when the lock screen interface is subsequently displayed, and the magazine lock screen image in the magazine lock screen resource is not displayed when the lock screen interface is slid.
[0149] As an example of this application, please refer to Fig.10 Step 906, that is, adding the detailed information of the customized depth of field lock screen image to the magazine lock screen data list, may include the following steps:
[0150] A1: According to the principle of division by four with remainder zero, modify the index information of the currently set custom depth of field lock screen image.
[0151] Usually, the original index information of each lock screen image is a numerical value. Since the lock screen image type of 0 indicates a custom depth of field lock screen image, in order to facilitate subsequent identification that the currently set lock screen image is a custom depth of field lock screen image, it can be modified based on the original index information according to the principle of division by four with remainder zero.
[0152] As an example, a corresponding value that is equal to zero when divided by four can be determined by the following first formula (1) based on the original index information of the custom depth of field lock screen image, and then the index information of the currently set custom depth of field lock screen image is modified to the determined value that is equal to zero when divided by four.
[0153] (4-X1%4)+X1=Y1 (I)
[0154] It should be noted that, in the above first formula (1), X1 is the original index information of the custom depth of field lock screen image, Y1 is the modified value of zero after division by four, and % is the remainder symbol. For example, assuming that the original index information of the currently set custom depth of field lock screen image is 7, the corresponding value of zero after division by four can be determined by the above first formula (1), such as 8, and then the index information of the currently set custom depth of field lock screen image is changed from 7 to 8.
[0155] A2: Record the modified index information as cacheid.
[0156] In one example, the modified index information cacheid may be written into a lightweight database.
[0157] A3: Encapsulates the detailed information of the currently set custom depth of field lock screen image, and the detailed information at least includes the modified cacheid.
[0158] As an example of the present application, the System UI may encapsulate the detailed information into a data structure, such as BigPictureInfo. As an example and not a limitation, the System UI may also set some restrictions in BigPictureInfo, such as the restrictions may include that the custom depth of field lock screen image cannot be deleted and the lock screen automatic switching function is turned off.
[0159] A4: Add the details of the currently set custom depth of field lock screen image to the magazine lock screen data list.
[0160] The detailed information of the magazine lock screen image may include the index information, background thumbnail, image description information, etc. of the magazine lock screen image. The background thumbnail of the magazine lock screen image is obtained by compressing the magazine lock screen image according to a certain ratio. As an example of the present application, the detailed information of each magazine lock screen image corresponds to BigPictureInfo, that is, the magazine lock screen data list includes BigPictureInfo of multiple magazine lock screen images.
[0161] As an example of the present application, the detailed information of the currently set custom depth of field lock screen image can be randomly inserted into any position in the magazine lock screen data list.
[0162] In one example, the System UI can also prepare a background blur map of the currently set depth of field image. The background blur map can be displayed when the user slides up the lock screen interface, that is, when the user slides up the lock screen interface, the electronic device will have a blur effect. Among them, the background blur map can be generated based on the background image. For example, when the currently set lock screen image is a custom depth of field lock screen image, the background image can be obtained from the lock screen directory, and the background image can be Gaussian blurred to obtain the background blur map, which can then be stored.
[0163] As an example and not limitation, System UI adds detailed information of the custom depth of field lock screen image to the magazine lock screen data list through the lock screen image processing module.
[0164] It should be noted that the embodiment of the present application is described by taking the case where the currently set lock screen image is a depth of field lock screen image (including a custom depth of field lock screen image or a theme depth of field lock screen image) as an example, and the detailed information added in the magazine lock screen data list includes the background image of the depth of field lock screen image. In another example, when the set lock screen image is a depth of field lock screen image, the detailed information of the depth of field lock screen image added in the magazine lock screen data list includes a background thumbnail, but not a background image. That is, the background thumbnail of the depth of field lock screen image can be encapsulated in the detailed information, instead of encapsulating the background image in the detailed information, so that the storage space where the magazine lock screen data list is located can be saved.
[0165] After adding the detailed information of the customized depth of field lock screen image to the magazine lock screen data list, the System UI enters the following step 913.
[0166] Step 907: mark the type of the currently set lock screen image as -1, and end the depth of field processing flow.
[0167] That is, when the currently set lock screen image is a custom ordinary lock screen image, the System UI writes the type of the currently set lock screen image in the lightweight database as -1, indicating that the currently set lock screen image is a custom lock screen image but not a depth of field image. After that, the System UI ends the depth of field processing flow.
[0168] Step 908: Determine whether the currently set lock screen image is a static image.
[0169] As an example but not limitation, the System UI can determine whether the currently set lock screen image is a static image based on the wallpaper change broadcast message. For example, when the theme application notifies the wallpaper management service module of a wallpaper change event, it can indicate to the wallpaper management service module whether the lock screen image set by the user is a static image. Accordingly, when the wallpaper management service module sends a wallpaper change broadcast message to the System UI, it can indicate in the wallpaper change broadcast message so that the System UI determines whether the currently set lock screen image is a static image.
[0170] If the currently set lock screen image is a static image, proceed to the operation of the following step 909. Otherwise, if the currently set lock screen image is not a static image, such as the set lock screen image is a dynamic image, the System UI ends the depth of field processing flow, as an example but not a limitation, and then can enter the dynamic image processing flow, etc., which is not limited in the embodiment of the present application.
[0171] Step 909: Determine whether the currently set lock screen image has depth of field capability.
[0172] That is, it is determined whether the currently set lock screen image is a depth of field image. In implementation, System UI can query whether there are both foreground images and background images in the lock screen directory, so as to determine whether the currently set lock screen image has depth of field capability. Specifically, when both foreground images and background images exist in the lock screen directory, it can be determined that the lock screen image currently set by the user has depth of field capability. Otherwise, when only the background image exists in the lock screen directory, it is determined that the lock screen image currently set by the user does not have depth of field capability.
[0173] If the currently set lock screen image does not have the depth of field capability, the System UI performs the operation of step 907. Otherwise, if the currently set lock screen image has the depth of field capability, the System UI enters the operation of the following step 910.
[0174] Step 910: Determine whether the currently set lock screen image is a custom depth-of-field lock screen image.
[0175] According to the above records and combined Figure 8 It can be seen that in one possible case, the system will be executed to step 910 after restarting, and in another possible case, the system will be executed to step 910 after the user sets the lock screen image. In the first possible case, the user may have set the custom depth of field lock screen image as the lock screen image before the system of the electronic device is restarted, so in this case, there is no need to perform subsequent operations such as initialization of the theme depth of field image. Therefore, it is necessary to determine whether the currently set lock screen image is a custom depth of field lock screen image.
[0176] If the currently set lock screen image is a custom depth of field lock screen image, perform the above steps 905-906. If the electronic device does not currently apply a custom depth of field lock screen image, it can be determined that the currently set lock screen image is a theme depth of field lock screen image. In this case, proceed to the following step 911.
[0177] Step 911: Mark the type of the currently set lock screen image as 3.
[0178] That is, when the currently set lock screen image is a theme depth of field lock screen image, System UI writes the type of the currently set lock screen image as 3 in the lightweight database, indicating that the currently set lock screen image is a theme lock screen image and has depth of field capability.
[0179] Of course, it should be noted that the implementation step of marking the type of the currently set lock screen image after receiving the wallpaper change broadcast message is optional. In another example, other steps may be included to meet exception handling requirements, or other methods may be used for marking. The main marking principle is: in the case of non-system restart, if the currently set lock screen image is a custom depth of field lock screen image, the type of the currently set lock screen image recorded in the lightweight database is 0; if the currently set lock screen image is a custom ordinary lock screen image, the type of the currently set lock screen image recorded in the lightweight database is -1; if the currently set lock screen image is a theme depth of field lock screen image, the type of the currently set lock screen image recorded in the lightweight database is 3. When the system restarts, if the lock screen image set before power-on is a static image and does not have depth of field capability, the type of the currently set lock screen image recorded in the lightweight database is -1; if the lock screen image set before power-on is a theme depth of field lock screen image, the type of the currently set lock screen image recorded in the lightweight database is 3; if the lock screen image set before power-on is a custom depth of field lock screen image, the type of the currently set lock screen image recorded in the lightweight database is 0.
[0180] As an example of the present application, the System UI can determine the type of the currently set lock screen image through the broadcast monitoring module after receiving the wallpaper change broadcast message, and mark the type of the currently set lock screen image in the lightweight data.
[0181] Step 912: Add detailed information of the theme depth of field lock screen image to the magazine lock screen data list.
[0182] When it is determined that the currently set lock screen image is the theme depth of field lock screen image, System UI performs depth of field initialization based on the theme depth of field lock screen image. The main purpose is to add the detailed information of the currently set theme depth of field lock screen image to the magazine lock screen data list.
[0183] As an example of this application, please refer to Fig.11 Step 912, that is, adding the detailed information of the theme depth of field lock screen image to the magazine lock screen data list, may include the following steps:
[0184] B1: Copy the background image in the lock screen directory to another preset directory.
[0185] To prevent the background image of the theme depth of field lock screen image from being replaced by a custom lock screen image later, SystemUI may copy the background image of the currently set theme depth of field lock screen image from the lock screen directory to a preset directory. For example, the preset directory may be data / user_de / 0 / com.android.systemui / files.
[0186] In a possible implementation, the replaced scene means that, assuming that the user currently sets the theme depth of field lock screen image Pz, the background image stored in the lock screen directory is the background image of the set theme depth of field lock screen image Pz, and the System UI adds the detailed information of the theme depth of field lock screen image Pz to the magazine lock screen data list. Afterwards, if the user resets the custom depth of field lock screen image Pd, in this case, the background image stored in the lock screen directory will be replaced by the background image of the custom depth of field lock screen image Pd, and the System UI adds the detailed information of the custom depth of field lock screen image Pd to the magazine lock screen data list, which will cause the magazine lock screen data list to no longer include the detailed information of the theme depth of field lock screen image Pz. However, in implementation, after setting the theme depth of field lock screen image Pz, in case of setting the custom depth of field lock screen image Pd, the previously set theme depth of field lock screen image Pz can be retained as a common lock screen image in the magazine lock screen resource, so that in response to the user's left or right swipe operation on the lock screen interface, when the lock screen interface of the electronic device turns the page and turns to the theme depth of field lock screen image Pz, the theme depth of field lock screen image Pz does not have a depth of field effect, and when the page is turned to the custom depth of field lock screen image Pd, the custom depth of field lock screen image Pd has a depth of field effect. Therefore, in order to achieve this effect, it is necessary to retain the background image of the theme depth of field lock screen image Pz, so in order to avoid the background image of the custom depth of field lock screen image Pd replacing the background image of the theme depth of field lock screen image Pz, the background image of the theme depth of field lock screen image Pz can be copied from the lock screen directory to another preset directory for storage during the depth of field initialization process based on the theme depth of field lock screen image Pz.
[0187] It should be noted that, as an example of the present application, in the process of setting the depth of field image as the lock screen image, the foreground image under the lock screen directory is unique, that is, the embodiment of the present application can only support setting one depth of field image (custom depth of field lock screen image or theme depth of field lock screen image) as the lock screen image.
[0188] B2: According to the principle of dividing by four and having a remainder of three, modify the index information of the currently set theme depth of field lock screen image.
[0189] Since the lock screen image type is 3, it indicates a theme depth of field lock screen image. Therefore, in order to facilitate the subsequent identification that the currently set lock screen image is the theme depth of field lock screen image, the index information can be modified based on the original index information of the theme depth of field lock screen image according to the principle of division by four and remainder by three.
[0190] As an example, based on the original index information of the theme depth of field lock screen image, a corresponding value that is divisible by four and remains three can be determined by the following second formula (2), and the index information of the currently set theme depth of field lock screen image can be modified to the determined value that is divisible by four and remains three.
[0191] (3-X2%4)+X2=Y2 (2)
[0192] It should be noted that in the above second formula (2), X2 is the original index information of the theme depth of field lock screen image, Y2 is the modified value of the remainder of three after division by four, and % is the remainder symbol. For example, assuming that the original index information of the currently set theme depth of field lock screen image is 10, the corresponding value of the remainder of three after division by four can be determined as 11 according to the above second formula (2), and then the index information of the currently set theme depth of field lock screen image is changed from 10 to 11.
[0193] B3: Record the modified index information as cacheid.
[0194] In one example, the modified index information cacheid may be written into a lightweight database.
[0195] B4: Encapsulates the detailed information of the currently set theme depth of field lock screen image, and the detailed information at least includes the modified cacheid.
[0196] In one example, the detailed information of the theme depth of field lock screen image may also include its image description information, background image, etc. The image description information includes application widgets, text information, etc. When the current lock screen image is set to the theme depth of field lock screen image, the background image of the theme depth of field lock screen image can be obtained from the preset directory data / user_de / 0 / com.android.systemui / files.
[0197] As an example of the present application, the System UI can also encapsulate the detailed information of the theme depth of field lock screen image into a data structure, which will not be described one by one in the embodiments of the present application.
[0198] B5: Add the detailed information of the currently set theme depth of field lock screen image to the magazine lock screen data list.
[0199] As an example of the present application, the specific implementation of adding the detailed information of the currently set theme depth of field lock screen image to the magazine lock screen data list can be: when the magazine lock screen data list includes the detailed information of the custom depth of field lock screen image, the detailed information of the custom depth of field lock screen image is deleted from the magazine lock screen data list, and the detailed information of the currently set theme depth of field lock screen image is added to the location where the detailed information of the custom depth of field lock screen image was located before deletion. When the magazine lock screen data list does not include the detailed information of the custom depth of field lock screen image, the detailed information of the currently set theme depth of field lock screen image is inserted into the magazine lock screen data list, and illustratively, a position can be randomly selected for insertion.
[0200] As an example but not limitation, System UI adds detailed information of the theme depth of field lock screen image to the magazine lock screen data list through the lock screen image processing module.
[0201] Optionally, there may be multiple user accounts that can log in to the electronic device, for example, multiple user accounts include a main user account and a sub-user account. The main user account may generally be the owner of the electronic device, and the sub-user account is generally not the owner of the electronic device, for example, it may only have partial usage permissions. In this case, before adding the detailed information of the theme depth of field lock screen image to the magazine lock screen data list, it is also possible to determine whether the currently logged in user account is a sub-user account. If the currently logged in user account is not a sub-user account and the current electronic device has not been initialized, the System UI adds the detailed information of the theme depth of field lock screen image to the magazine lock screen data list. Otherwise, if the currently logged in user account is a sub-user account, and / or the electronic device has been initialized, the subsequent process ends. This can improve the security of electronic devices.
[0202] Step 913: Update the view page component, where the view page component is used to render image data to be displayed.
[0203] The Viewpager component is a view paging tool that provides a multi-page switching effect. It can be filled with multiple views through a view adapter. A single view can be used to render the image data of a lock screen image, thereby supporting users to switch between different views when swiping left or right.
[0204] Since the lock screen image includes a foreground image and a background image when the lock screen image is a depth of field lock screen image (such as a theme depth of field lock screen image or a custom depth of field lock screen image), as an example of the present application, the view page component includes a foreground view page component and a background view page component, wherein the foreground view page component is used to render the foreground image of the lock screen image to be displayed, and the background view page component is used to render the background image of the lock screen image to be displayed. Therefore, when the view page component is updated, it includes updating the background view page component and updating the foreground view page component.
[0205] As an example of the present application, since the magazine lock screen function is turned on, when the currently set lock screen image is displayed in the lock screen interface, the user may slide the lock screen interface to the left (or right). In this case, it is necessary to display the next (or previous) lock screen image of the currently set lock screen image in the magazine lock screen resource. Therefore, in order to quickly respond to the user's sliding operation, during the update, the foreground image of each of the three lock screen images can be rendered in the foreground view page component, and the background image of each of the three lock screen images can be rendered in the background view page component, that is, the image data of each lock screen image in the currently set lock screen image, the previous lock screen image of the currently set lock screen image in the magazine lock screen resource, and the next lock screen image are cached respectively.
[0206] As an example of this application, please refer to Fig.12 In step 913, the update process of the view in the background view page component may include the following operations (bg11)-(bg15):
[0207] (bg11) Check whether the magazine lock screen function is enabled.
[0208] In implementation, the System UI may query the state of the magazine lock screen switch to determine whether the magazine lock screen function is enabled. When the magazine lock screen switch is enabled, it is determined that the magazine lock screen function is enabled. Otherwise, when the magazine lock screen switch is disabled, it is determined that the magazine lock screen function is disabled.
[0209] In one example, the state of the magazine lock screen switch can be represented by a switch identifier. When the switch identifier is a preset first identifier, it is determined that the magazine lock screen function is turned on. When the switch identifier is a preset second identifier, it is determined that the magazine lock screen function is turned off.
[0210] When the magazine lock screen function is turned on, the System UI enters the following operation (bg12). When the magazine lock screen function is not turned on, the process ends, that is, the following operation bg12 is not continued.
[0211] (bg12) Clear the background view page component.
[0212] That is, the image data of all previously rendered lock screen images in the background view page component is cleared. In addition, System UI also clears the cached information in the background view adapter to facilitate reloading the background image of each of the three lock screen images to be displayed. The background view adapter is used to provide loading data for the background view page component.
[0213] Optionally, before clearing the background view page component, it can also be determined whether it is the first time to start up with a password and whether the lock screen interface is invisible. If there is a password for the first time to start up, after the lock screen interface is displayed, the lock screen interface will not display the magazine lock screen image when receiving a left or right sliding operation. Therefore, if there is a password for the first time to start up, there is no need to execute the subsequent process. If there is no password for the first time to start up, after the lock screen interface is displayed, the lock screen interface needs to display the magazine lock screen image when receiving a left or right sliding operation. Therefore, the operation of clearing the background view page component can be executed. In addition, if the lock screen interface is invisible, for example, when the welcome interface is displayed at startup and the lock screen interface is not displayed, the operation of clearing the background view page component can be temporarily not executed, but the operation of clearing the background view page component can be executed after entering the lock screen interface (that is, the lock screen interface is visible).
[0214] (bg13) Get the views corresponding to the currently set lock screen image and the adjacent magazine lock screen image from the background view page component.
[0215] Each view is a view that is used to display the background image of a corresponding lock screen image. The number of views included in the background view page component can be set according to requirements. For example, the background view page component includes views Figure 1 ,See Figure 2 ,See Figure 3 ,See Figure 4 And Vision Figure 5 , you can get the video during the update process Figure 1 ,See Figure 2 And Vision Figure 3 .
[0216] (bg14) Obtain detailed information of the currently set lock screen image and adjacent magazine lock screen images from the magazine lock screen data list.
[0217] According to the previous records, the currently set lock screen image may be a custom depth of field lock screen image or a theme depth of field lock screen image, and its detailed information has been added to the magazine lock screen data list. Therefore, the detailed information of the currently set lock screen image, the detailed information of its previous lock screen image, and the detailed information of its next lock screen image can be obtained from the magazine lock screen data list. In one example, the System UI can obtain the detailed information of the currently set lock screen image and the adjacent magazine lock screen image from the magazine lock screen data list through the background view adapter.
[0218] In implementation, the location of the detailed information of the currently set lock screen image can be located from the magazine lock screen data list, and the System UI obtains the detailed information of the image from the magazine lock screen data list through the background view adapter according to the located location. The previous detailed information and the next detailed information are obtained from the magazine lock screen data list to obtain the detailed information of the adjacent magazine lock screen image.
[0219] (bg15) Based on the acquired detailed information, the background view adapter renders the background images of the currently set lock screen image and its adjacent magazine lock screen image into the acquired view respectively, and records the correspondence between the background images of each lock screen image and the view in which it is located.
[0220] For example, the background image carried in the details of the currently set lock screen image is set to the view through the background view adapter. Figure 2 and record the video Figure 2 The corresponding relationship between the view identifier and the index information of the currently set lock screen image; the background thumbnail carried in the detailed information of the previous magazine lock screen image of the currently set lock screen image is set to the view through the background view adapter Figure 1 and record the video Figure 1 The corresponding relationship between the view identifier and the index information of the previous magazine lock screen image; and setting the background thumbnail carried in the details information of the next magazine lock screen image of the currently set lock screen image to the view through the background view adapter Figure 3 and record the video Figure 3 The correspondence between the view identifier and the index information of the next magazine lock screen image.
[0221] In this way, the update of the background view page component is completed.
[0222] As an example of the present application, when the background view page component is updated, the System UI can also notify all interface elements of the lock screen interface so that the interface elements in the lock screen interface are blurred based on the lock screen image in the updated background view page component.
[0223] As an example of this application, please refer to Fig.13 In step 913, the update process of the view in the foreground view page component may include the following operations (fg21)-(fg26):
[0224] (fg21) Check whether the magazine lock screen function is enabled.
[0225] When the magazine lock screen function is turned on, the System UI performs the following (fg22) operation. Otherwise, when the magazine lock screen function is not turned on, the process ends, that is, the System UI does not perform subsequent operations.
[0226] (fg22) Gets the type of the currently set lock screen image.
[0227] In one possible case, since both the theme depth of field lock screen image and the custom depth of field lock screen image may exist in the magazine lock screen resources, for example, the user first sets the theme depth of field lock screen image, and then sets the custom depth of field lock screen image, in this case, in order to facilitate the subsequent accurate judgment of whether the currently set lock screen image is the theme depth of field lock screen image or the custom depth of field lock screen image, the System UI obtains the type of the currently set lock screen image.
[0228] According to the previous records, the type of the currently set lock screen image is recorded in the lightweight database, so System UI can query the type of the currently set lock screen image from the lightweight database. When the lock screen image is a custom depth of field lock screen image, the type of the obtained lock screen image is 0, and when the lock screen image is a theme depth of field lock screen image, the type of the obtained lock screen image is 3.
[0229] Optionally, before executing operation (fg22), it can also be determined whether this is the first time the computer is turned on with a password and whether the lock screen interface is invisible. If it is the first time the computer is turned on with a password, or the lock screen interface is not visible, the subsequent process can be omitted to avoid affecting the boot speed; otherwise, if it is the first time the computer is turned on without a password and the lock screen interface is visible, an operation is performed to obtain the type of the currently set lock screen image.
[0230] (fg23) Determine whether the current lock screen image is a depth of field image based on the type of the currently set lock screen image.
[0231] In one possible case, the type of the currently set lock screen image is 0, which indicates that the currently set lock screen image is a custom depth of field lock screen image, that is, it is determined to be a depth of field image. In another possible case, the type of the currently set lock screen image is 3, which indicates that the currently set lock screen image is a theme depth of field lock screen image, that is, it is determined to be a depth of field image. In another possible case, the type of the currently set lock screen image is neither 0 nor 3. In this case, it is determined that the currently set lock screen image is not a depth of field image.
[0232] If the currently set lock screen image is not a depth of field image, proceed to the following operation (fg24). Otherwise, if the currently set lock screen image is a depth of field image, proceed to the following operation (fg25).
[0233] (fg24) Sets the foreground image of the current lock screen image to empty.
[0234] That is, when the currently set lock screen image is not a depth of field image, it means that the currently set lock screen image does not have a foreground image. In this case, the foreground image of the current lock screen image can be set to empty through the foreground view adapter.
[0235] As an example of the present application, three views to be rendered can be obtained from the foreground view page component. When the foreground image of the currently set lock screen image is empty, the correspondence between the view identifier of a blank view and the index information of the currently set lock screen image can be recorded in the foreground view adapter.
[0236] In one example, if the currently set lock screen image includes image description information, the image description information may be added to the view corresponding to the currently set lock screen image.
[0237] As an example but not limitation, the foreground view adapter may obtain the index information of the currently set lock screen image from the background view adapter.
[0238] (fg25) Get the foreground image from the lock screen directory through the foreground view adapter. The foreground view adapter is used to provide loading data for the foreground view page component.
[0239] Since the foreground image in the lock screen directory is unique, when the currently set lock screen image is a depth of field image, the image can be directly obtained from the lock screen directory, that is, the image named unlock_depth_effect_wallpaper_0.jpg can be obtained.
[0240] (fg26) Render the acquired foreground image to the corresponding view in the foreground view page component through the foreground view adapter.
[0241] In one example, when the detailed information of the currently set lock screen image also includes image description information, the image description information can also be rendered to an upper layer of the hierarchy where the foreground image is located through the foreground view adapter.
[0242] As an example, after rendering the foreground of the currently set lock screen image to the corresponding view in the foreground view page component, the foreground view adapter can record the correspondence between the view identifier of the rendered view and the index information of the currently set lock screen image.
[0243] (fg27) According to the index information of the currently set lock screen image, obtain the index information of the previous magazine lock screen image of the current lock screen image.
[0244] As an example but not limitation, the index information of the previous magazine lock screen image of the currently set lock screen image can be obtained from the background view adapter through the foreground view adapter.
[0245] (fg28) When it is determined according to the index information of the previous magazine lock screen image that it is not a depth of field image, the foreground image of the previous magazine lock screen image is set to empty.
[0246] As an example of the present application, the previous view adjacent to the view where the foreground image of the currently set lock screen image is located can be obtained from the foreground view page component, and then the correspondence between the obtained view and the index information of the previous magazine lock screen image can be recorded, that is, the foreground image of the previous magazine lock screen image is recorded as empty, that is, it does not exist.
[0247] (fg29) According to the index information of the currently set lock screen image, obtain the index information of the next magazine lock screen image of the current lock screen image.
[0248] As an example but not limitation, the index information of the next magazine lock screen image of the currently set lock screen image can be obtained from the background view adapter through the foreground view adapter.
[0249] (fg210) When it is determined according to the index information of the next magazine lock screen image that it is not a depth of field image, the foreground image of the next magazine lock screen image is set to be empty.
[0250] As an example of the present application, the next view adjacent to the view where the foreground image of the currently set lock screen image is located can be obtained from the foreground view page component, and then the correspondence between the obtained view and the index information of the next magazine lock screen image can be recorded, that is, the foreground image of the next magazine lock screen image is recorded as empty, that is, it does not exist.
[0251] In this way, the update of the foreground view page component is completed.
[0252] It should be noted that the operations of the above steps (bg11) to (bg15) and the operations of steps (fg21) to (fg210) are all optional. In another example, in order to meet the exception handling requirements, the specific implementation of the update view page component may not be limited to including these steps, and the embodiment of the present application does not limit this.
[0253] It should be noted that the embodiment of the present application is described by taking the case where the set lock screen image is a depth of field lock screen image, and rendering the background image of the depth of field lock screen image into the background view page component as an example. In another example, the detail information of the depth of field lock screen image includes a background thumbnail. In this case, after the background view adapter obtains the detail information of the depth of field lock screen image, it renders the background thumbnail included in the detail information of the depth of field lock screen image into the background view page component. Afterwards, during the bright screen display process, the background thumbnail can be displayed first, and then the corresponding background image can be obtained according to the index information of the depth of field lock screen image, and the displayed background thumbnail can be replaced with the background image. In this way, the cache space of the background view page component can be saved while ensuring the real-time display.
[0254] It should be noted that the embodiment of the present application is described by caching the image data of three lock screen images in the view page component at the same time. In another example, the image data of more lock screen images can also be cached at the same time. For example, the image data of five lock screen images can also be cached at the same time, which is not limited in the embodiment of the present application.
[0255] Based on the application scenarios and initialization operations provided in the above embodiments, the following describes the display method of the lock screen image provided in the embodiments of the present application. Here, the magazine lock screen function of the electronic device is used as an example for explanation. Fig.14 , Fig.14 is a flowchart of a method for displaying a lock screen image according to an exemplary embodiment. The method can be performed by Figure 7 The electronic device shown in the figure can be executed, and the electronic device can be implemented by interaction of multiple functional modules. The method may include part or all of the following contents:
[0256] Step 1401: The screen on / off driver receives a screen off operation.
[0257] In one example, when the electronic device is in the screen-on state, when the screen-on / off driver detects a user triggering operation on a switch button of the electronic device, it is determined that a screen-off operation is received.
[0258] Step 1402: The screen on / off driver sends a screen off notification to the power management service module.
[0259] That is, after the screen on / off driver detects the screen off operation, it notifies the power management service module to perform screen off control.
[0260] Step 1403: The power management service module controls the screen to enter the screen-off state.
[0261] Step 1404: The power management service module sends a screen-off notification to the window management service module.
[0262] As an example of the present application, when an electronic device enters the screen-off state, the electronic device needs to prepare a lock screen image to be displayed after the screen is turned on through a lock screen image processing module. To this end, the power management service module sends a screen-off notification to the window management service module, so that the screen-off notification is sent to the lock screen image processing module through the window management service module.
[0263] Step 1405: The window management service module sends a screen-off notification to the lock screen image processing module.
[0264] In one example, the window management module sends a screen-off notification to the lock screen image processing module through at least one module in turn. Exemplarily, the at least one module includes a lock screen service module (keyguardservice), a lock screen image drawing module, a lock screen update monitoring module (keyguardupdatemonitor), etc., which is not limited to the embodiments of the present application.
[0265] Step 1406: The lock screen image processing module queries the lock screen identifier, which is used to indicate whether there is a locked lock screen image. The locked lock screen image is a lock screen image displayed after the screen is turned on based on the user's lock operation.
[0266] Please refer to Figure 6 When the user requires the electronic device to be able to display a certain lock screen image after the screen is turned on, the electronic device can be triggered to lock the lock screen image. In this case, the electronic device determines the lock screen image as the locked lock screen image, and can record the lock screen identifier as a value greater than or equal to 0 in the lightweight database to indicate that there is currently a lock screen image locked by the user. For example, when the locked lock screen image is a magazine lock screen image, the lock screen identifier can be the index information corresponding to the magazine lock screen image. For another example, when the locked lock screen image is a custom depth of field lock screen image, the lock screen identifier can be 0 or a value that is zero when divided by four. Of course, when the user does not trigger the electronic device to lock any lock screen image, the lock screen identifier can be set to a value less than 0 by default, such as -1.
[0267] In this way, when the electronic device enters the screen-off state, the lock screen image processing module can query the lock screen identifier from the lightweight database to determine whether there is a locked lock screen image in the electronic device. For example, if the lock screen identifier is less than 0, such as the lock screen identifier is -1, it is determined that there is no locked lock screen image. In this case, the operation of the following step 1407 is entered. Otherwise, if the lock screen identifier is greater than or equal to 0, it is determined that there is a locked lock screen image. At this time, the lock screen image processing module does not enter the operation of the following step 1407. In one example, the lock screen image processing module can display the detailed information of the lock screen image locked by the user and the lock screen images adjacent to it in the magazine lock screen data list. In this case, the lock screen image locked by the user is displayed after the screen is turned on.
[0268] Step 1407: When the lock screen identifier indicates that there is no locked lock screen image, the lock screen image processing module queries whether the lock screen image of the current application is a depth of field lock screen image.
[0269] As an example of the present application, when there is no locked lock screen image in the electronic device, that is, when the lock screen identifier is -1, the lock screen image processing module can query the first indication information in the lightweight database for indicating the type of the currently set lock screen image, so as to determine whether the lock screen image currently applied by the electronic device is a theme depth of field lock screen image or a custom depth of field lock screen image. For example, when the first indication information is 0, it can be determined that the lock screen image currently applied is a custom depth of field lock screen image. For example, when the first indication information is 3, it can be determined that the lock screen image currently applied is a theme depth of field lock screen image. Of course, if the first indication information is neither 0 nor 3, it is determined that the lock screen image of the current application does not have depth of field capability.
[0270] As another example of the present application, if the first index information of the currently set target depth of field lock screen image is stored in the lightweight database, the type of the target depth of field lock screen image can also be determined through the first index information. For example, when the first index information is a value that is three when divided by four, it is determined that the target depth of field lock screen image is the theme depth of field lock screen image. When the first index information is a value that is zero when divided by four, it is determined that the target depth of field lock screen image is a custom depth of field lock screen image.
[0271] If it is determined that the lock screen image of the current application is a depth of field lock screen image, enter the operation of the following step 1408, otherwise, if the lock screen image of the current application is not a depth of field lock screen image, execute the magazine lock screen processing flow when the magazine lock screen function is turned on.
[0272] It should be noted that steps 1406 to 1407 are optional operations. In another example, the lock screen image processing module may not determine whether there is a lock screen image, but directly query whether the lock screen image of the current application is a depth of field lock screen image.
[0273] Step 1408: When the depth of field lock screen image is currently applied, the lock screen image processing module sends a cache instruction Ia to the foreground view adapter, and sends a cache instruction Ib to the background view adapter.
[0274] The cache instruction Ia is used to instruct to cache the foreground image data of the target depth of field lock screen image into the foreground view page component.
[0275] The cache instruction Ib is used to instruct that the background image data of the target depth of field lock screen image be cached in the background view page component.
[0276] In a possible application scenario, during the process of a user using an electronic device, the foreground image data of the target depth of field lock screen image may no longer exist in the foreground view page component, and the background image data of the target depth of field lock screen image may not exist in the background view page component. For example, during the process of the electronic device displaying the lock screen image, the user may slide the lock screen interface to the left or right. In this case, the image data of the lock screen image to be displayed in the foreground view page component and the background view page component of the electronic device are continuously updated as the user slides. Therefore, in order to enable the set target depth of field lock screen image to be fixedly displayed each time the screen is turned off and then turned on again, after the electronic device turns off the screen, the foreground image data of the target depth of field lock screen image is cached in the foreground view page component, and the background image data of the target depth of field lock screen image is cached in the background view page component. To this end, the lock screen image processing module sends a cache instruction Ia to the foreground view adapter and a cache instruction Ib to the background view adapter.
[0277] In one example, the cache instruction 1a and the cache instruction 1b both carry the first index information of the target depth of field lock screen image. In another example, the cache instruction 1a and the cache instruction 1b both carry the first indication information.
[0278] Step 1409: The background view adapter renders the background image of the currently set target depth of field lock screen image into the background view page component.
[0279] As an example of the present application, when the cache instruction Ib carries the first indication information, the background view adapter can search for the first index information of the target depth of field lock screen image from the magazine lock screen data list according to the first indication information. For example, when the first indication information indicates that the target depth of field lock screen image is the theme depth of field lock screen image, the index information with a remainder of three when divided by four is searched from the magazine lock screen data list to obtain the first index information. When the first indication information indicates that the target depth of field lock screen image is a custom depth of field lock screen image, the background view adapter searches for the index information with a remainder of zero when divided by four from the magazine lock screen data list to obtain the first index information. Then, the first detailed information (i.e., BigPictureInfo) corresponding to the first index information is obtained from the magazine lock screen data list.
[0280] As another example of the present application, if the cache instruction Ib carries the first index information, the background view adapter can directly search for the first index information from the magazine lock screen data list to obtain the first detail information corresponding to the first index information.
[0281] In one example, in order to quickly respond to the user's left or right swipe operation in the lock screen interface, the background view adapter can also load the detailed information of the previous magazine lock screen image and the detailed information of the next magazine lock screen image in the target depth of field lock screen image.
[0282] Afterwards, the background view adapter renders the background image of the target depth of field lock screen image, the background thumbnail of the previous magazine lock screen image in the target depth of field lock screen image, and the background thumbnail of the next magazine lock screen image in the target depth of field lock screen image in the background view page component, and records the correspondence between each rendered image and the view in which it is located.
[0283] As an example of this application, the background image of the target depth of field lock screen image is rendered to the first view displayed after the screen is turned on in the background view page component. The first view is the view last displayed in the background view page component before the screen is turned off. The first view changes as the user slides. For example, please refer to Fig.15 , if the user does not slide the lock screen interface to turn off the screen, the first view is the view Figure 2 , assuming that the user swipes left once on the lock screen and then turns off the screen, the first view changes to the view Figure 3 In addition, the background thumbnail of the previous magazine lock screen image in the target depth of field lock screen image can be rendered to the previous view adjacent to the first view, and the background thumbnail of the next magazine lock screen image in the target depth of field lock screen image can be rendered to the next view adjacent to the first view. For example, the background image of the target depth of field lock screen image is rendered to the view in the background view page component. Figure 2In the target depth of field lock screen image, the background thumbnail of the previous magazine lock screen image is rendered to the viewport. Figure 1 and renders the background thumbnail of the next magazine lock screen image in the target depth of field lock screen image to the viewport Figure 3 In addition, record the video Figure 2 The corresponding relationship between the view identifier and the index information of the target depth of field lock screen image is recorded. Figure 1 The corresponding relationship between the view identifier and the index information of the previous magazine lock screen image of the target depth of field lock screen image, and the recorded view Figure 3 The correspondence between the view identifier and the index information of the next magazine lock screen image of the target depth of field lock screen image. For specific implementation, please refer to Fig.12 The embodiment shown.
[0284] Step 1410: The foreground view adapter renders the foreground image of the target depth-of-field lock screen image into the foreground view page component.
[0285] Similarly, the foreground view adapter renders the foreground image of the target depth of field lock screen image, the foreground of the previous magazine lock screen image in the target depth of field lock screen image, and the foreground of the next magazine lock screen image in the target depth of field lock screen image in the foreground view page component, and records the correspondence between each rendered image and the view in which it is located.
[0286] As an example of this application, the foreground image of the target depth of field lock screen image is added to the second view displayed after the screen is turned on in the foreground view page component. The second view is the view that was last displayed in the foreground view page component before the screen was turned off. For specific implementation, please refer to Fig.13 The embodiment shown.
[0287] It should be noted that there is no strict execution order between step 1409 and step 1410.
[0288] In addition, before executing the above steps 1409 and 1410, the foreground view page components may be cleared respectively, and the background view page components may be cleared respectively.
[0289] Step 1411: The screen light and off driver receives the first screen light operation.
[0290] When the first screen-lighting operation is received, it indicates that the user triggers the electronic device to light up the screen.
[0291] Step 1412: The screen on / off driver sends a screen on notification to the power management service module.
[0292] Step 1413: The power management service module sends a screen light notification to the lock screen image drawing module through the window management service module.
[0293] In implementation, the power management service module sends a screen light notification to the window management service module, and then the window management service module sends a screen light notification to the lock screen image drawing module.
[0294] Step 1414: The lock screen image drawing module sends an image rendering instruction to the background view adapter and sends an image rendering instruction to the foreground view adapter. The image rendering instruction is used to instruct the image data of the lock screen image to be displayed to be rendered into the corresponding view page component.
[0295] Step 1415: After rendering the background images of the three lock screen images into the background view page components respectively, the background view adapter sends a rendering completion notification to the lock screen image drawing module.
[0296] In one possible case, the background view adapter has completed rendering when receiving the image rendering instruction. In this case, the background view adapter sends a rendering completion notification to the lock screen image drawing module to notify the image drawing module to complete the rendering operation. In another possible case, the background view adapter has not completed rendering when receiving the image rendering instruction. In this case, the background view adapter continues to perform the rendering operation and sends a rendering completion notification to the lock screen image drawing module after the rendering is completed.
[0297] Step 1416: After rendering the foreground images of the three lock screen images into the foreground view page components respectively, the foreground view adapter sends a rendering completion notification to the lock screen image drawing module.
[0298] Similarly, in one possible case, the foreground view adapter has completed rendering when receiving the image rendering instruction. In this case, the foreground view adapter sends a rendering completion notification to the lock screen image drawing module to notify the image drawing module to complete the rendering operation. In another possible case, the foreground view adapter has not completed rendering when receiving the image rendering instruction. In this case, the foreground view adapter continues to perform the rendering operation and sends a rendering completion notification to the lock screen image drawing module after the rendering is completed.
[0299] Step 1417: After receiving the rendering completion notifications respectively sent by the foreground view adapter and the background view adapter, the lock screen image drawing module sends a screen light instruction to the power management service module through the window management service module.
[0300] The lock screen image drawing module sends a screen light instruction to the window management service module, and the window management service module forwards the screen light instruction to the power management service module. The screen light instruction is used to indicate that the drawing of the lock screen image to be displayed has been completed.
[0301] Step 1418: The power management service module controls the screen to turn on, and displays the background image of the target depth of field lock screen image in the lock screen interface through the background view page component, and displays the foreground image of the target depth of field lock screen image in the lock screen interface through the foreground view page component.
[0302] Since the background image of the target depth of field lock screen image is rendered to the first view in the background view page component, and the foreground image of the target depth of field lock screen image is rendered to the second view in the foreground view page component, after the power management service module turns on the screen, the first view in the background view page component and the second view in the foreground view page component can be displayed in the lock screen interface, thereby displaying the background image and foreground image of the target depth of field lock screen image in the lock screen interface. For example, the display effect is as follows: Figure 5 As shown in Figure (c).
[0303] In one example, after displaying the target depth of field lock screen image, when the user slides left or right, a lock screen image adjacent to the target depth of field lock screen image and corresponding to the sliding direction is displayed, the foreground view page component switches to a view adjacent to the second view according to the sliding direction, and the background view page component switches to a view adjacent to the first view according to the sliding direction, thereby displaying the next magazine lock screen image corresponding to the sliding direction. Fig.16 As shown, when the electronic device displays the target depth of field lock screen image, after the user slides to the left, in response to the user's left slide operation, the electronic device displays the next magazine lock screen image P1. In one possible case, in response to the user's left slide operation, the background thumbnail of the next magazine lock screen image P1 can be displayed first, and then the lock screen image processing module obtains the next magazine lock screen image P1 and replaces the displayed background thumbnail. Afterwards, the background view adapter obtains the detailed information of the next magazine lock screen image (such as magazine lock screen image P2) of the next magazine lock screen image P1 from the magazine lock screen data list, and renders the background thumbnail of the next magazine lock screen image P2 in the background view page component, and records the correspondence between the view identifier of the rendered view and the index information of the magazine lock screen image P2. In addition, the foreground view adapter sets the foreground image of the next magazine lock screen image P2 to empty, and records the correspondence between an empty view in the foreground view page component and the next magazine lock screen image P2.
[0304] It should be noted that, since the background view adapter records the corresponding relationship between each rendered view and the index information of the corresponding lock screen image during the process of updating the background view page component, after the user slides, the background view adapter can determine the index information corresponding to the image data rendered in the view after sliding according to the corresponding relationship and the view identifier of the view displayed after sliding, so that the next index information corresponding to the sliding direction of the sliding operation can be determined from the magazine lock screen data list according to the index information, and then the detailed information corresponding to the determined next index information can be obtained. In addition, the view adjacent to the view displayed after sliding in the background view page component can be determined, so that the background thumbnail of the obtained magazine lock screen image can be updated to the determined view, and the corresponding relationship between the view identifier of the view and the index information of the magazine lock screen image is recorded. Similarly, the foreground view adapter can also be updated in a similar manner. In this way, after each slide of the user, the electronic device can render the foreground image and background image of the adjacent lock screen image of the lock screen image displayed after sliding into the foreground view page component and the background view page component respectively, so as to quickly respond to the user's sliding operation later.
[0305] After the blank views in the foreground view page component or the background view page component are used up, the views that are far away from the foreground image or background image of the currently displayed lock screen image can be released so that the released views can be reused in subsequent rendering processes.
[0306] It should be noted that the above embodiment is described by taking the case where the detailed information of the target depth of field lock screen image includes the background image of the target depth of field lock screen image as an example. In another example, the detailed information of the target depth of field lock screen image includes the background thumbnail of the target depth of field lock screen image. In this case, when the background view page component is updated, the background thumbnail of the target depth of field lock screen image is rendered to one of the views (such as rendered to the first view), and the background thumbnail of the target depth of field lock screen image is first displayed in the lock screen interface after the screen is turned on. Since the background thumbnail is a compressed image, it may not be clear enough when displayed, so the lock screen image processing module can obtain the background image of the target depth of field lock screen image according to the first index information of the target depth of field lock screen image, and then replace the displayed background thumbnail with the obtained background image through the background view adapter.
[0307] As an example of the present application, the specific implementation of obtaining the background image of the target depth of field lock screen image according to the first index information may include: according to the first index information, determining the type of the target depth of field lock screen image, the type of the target depth of field lock screen image includes a theme depth of field lock screen image or a custom depth of field lock screen image, for example, determining whether the first index information is a value that is divided by four and has a remainder of three, or whether it is a value that is divided by four and has a remainder of zero. If the target depth of field lock screen image is the theme depth of field lock screen image, that is, the first index information is a value that is divided by four and has a remainder of three, then the background image is obtained from the copied directory (that is, data / user_de / 0 / com.android.systemui / files). If the target depth of field lock screen image is a custom depth of field lock screen image, that is, the first index information is a value that is divided by four and has a remainder of zero, then the background image is obtained from the lock screen directory (that is, data / themes / 0 / wallpaper).
[0308] In one example, when the target depth of field lock screen image is a custom depth of field lock screen image, since its background image is stored in the custom wallpaper frame, the lock screen image drawing module can also obtain the background image from the custom wallpaper frame.
[0309] It is worth noting that the background image in the lock screen directory exists in a specified format, such as .jpg format. If you need to display the background image in .jpg format, you need to convert the background image in .jpg format to bitmap and then display it. The image in the custom wallpaper frame exists in the form of bitmap. The background image obtained from the custom wallpaper frame can be displayed without format conversion, which improves display efficiency.
[0310] In an embodiment of the present application, in response to a screen-off operation, the electronic device enters a screen-off state. Afterwards, when the first screen-on operation is received, it indicates that the user has triggered the electronic device to light up the screen again. In this case, if the magazine lock screen function in the electronic device is turned on and a depth-of-field lock screen image is applied in the electronic device, then in response to the first screen-on operation, the electronic device displays the target depth-of-field lock screen image of the current application in the lock screen interface. The target depth-of-field lock screen image includes a foreground image and a background image. When displayed on the lock screen interface, the foreground image is at the upper layer of the hierarchy where the system time indicator is located and partially blocks the system time indicator. In this way, the electronic device can display the target depth-of-field lock screen image every time the screen is re-lit, that is, a personalized lock screen display method is provided, thereby improving the user experience.
[0311] See also Fig.17 , Fig.17 is a schematic diagram of a method flow for displaying a lock screen image according to another exemplary embodiment. As an example but not a limitation, the method can be applied to Figure 7In the electronic device shown, the method may include the following steps or all of the following contents:
[0312] Step 1701: The electronic device receives a lock screen image setting operation.
[0313] Step 1702: In response to the lock screen image setting operation, the electronic device sets the original image selected in the lock screen image setting operation as the target depth of field lock screen image.
[0314] The original image is an image in the depth image theme or an image in the gallery of the electronic device. The depth image theme is an image theme in the electronic device. For example, the depth image theme can be set from the theme application, and the lock screen image after setting is the theme depth lock screen image.
[0315] The specific implementation of step 1701 to step 1702 can be found in Figure 3 or Figure 4 In addition, when the depth of field lock screen image is set, the initialization operation of the electronic device can be seen in Fig. 9 The embodiment shown.
[0316] In this way, by providing users with different channels for setting depth of field lock screen images, users can set different types of depth of field lock screen images according to their needs, enriching the way of setting depth of field lock screen images.
[0317] Step 1703: In response to the screen-off operation, the electronic device enters a screen-off state.
[0318] As an example of the present application, after receiving a screen-off operation, the electronic device obtains the first detail information of the target depth-of-field lock screen image from the magazine lock screen data list, the magazine lock screen data list includes detail information of each lock screen image in a plurality of lock screen images, the plurality of lock screen images include a plurality of magazine lock screen images and a target depth-of-field lock screen image, and the first detail information is added to the magazine lock screen data list when the target depth-of-field lock screen image is applied. The electronic device determines the foreground image of the target depth-of-field lock screen image based on the first detail information and the first indication information, the first indication information is used to indicate the type of lock screen image currently applied by the electronic device, and the first indication information is recorded when the target depth-of-field lock screen image is applied. Based on the first detail information, the electronic device renders the background image of the target depth-of-field lock screen image to the first view in the background view page component, and renders the foreground image of the target depth-of-field lock screen image to the second view in the foreground view page component.
[0319] In one example, the first detail information includes first index information, and the first index information is used to indicate the type of the target depth of field lock screen image. The specific implementation of the electronic device determining the foreground image of the target depth of field lock screen image based on the first detail information and the first indication information includes: when the first indication information indicates that the electronic device is currently applying the depth of field lock screen image, and the first index information indicates that the target depth of field lock screen image is the depth of field lock screen image, the electronic device obtains the foreground image of the target depth of field lock screen image from the first designated directory, and the first designated directory is used to store the foreground image of the depth of field lock screen image. For example, the first designated directory is the lock screen directory mentioned above, that is, data / themes / 0 / wallpaper. For specific implementation, please refer to Fig. 9 The embodiment shown.
[0320] Furthermore, the first detail information includes a background image of the target depth of field lock screen image. The electronic device renders the background image of the target depth of field lock screen image to the first view in the background view page component based on the first detail information, and renders the foreground image of the target depth of field lock screen image to the second view in the foreground view page component. The specific implementation may include: the electronic device renders the background image included in the first detail information to the first view, and records the correspondence between the view identifier of the first view and the first index information. The electronic device renders the foreground image of the target depth of field lock screen image to the second view, and records the correspondence between the view identifier of the second view and the first index information. For specific implementation, please refer to Fig. 9 The embodiment shown.
[0321] The specific implementation of adding the first detailed information of the target depth of field lock screen image to the magazine lock screen data list can be found in Fig. 9 The embodiment shown.
[0322] In addition, the electronic device obtains the second detail information of the previous magazine lock screen image of the target depth of field lock screen image and the third detail information of the next magazine lock screen image of the target depth of field lock screen image from the magazine lock screen data list. Based on the second detail information, the electronic device renders the background thumbnail of the previous magazine lock screen image to the previous view adjacent to the first view in the background view page component, and based on the third detail information, renders the background thumbnail of the next magazine lock screen image to the next view adjacent to the first view in the background view page component. The electronic device records in the foreground view page component that the foreground image of the previous magazine lock screen image is empty, and that the foreground image of the next magazine lock screen image is empty.
[0323] Step 1704: The electronic device receives a first screen-lighting operation.
[0324] Step 1705: In response to the first screen light operation, the electronic device displays the target depth-of-field lock screen image of the current application in the lock screen interface.
[0325] As an example of the present application, in response to a first screen lighting operation, the electronic device controls the screen to light up, and the electronic device displays a first view through a background view page component on the lock screen interface, and displays a second view through a foreground view page component, wherein a background image of a target depth of field lock screen image is rendered in the first view, and a foreground image of a target depth of field lock screen image is rendered in the second view. The background view page component and the foreground view page component synchronously respond to a sliding operation in the lock screen interface. In this way, chirality can be achieved when the user slides the lock screen interface.
[0326] As an example of the present application, in the absence of a locked lock screen image, in response to a first screen-lighting operation, the electronic device displays a target depth-of-field lock screen image in the lock screen interface, and the locked lock screen image is a lock screen image displayed after the screen is lighted based on the user's lock operation.
[0327] As an example of the present application, the lock screen interface also includes at least one of a notification bar, a system status bar, and a function control. The layer where the notification bar is displayed is located at the top of the lock screen interface, the layer where the system status bar is located is located between the layer where the background image is located and the layer where the system time indicator is located, and the layer where the function control is located is located above the layer where the foreground image is located. The function control is a control of a function of any application. The number of the function controls can be one or more.
[0328] In this way, the layer where the system status bar is located is set between the layer where the background image is located and the layer where the system time indicator is located, thereby avoiding the system status bar from blocking other interface elements in the lock screen interface. By displaying at least one function control on the upper layer of the image body, the user can trigger the function control to implement the function of the corresponding application without entering the desktop, thereby improving human-computer interactivity.
[0329] Step 1706: In response to a horizontal sliding operation in the lock screen interface, the electronic device displays a magazine lock screen image adjacent to the target depth of field lock screen image.
[0330] It should be noted that the above is explained by taking the electronic device turning on the magazine lock screen function and applying the depth of field lock screen image as the lock screen image as an example. In another example, if the electronic device turns on the magazine lock screen function but does not apply the depth of field lock screen image as the lock screen image, the method also includes: the electronic device receives a second screen light operation. In response to the second screen light operation, the electronic device displays the target lock screen image in the lock screen interface, and the target lock screen image is any magazine lock screen image. Or in another example, after the electronic device displays the target depth of field lock screen image on the lock screen interface, if the user cancels the setting of the target depth of field lock screen image, the electronic device turns off the screen again, and when the second screen light operation is received, in response to the second screen light operation, the electronic device displays the target lock screen image in the lock screen interface.
[0331] In an embodiment of the present application, in response to a screen-off operation, the electronic device enters a screen-off state. Afterwards, when the first screen-on operation is received, it indicates that the user has triggered the electronic device to light up the screen again. In this case, if the magazine lock screen function in the electronic device is turned on and a depth-of-field lock screen image is applied in the electronic device, then in response to the first screen-on operation, the electronic device displays the target depth-of-field lock screen image of the current application in the lock screen interface. The target depth-of-field lock screen image includes a foreground image and a background image. When displayed on the lock screen interface, the foreground image is at the upper layer of the hierarchy where the system time indicator is located and partially blocks the system time indicator. In this way, the electronic device can display the target depth-of-field lock screen image every time the screen is re-lit, that is, a personalized lock screen display method is provided, thereby improving the user experience.
[0332] Fig.18 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application, and the electronic device can be used to implement the methods described in the above embodiments. Fig.18The 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. Among them, the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0333] It is to be understood that the structure illustrated in the embodiment of the present application 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 split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0334] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0335] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0336] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0337] In some embodiments, the processor 110 may include one or more interfaces, such as an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0338] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0339] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0340] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light emitting diode or an active-matrix organic light emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is an integer greater than 1.
[0341] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0342] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.
[0343] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created by the electronic device 100 during use (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0344] The electronic device 100 can implement audio functions, such as music playback, recording, etc., through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D and the application processor.
[0345] The touch sensor 180K is also called a "touch panel". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor 180K can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.
[0346] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (such as: coaxial cable, optical fiber, data subscriber line (Digital Subscriber Line, DSL)) or wireless (such as: infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access, or a data storage device such as a server or data center that includes one or more available media integrations. The available medium may be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a digital versatile disc (DVD)), or a semiconductor medium (such as a solid state disk (SSD)).
[0347] The above are optional embodiments provided for the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the technical scope disclosed in the present application shall be included in the protection scope of the present application.
Claims
1. A method for displaying a lock screen image, characterized in that: Applied to an electronic device, in which a magazine lock screen function is enabled, the method includes: In response to the screen-off operation, the electronic device enters a screen-off state; The electronic device receives a first screen-lighting operation, wherein the electronic device applies a depth-of-field lock screen image as a lock screen image; In response to the first screen-lighting operation, the electronic device displays a target depth-of-field lock screen image of the current application in the lock screen interface, wherein the depth-of-field lock screen image includes a foreground image and a background image, and when the depth-of-field lock screen image is displayed in the lock screen interface, the foreground image is displayed in an upper layer of a layer where a system time indicator in the lock screen interface is located and partially blocks the system time indicator; In response to a horizontal sliding operation in the lock screen interface, the electronic device displays a magazine lock screen image adjacent to the target depth of field lock screen image.
2. The method according to claim 1, characterized in that In response to the first screen-lighting operation, the electronic device displays a target depth-of-field lock screen image of the current application in a lock screen interface, including: In response to the first screen-lighting operation, the electronic device queries whether a depth-of-field lock screen image is currently applied as a lock screen image; In a case where the electronic device currently applies a depth of field lock screen image as a lock screen image, the electronic device displays the target depth of field lock screen image currently applied in the lock screen interface.
3. The method according to claim 1 or 2, characterized in that: The lock screen interface also includes at least one of a notification bar, a system status bar and a function control. The layer where the notification bar is displayed is located at the topmost layer of the lock screen interface, the layer where the system status bar is located is between the layer where the background image is located and the layer where the system time indicator is located, and the layer where the function control is located is above the layer where the foreground image is located. The function control is a control of a function possessed by any application.
4. The method according to any one of claims 1 to 3, characterized in that In response to the screen-off operation, before the electronic device enters the screen-off state, the electronic device further includes: The electronic device receives a lock screen image setting operation; In response to the lock screen image setting operation, the electronic device sets the original image selected in the lock screen image setting operation as the target depth of field lock screen image, the original image is an image belonging to a depth of field image theme or an image in the gallery of the electronic device, and the depth of field image theme is an image theme in the electronic device.
5. The method according to any one of claims 1 to 4, characterized in that In response to the first screen-lighting operation, the electronic device displays a target depth-of-field lock screen image of the current application in a lock screen interface, including: In response to the first screen lighting operation, the electronic device controls the screen to light up; The electronic device displays a first view through a background view page component on the lock screen interface, and displays a second view through a foreground view page component, wherein a background image of the target depth-of-field lock screen image is rendered in the first view, and a foreground image of the target depth-of-field lock screen image is rendered in the second view; Wherein, the background view page component and the foreground view page component synchronously respond to the sliding operation in the lock screen interface.
6. The method according to claim 5, characterized in that Before the electronic device controls the screen to light up in response to the first screen lighting operation, the electronic device further comprises: In response to a screen-off operation of the electronic device, the electronic device obtains first detail information of the target depth-of-field lock screen image from a magazine lock screen data list, the magazine lock screen data list including detail information of each lock screen image in a plurality of lock screen images, the plurality of lock screen images including a plurality of magazine lock screen images and the target depth-of-field lock screen image, the first detail information being added to the magazine lock screen data list when the target depth-of-field lock screen image is applied; The electronic device determines, according to the first detail information and the first indication information, a foreground image of the target depth-of-field lock screen image, wherein the first indication information is used to indicate that the lock screen image currently applied by the electronic device is a depth-of-field lock screen image, and the first indication information is recorded when the target depth-of-field lock screen image is applied; The electronic device obtains the background image of the target depth-of-field lock screen image from the first detailed information; The electronic device renders the background image of the target depth of field lock screen image into the first view in the background view page component, and renders the foreground image of the target depth of field lock screen image into the second view in the foreground view page component.
7. The method according to claim 6, characterized in that The first detail information includes first index information, where the first index information is used to indicate the type of the target depth of field lock screen image; The electronic device determines, according to the first detail information and the first indication information, a foreground image of the target depth-of-field lock screen image, including: When the first indication information indicates that the electronic device is currently applying a depth of field lock screen image, and the first index information indicates that the target depth of field lock screen image is a depth of field lock screen image, the electronic device obtains the foreground image of the target depth of field lock screen image from a first designated directory, and the first designated directory is used to store foreground images of depth of field lock screen images.
8. The method according to claim 6 or 7, characterized in that: The electronic device renders the background image of the target depth of field lock screen image into the first view in the background view page component, and renders the foreground image of the target depth of field lock screen image into the second view in the foreground view page component, including: The electronic device renders the background image included in the first detail information into the first view, and records a correspondence between the view identifier of the first view and the first index information; The electronic device renders the foreground image of the target depth-of-field lock screen image into the second view, and records the correspondence between the view identifier of the second view and the first index information.
9. The method according to any one of claims 6 to 8, characterized in that: The method further comprises: The electronic device obtains, from the magazine lock screen data list, second detailed information of a previous magazine lock screen image of the target depth of field lock screen image and third detailed information of a next magazine lock screen image of the target depth of field lock screen image; The electronic device renders the background thumbnail of the previous magazine lock screen image into a previous view adjacent to the first view in the background view page component based on the second detail information, and renders the background thumbnail of the next magazine lock screen image into a next view adjacent to the first view in the background view page component based on the third detail information; The electronic device records in the foreground view page component that the foreground image of the previous magazine lock screen image is empty, and that the foreground image of the next magazine lock screen image is empty.
10. The method according to any one of claims 6 to 9, characterized in that: In response to the first screen-lighting operation, before the electronic device displays the target depth-of-field lock screen image of the current application in the lock screen interface, the electronic device further includes: In response to a lock screen image setting operation on the target depth of field lock screen image, the electronic device modifies original index information of the target depth of field lock screen image into first index information, so that the first index information is used to indicate a type of the target depth of field lock screen image; The electronic device obtains a background image of the target depth-of-field lock screen image; The electronic device encapsulates the background image of the target depth-of-field lock screen image and the first index information into the first detailed information; The electronic device adds the first detail information to the magazine lock screen data list and records the first indication information.
11. The method according to claim 10, characterized in that The electronic device adds the first detail information to the magazine lock screen data list, including: In the case where the target depth of field lock screen image is a theme depth of field lock screen image, if the magazine lock screen data list contains detailed information of a custom depth of field lock screen image set last time, the detailed information of the custom depth of field lock screen image set last time is replaced with the first detailed information, the theme depth of field lock screen image is an image belonging to a depth of field image theme, the depth of field image theme is an image theme in the electronic device, and the custom depth of field lock screen image is an image set from a gallery of the electronic device; When the target depth-of-field lock screen image is the custom depth-of-field lock screen image, the first detail information is inserted into any position in the magazine lock screen data list.
12. The method according to claim 11, characterized in that When the target depth of field lock screen image is the custom depth of field lock screen image, the first indication information is 0; when the target depth of field lock screen image is the theme depth of field lock screen image, the first indication information is 3.
13. The method according to any one of claims 1 to 12, characterized in that In response to the first screen-lighting operation, after the electronic device displays the target depth-of-field lock screen image of the current application in the lock screen interface, the electronic device further includes: In a case where the target depth-of-field lock screen image is a custom depth-of-field lock screen image, receiving a user lock operation on the target depth-of-field lock screen image, wherein the custom depth-of-field lock screen image is an image set from a gallery of the electronic device; In response to the user locking operation, the target depth-of-field lock screen image is set as a locked lock screen image, where the locked lock screen image is a lock screen image displayed after the screen is turned on based on the user locking operation marked.
14. The method according to any one of claims 1 to 13, characterized in that In response to the first screen-lighting operation, the electronic device displays a target depth-of-field lock screen image of the current application in a lock screen interface, including: If there is no locked lock screen image, then in response to the first screen light operation, the electronic device displays the target depth of field lock screen image in the lock screen interface, and the locked lock screen image is a lock screen image displayed after the screen is lighted based on the user's lock operation.
15. The method according to claim 1, characterized in that The method further comprises: The electronic device receives a second screen-lighting operation, wherein the electronic device does not apply a depth-of-field lock screen image as a lock screen image; In response to the second screen-lighting operation, the electronic device displays a target lock screen image in a lock screen interface, where the target lock screen image is any magazine lock screen image.
16. An electronic device, characterized in that: The electronic device comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the method according to any one of claims 1 to 15 when executing the computer program.
17. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the method according to any one of claims 1 to 15.