Wallpaper display method and electronic device

CN122795486APending Publication Date: 2026-09-22HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510344805.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-20
Publication Date
2026-09-22

AI Technical Summary

Technical Problem

对于具有多个屏幕的电子设备来说,各个屏幕的壁纸一般是相同类型,壁纸的显示过于单一

Benefits of technology

[0023]可以理解地,上述提供的第二方面所述的电子设备,以及第三方面所述的计算机可读存储介质及第四方面所述的计算机程序产品均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122795486A_ABST
    Figure CN122795486A_ABST
Patent Text Reader

Abstract

This application provides a wallpaper display method and an electronic device, relating to the field of electronic device technology, and applied to an electronic device, which includes at least a first screen and a second screen. The method includes: the wallpaper of the first screen is drawn by a first wallpaper engine in a first process; the wallpaper of the second screen is drawn by a second wallpaper engine in the first process, the second wallpaper engine and the first wallpaper engine belonging to the same wallpaper service; the first wallpaper engine and the second wallpaper engine correspond to different wallpaper types or correspond to the same wallpaper type; when the first screen displays a wallpaper and the second screen does not display a wallpaper, if a wallpaper display command for the second screen is detected, the wallpaper can be displayed more smoothly on the second screen. This method can improve the interactivity and linkage when switching between wallpapers on different screens.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electronic device technology, and in particular to a wallpaper display method and an electronic device. Background Technology

[0002] Currently, many electronic devices such as mobile phones, tablets, and laptops support users setting wallpapers, such as lock screen wallpapers and desktop wallpapers. These devices can display the user-set wallpapers when in the appropriate state. However, for electronic devices with multiple screens, the wallpapers on each screen are generally of the same type, resulting in a monotonous display.

[0003] With the development of technology, the wallpapers on multiple screens of electronic devices can be of different types. However, the interactivity and linkage between different types of wallpapers when switching between different screens are poor. Summary of the Invention

[0004] This application provides a wallpaper display method and an electronic device, which can improve the interactivity and linkage when switching wallpapers on different screens.

[0005] To achieve the above objectives, the embodiments of this application adopt the following technical solutions:

[0006] Firstly, a wallpaper display method is provided, applied to an electronic device. The electronic device includes at least a first screen and a second screen. The method includes: the wallpaper of the first screen is drawn by a first wallpaper engine in a first process; the wallpaper of the second screen is drawn by a second wallpaper engine also in the first process; and the second wallpaper engine and the first wallpaper engine belong to the same multi-engine wallpaper service. The first wallpaper engine and the second wallpaper engine correspond to different wallpaper types or the same wallpaper type. When the electronic device displays a wallpaper on the first screen but not on the second screen, since the wallpapers of both screens are drawn in the same process, when a wallpaper display instruction for the second screen is detected, the corresponding second wallpaper engine draws the wallpaper for the second screen in the same process. This allows for smoother wallpaper display on the second screen, reduces display latency, and improves the interactivity and responsiveness of wallpaper switching between different screens.

[0007] In one alternative implementation of the first aspect, when the wallpaper is displayed on the second screen, the wallpaper can either be stopped from being displayed on the first screen or continue to be displayed on the first screen. Since the first and second screens each use different corresponding wallpaper engines to render the wallpaper, the wallpaper display on the first and second screens can be controlled independently and flexibly, while ensuring interactivity and responsiveness in wallpaper switching between the different screens.

[0008] In one optional implementation of the first aspect, detecting a wallpaper display instruction for the second screen includes: when the electronic device in an unfolded state is displaying a wallpaper on the first screen, detecting that the electronic device is switching from an unfolded state to a folded state, generating a wallpaper display instruction for the second screen, and stopping the display of the wallpaper on the first screen; or, when the electronic device in a folded state is displaying a wallpaper on the first screen, detecting that the electronic device is switching from a folded state to an unfolded state, generating a wallpaper display instruction for the second screen, and stopping the display of the wallpaper on the first screen or continuing to display the wallpaper on the first screen; or, when the electronic device is displaying a lock screen wallpaper on both the first and second screens, detecting an unlock operation on the second screen, and generating a wallpaper display instruction, wherein the wallpaper display instruction is used to instruct the display of a desktop wallpaper on both the first and second screens. Thus, the electronic device can generate a wallpaper display instruction for the second screen by detecting state changes and operations on the second screen, thereby achieving wallpaper switching between the first and second screens.

[0009] In one optional implementation of the first aspect, the first wallpaper engine and the second wallpaper engine correspond to the same type of wallpaper, and the wallpaper is displayed on the second screen. This includes: after setting the theme of the electronic device to the target theme, when the wallpaper is first displayed on the second screen, the second wallpaper engine draws the wallpaper and displays the drawn wallpaper on the second screen. After setting the theme of the electronic device to the target theme, when the wallpaper is not first displayed on the second screen, the wallpaper that was initially drawn is displayed on the second screen. In this way, the electronic device not only does not need to cache wallpaper data, saving caching overhead, but also does not need to draw the wallpaper every time it switches between displaying different wallpapers on different screens, saving drawing overhead and improving the efficiency of wallpaper display.

[0010] In an optional implementation of the first aspect, the method further includes: the electronic device establishing a target correspondence, which includes a correspondence between a first wallpaper engine and a first screen identifier of a first screen, and a correspondence between a second wallpaper engine and a second screen identifier of a second screen. The wallpaper displayed on the first screen is drawn based on the first wallpaper engine corresponding to the first screen identifier; the wallpaper displayed on the second screen is drawn based on the second wallpaper engine corresponding to the second screen identifier. The electronic device can ensure the correctness and consistency of wallpaper display by clearly defining the mapping relationship between the wallpaper engine and the screen identifier.

[0011] In an optional implementation of the first aspect, the method further includes: an electronic device receiving a first operation, the first operation triggering the setting of the electronic device's theme to a target theme; then, the electronic device, in response to the first operation, determining that the target theme belongs to a multi-engine wallpaper theme; and finally, the electronic device launching a wallpaper service based on the multi-engine wallpaper theme. By determining whether the target theme belongs to a multi-engine wallpaper theme, the electronic device ensures that the system can correctly identify and process multi-engine wallpaper themes; and by launching the multi-engine wallpaper service, it ensures that the service initialization and resource allocation are completed normally and support subsequent operations.

[0012] In one alternative implementation of the first aspect, establishing the target mapping relationship includes: upon successful initiation of the wallpaper service, the electronic device can create a first wallpaper engine and a second wallpaper engine based on the wallpaper types included in the target theme, and establish the target mapping relationship. The electronic device can then use the first and second wallpaper engines to draw wallpapers on different screens, thereby achieving the function of displaying wallpapers on multiple screens.

[0013] In one optional implementation of the first aspect, based on the wallpaper types included in the target theme, a first wallpaper engine and a second wallpaper engine are created, and a target correspondence is established. This includes: the electronic device acquiring configuration information corresponding to the target theme, and determining the wallpaper types corresponding to the first screen and the second screen respectively based on the configuration information. Then, the electronic device can create the first wallpaper engine and the second wallpaper engine based on the wallpaper types corresponding to the first screen and the second screen respectively, and establish a target correspondence. The first wallpaper engine is used to draw the wallpaper of the type corresponding to the first screen, and the second wallpaper engine is used to draw the wallpaper of the type corresponding to the second screen. The electronic device can determine the wallpaper type for each screen by acquiring the configuration information of the target theme and create a corresponding wallpaper engine, so as to effectively manage and display wallpapers displayed on different screens in a multi-screen device, ensuring the accuracy and consistency of wallpaper types corresponding to different screens, and improving the quality of wallpaper display effects.

[0014] In one optional implementation of the first aspect, the wallpaper service includes a first wallpaper engine, a second wallpaper engine, and a wallpaper engine agent. The method further includes: the wallpaper engine agent sending a display request to the first wallpaper engine and / or the second wallpaper engine corresponding to the screen to be displayed, according to a wallpaper display instruction; the first wallpaper engine drawing the wallpaper corresponding to the first screen based on the received display request; and the second wallpaper engine drawing the wallpaper corresponding to the second screen based on the received display request. By introducing a wallpaper engine agent into the wallpaper service, electronic devices can effectively manage and coordinate the display requests of multiple wallpaper engines, ensuring that wallpaper display requests between multiple screens can be effectively processed and executed, thus improving the flexibility and response speed of wallpaper display.

[0015] In one optional implementation of the first aspect, the second screen corresponds to at least one second window; the correspondence between the second wallpaper engine and the second screen identifier of the second screen in the target correspondence includes the correspondence between the at least one second window corresponding to the second screen and the second screen identifier. The wallpaper displayed on the at least one second window corresponding to the second screen is drawn based on the second wallpaper engine corresponding to the second screen identifier. By associating the wallpaper engine with the screen identifier and its corresponding window, the electronic device ensures that the mapping relationship between the wallpaper engine, the screen, and the window is correct, enabling the wallpaper engine to correctly draw and display the wallpaper content.

[0016] In an optional implementation of the first aspect, the wallpaper display instruction is used to indicate a second screen identifier corresponding to the second screen and a target window identifier for the wallpaper to be displayed corresponding to the second screen. The method further includes: the electronic device determining at least one second window corresponding to the second screen based on the second screen identifier, and determining the target window for the wallpaper to be displayed from the at least one second window based on the target window identifier. Then, the electronic device determines that the target window is in a first visibility state, wherein the first visibility state indicates that the corresponding window is a visible window for the wallpaper to be displayed. Thus, the electronic device can effectively ensure that in a multi-screen electronic device, the wallpaper display instruction can accurately locate the target window of the second screen and ensure that the window is in a visible state, thereby achieving correct wallpaper display.

[0017] In one optional implementation of the first aspect, displaying wallpaper on the second screen includes: the electronic device determining a corresponding second wallpaper engine based on a second screen identifier and sending a first visibility state corresponding to the target window to the second wallpaper engine. Then, when the target window is in the first visibility state, the electronic device displays the wallpaper drawn based on the second wallpaper engine within the target window on the second screen. By locating the wallpaper engine based on the screen identifier, the electronic device can flexibly adapt to the different display needs of multi-screen devices, and by dynamically determining the visibility state of the target window, it ensures that the wallpaper content of the second screen is acquired and displayed only when needed, avoiding unnecessary resource consumption.

[0018] In one optional implementation of the first aspect, the electronic device includes a window management module, a wallpaper frame, and a wallpaper application. The wallpaper application is used to create a first wallpaper engine and a second wallpaper engine. Establishing a target correspondence includes: after receiving a first notification instruction from the wallpaper application, the wallpaper frame maps the second screen identifier of the second screen to the second wallpaper engine; the wallpaper frame sends a second notification instruction to the window management module; and after receiving the second notification instruction from the wallpaper frame, the window management module maps at least one second window corresponding to the second screen to the second screen identifier of the second screen. The electronic device can map screen identifiers, windows on the screen, and wallpaper engines through the collaborative work of the wallpaper application, wallpaper frame, and window management module. This ensures that the wallpaper engine can correctly identify and draw the wallpaper content of the corresponding screen, achieving effective management and display of wallpapers on multiple screens.

[0019] In an optional implementation of the first aspect, before displaying the wallpaper on the second screen, the method further includes: after receiving a wallpaper display instruction, the window management module sends the visibility status of each window corresponding to each screen in the electronic device to the wallpaper application; the wallpaper application, based on the visibility status of each window corresponding to each screen, sends the visibility status of each window to the wallpaper engine corresponding to each screen, so that the wallpaper engine can draw the wallpaper according to the visibility status of each window. The electronic device can accurately obtain the window visibility status of each screen, thereby enabling the wallpaper engine to draw the corresponding wallpaper content according to these statuses.

[0020] In a second aspect, this application provides an electronic device comprising: at least two displays, a memory, and one or more processors; the at least two displays, the memory, and the processors are coupled together; wherein the memory stores computer program code, the computer program code including computer instructions, which, when executed by the processor, cause the electronic device to perform the method described in any one of the first aspects above.

[0021] Thirdly, this application provides a computer-readable storage medium storing instructions that, when executed on an electronic device, cause the electronic device to perform any of the methods described in the first aspect above.

[0022] Fourthly, this application provides a computer program product containing instructions that, when run on an electronic device, enable the electronic device to perform the method described in any one of the first aspects above.

[0023] It is understood that the electronic device described in the second aspect, the computer-readable storage medium described in the third aspect, and the computer program product described in the fourth aspect are all used to perform the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here. Attached Figure Description

[0024] Figure 1 This is a schematic diagram illustrating the wallpaper implementation process for a foldable screen, provided in an embodiment of this application.

[0025] Figure 2 A flowchart illustrating the process of applying a single-engine wallpaper theme to an electronic device;

[0026] Figure 3 A schematic diagram illustrating the process of displaying a single-engine wallpaper on an electronic device;

[0027] Figure 4 This is a schematic diagram of the structure of a multi-engine wallpaper service provided in an embodiment of this application;

[0028] Figure 5 A flowchart illustrating the application of a multi-engine wallpaper theme on an electronic device, as provided in this embodiment of the application;

[0029] Figure 6 A schematic diagram illustrating a scenario where an electronic device generates wallpaper display instructions, as provided in an embodiment of this application.

[0030] Figure 7 A schematic diagram illustrating a scenario where an electronic device generates wallpaper display instructions, as provided in an embodiment of this application.

[0031] Figure 8 A schematic diagram illustrating the process of displaying multi-engine wallpapers on an electronic device, provided as an embodiment of this application;

[0032] Figure 9 A software structure block diagram of an electronic device provided in an embodiment of this application;

[0033] Figure 10 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application;

[0034] Figure 11 This is a schematic diagram of a chip system provided in an embodiment of this application. Detailed Implementation

[0035] The technical solutions of the embodiments of this application will now be described with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort should fall within the scope of protection of this application.

[0036] It should be noted that the terms "first," "second," etc., used below are for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first," "second," etc., may explicitly or implicitly include one or more of that feature. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.

[0037] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized.

[0038] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0039] To better illustrate the technical solution of this application, the terminology involved in this application is briefly summarized below.

[0040] (1) Wallpaper: refers to the background image displayed on the screen of an electronic device. Wallpapers for electronic devices can be divided into lock screen wallpapers and desktop wallpapers, etc. Among them, lock screen wallpapers refer to the background image displayed when the electronic device is locked. Desktop wallpapers refer to the background image displayed when the electronic device is unlocked and the main interface of the electronic device is entered.

[0041] Wallpapers can be categorized into various types, including static wallpapers, live wallpapers, interactive wallpapers, and others. Static wallpapers are image-based, live wallpapers are animated or video-based with dynamic effects, and interactive wallpapers allow users to interact with the wallpaper, such as through touch responses or sound controls.

[0042] Different types of wallpapers can be further divided into different subtypes. For example, live wallpapers can be divided into super wallpapers, folded live wallpapers, 3D folded live wallpapers, etc.

[0043] In this embodiment of the application, the same wallpaper type can refer to wallpapers with the same subtype, while different wallpaper types refer to wallpapers with different subtypes.

[0044] (2) Wallpaper Service: Wallpaper Service is a service class in the Android system. It inherits from the Service class and is specifically designed to implement wallpaper display and management functions. The main function of Wallpaper Service is to provide a framework through which developers can create custom wallpaper applications.

[0045] The WallpaperService uses the Engine class to handle the drawing, interaction, and updating logic of the wallpaper. The wallpaper engine needs to run within the framework of the wallpaper service to receive system events and user interactions.

[0046] Currently, many electronic devices such as mobile phones, tablets, and laptops support users setting wallpapers, such as lock screen wallpapers and desktop wallpapers. These devices can display the user-set wallpapers when in the appropriate state. With the continuous development of electronic device technology, they are no longer limited to a single traditional display interface but are evolving towards greater diversity and interactivity. For electronic devices with more than one screen, each screen can have its own wallpaper set.

[0047] With the development of technology, the wallpapers on multiple screens of electronic devices can be of different types. However, the interactivity and linkage between different types of wallpapers when switching between different screens are poor.

[0048] Taking a foldable device with two screens as an example, the screens can be divided into an inner screen and an outer screen. The inner screen is the main screen area when the device is unfolded, while the outer screen is the screen area when the device is folded. Generally, the inner and outer screens use the same wallpaper type, resulting in a monotonous display. To address this issue, the inner and outer screens of a foldable device can use different wallpaper types.

[0049] Please see Figure 1 , Figure 1 This is a schematic diagram illustrating the implementation process of wallpapers for foldable screens. Currently, foldable screen wallpapers use a single-engine wallpaper service, such as... Figure 1 As shown, the single-engine wallpaper service implements a WallpaperService, and within the WallpaperService, a single WallpaperEngine is created. Different wallpaper engines can correspond to different wallpaper types, and one wallpaper engine can be used to draw wallpapers of a given type. Figure 1 In this system, the inner and outer screens of a foldable screen can be rendered using this wallpaper engine. Different wallpaper types belong to different processes. If the inner and outer screens correspond to different wallpaper types, switching between them requires switching between different processes, leading to display delays, choppy switching processes, and poor interactivity and responsiveness.

[0050] Next, this application embodiment will first describe the process of applying a wallpaper theme and displaying the wallpaper when using a single-engine wallpaper service on an electronic device.

[0051] Please see Figure 2 , Figure 2 This is a flowchart illustrating the process of applying a single-engine wallpaper theme to an electronic device. For example... Figure 2 As shown, electronic devices include theme applications, wallpaper frames, and wallpaper applications. Currently, wallpapers on electronic devices are provided in the form of theme packs. Various theme packs are pre-installed on electronic devices, and each theme pack defines its attributes and declares the type of wallpaper service used. The theme pack attributes include single-engine theme packs and multi-engine theme packs.

[0052] After receiving the instruction to apply a single-engine wallpaper theme (step 2.1), the theme application unzips the single-engine theme package (step 2.2). Then, the theme application sends an instruction to the wallpaper framework to call the interface to set the single-engine wallpaper service corresponding to the current wallpaper (step 2.3). After receiving the instruction, the wallpaper framework sends an instruction to the wallpaper application to launch the single-engine wallpaper service (step 2.4). After receiving the instruction, the wallpaper application calls the onCreate method. onCreate is a callback method in the lifecycle of an Activity or Service, which is called by the system when the Activity or Service is first created. For the wallpaper application, if WallpaperService is used to implement the wallpaper function, the onCreate method of WallpaperService will be executed when the wallpaper service is created in response to some instruction (such as the user selecting a new wallpaper theme).

[0053] Then, the wallpaper application sends a command to the wallpaper framework to indicate that the single-engine wallpaper service has been successfully launched (step 2.5). Upon receiving the command indicating successful launch of the single-engine wallpaper service, the wallpaper framework sends a command to the wallpaper application to create the wallpaper engine (step 2.6). Upon receiving the command, the wallpaper application reads the configuration file from the single-engine theme package (step 2.7). This configuration file defines the specific content to be displayed for the current theme, as well as the content specifications. For example, the content to be displayed for the theme may include key information such as the path, format, and resolution of the wallpaper image, as well as additional elements such as dynamic effects, icon sets, and interface decorations. Content specifications may include image specifications, icon and interface element specifications, layout and arrangement specifications, and dynamic effect specifications.

[0054] After reading the configuration file, the wallpaper application initializes the wallpaper engine according to the configuration file (step 2.8), and the wallpaper engine is successfully created (step 2.9). At this point, when using a single-engine wallpaper service, if the currently set desktop wallpaper and lock screen wallpaper correspond to the same wallpaper engine, the electronic device can have only one wallpaper engine and one window. The aforementioned "one window" refers to a wallpaper window, which can actually be divided into a desktop wallpaper window and a lock screen wallpaper window.

[0055] In some optional embodiments, when using a single-engine wallpaper service, if only the lock screen wallpaper or desktop wallpaper is currently set, the electronic device may include two single-engine wallpaper services, corresponding to the lock screen wallpaper or desktop wallpaper respectively, with each single-engine wallpaper service having only one wallpaper engine and one window.

[0056] Then, the wallpaper application sends a command to the wallpaper frame indicating that the wallpaper engine has been successfully created. The wallpaper engine then sends a command to the theme application, at which point the application of a single-engine wallpaper theme on the electronic device ends.

[0057] After applying the single-engine wallpaper theme to an electronic device, the wallpaper corresponding to that theme can be displayed when needed. Please refer to [link / reference]. Figure 3 , Figure 3 This is a schematic diagram illustrating a process for displaying a single-engine wallpaper on an electronic device, as provided in an embodiment of this application. Figure 3 As shown, the electronic device also includes a window management module and a display data compositing module. The display data compositing module may include a Surfaceflinger, a Graphics Processing Unit (GPU), and a Hardware Composer (HWC). Upon receiving a wallpaper display instruction (step 3.1), the window management module collects the screen identifier (ID) of the wallpaper to be displayed and, based on the screen ID, collects the wallpaper window to be adjusted (step 3.2). Then, the window management module distributes visibility changes to the wallpaper application (step 3.3). The wallpaper application internally draws the wallpaper content onto the wallpaper layer based on the visibility changes (step 3.4). After drawing the wallpaper content, the wallpaper application sends a notification to the window management module. The window management module then sets the wallpaper window to be visible based on the notification (step 3.5), and then sends an instruction to the display data compositing module to apply the visibility of the wallpaper window to the display data compositing module (step 3.6). The display data compositing module then displays the data of the wallpaper layer (step 3.7).

[0058] In the display data synthesis module, after receiving the command from the window management module that the wallpaper window is visible, SurfaceFlinger can collect data from the visible wallpaper layers, as well as the status bar, navigation bar, etc., and then use the GPU or HWC to synthesize and overlay the layers to obtain the final data to be displayed. The specific process of the display data synthesis module sending the wallpaper layer data to the display is not described in detail here.

[0059] For electronic devices using the aforementioned single-engine wallpaper theme, taking an electronic device with an inner screen and an outer screen as an example, the electronic device contains only one wallpaper engine and one wallpaper window. When switching between displaying different wallpaper types on the inner screen and the outer screen, the electronic device needs to recreate the wallpaper engine and wallpaper service corresponding to different wallpaper types. It also needs to switch between processes corresponding to different wallpaper services to draw different types of wallpapers, resulting in a large display delay of wallpapers on different screens during the switching process, and poor interactivity and linkage.

[0060] To address the aforementioned issues, this application provides a wallpaper display method applicable to electronic devices comprising at least a first screen and a second screen. The wallpaper on the first screen is drawn by a first wallpaper engine in a first process, and the wallpaper on the second screen is drawn by a second wallpaper engine also in the first process. Both the second and first wallpaper engines belong to the same multi-engine wallpaper service, and may correspond to different or the same wallpaper types. Since the wallpapers for both screens are drawn within the same process, this method allows for smoother wallpaper display on the second screen when a wallpaper display command for the second screen is detected, even when the first screen displays the wallpaper but the second screen does not. This reduces display latency and improves the interactivity and responsiveness of wallpaper switching between different screens.

[0061] First, this application's embodiments describe the structure of the multi-engine wallpaper service. Please refer to... Figure 4 , Figure 4 This is a schematic diagram illustrating the structure of a multi-engine wallpaper service provided in an embodiment of this application. Figure 4 As shown, WallpaperService 401 includes multiple wallpaper engines, which can be referred to as a multi-engine wallpaper service. For example, three wallpaper engines are created in WallpaperService 401. Of the three wallpaper engines, one is a proxy layer, which can be called Wallpaper Engine Proxy 402, and the other two are implementation layers, such as the first wallpaper engine 403 and the second wallpaper engine 404 mentioned above. The proxy layer is used to distribute the received callbacks from the wallpaper engines to the implementation layers, allowing the corresponding implementation layer to display when switching between inner and outer screens. The implementation layers are used to actually draw the wallpaper; each implementation layer creates a wallpaper window. Figure 4 In this process, the first wallpaper engine 403 can create desktop wallpaper 1 corresponding to the first screen, and the second wallpaper engine 404 can create desktop wallpaper 2 corresponding to the second screen. By introducing a wallpaper engine proxy into the wallpaper service, the display requests of multiple wallpaper engines can be effectively managed and coordinated, enabling wallpaper engines on different screens to respond to display requests in a timely manner and achieve correct wallpaper display.

[0062] Figure 4In this context, the desktop of an electronic device can include three windows: the first window is the desktop itself, including widgets, icons, and the status bar; the second window is the lock screen wallpaper; and the third window is the desktop wallpaper. The desktop wallpaper can be divided into Desktop Wallpaper 1 and Desktop Wallpaper 2. Desktop Wallpaper 1 is displayed on the first screen, and Desktop Wallpaper 2 is displayed on the second screen. The lock screen wallpaper and desktop wallpaper are mutually exclusive; only the lock screen wallpaper is displayed when the electronic device is locked, and only the desktop wallpaper is displayed when the device is unlocked. When the wallpaper window is visible, the corresponding wallpaper engine draws the wallpaper content on the wallpaper layer associated with that window.

[0063] In some embodiments, the lock screen wallpaper can also be divided into lock screen wallpaper 1 and lock screen wallpaper 2, with lock screen wallpaper 1 displayed on the first screen and lock screen wallpaper 2 displayed on the second screen. Lock screen wallpaper 1 can share a first wallpaper engine with desktop wallpaper 1, and lock screen wallpaper 2 can share a second wallpaper engine with desktop wallpaper 2. Alternatively, wallpaper service 401 can recreate corresponding wallpaper engines for lock screen wallpaper 1 and lock screen wallpaper 2 respectively. For example, wallpaper service 401 also includes a third wallpaper engine corresponding to lock screen wallpaper 1 and a fourth wallpaper engine corresponding to lock screen wallpaper 2. In this case, each screen corresponds to two wallpaper engines, that is, the first screen corresponds to the first wallpaper engine and the third screen engine, and the second screen corresponds to the second wallpaper engine and the fourth screen engine.

[0064] Figure 4 In this context, the first wallpaper engine and the second wallpaper engine can correspond to different wallpaper types or the same wallpaper type. The service corresponding to a wallpaper type can be configured in the wallpaper service 401, or the wallpaper engine can call the service corresponding to its corresponding wallpaper type.

[0065] Next, after introducing the multi-engine wallpaper service, this application embodiment will describe the process of applying wallpaper themes when using the multi-engine wallpaper service on an electronic device.

[0066] Please see Figure 5 , Figure 5 This is a flowchart illustrating the application of a multi-engine wallpaper theme on an electronic device, as provided in an embodiment of this application. Figure 5 As shown, the electronic device includes a theme application, a window management module, wallpaper frames, and a wallpaper application. The electronic device comes pre-installed with various theme packages, each defining the wallpaper types for the first and second screens, respectively. One theme package corresponds to one wallpaper type, and one wallpaper type can correspond to multiple theme packages.

[0067] After receiving the instruction to apply a multi-engine wallpaper theme (step 5.1), the theme application unzips the multi-engine theme package (step 5.2). Specifically, the theme application interface can display selection controls corresponding to multiple themes. After the electronic device receives a selection operation for the selection control corresponding to theme 1, the electronic device begins to apply theme 1. If the theme package corresponding to theme 1 has the attribute of multi-engine wallpaper, it indicates that the theme application has received the instruction to apply theme 1. Then, the theme application unzips the multi-engine theme package corresponding to theme 1. The electronic device can ensure that the system can correctly identify and process multi-engine wallpaper themes by determining whether the selected target theme belongs to a multi-engine wallpaper theme.

[0068] In some embodiments, the themes displayed in the theme application's interface can be divided into lock screen themes and desktop themes. The theme package corresponding to the lock screen theme defines the lock screen wallpaper types for the first and second screens, respectively, and the theme package corresponding to the desktop theme defines the desktop wallpaper types for the first and second screens, respectively. Alternatively, the theme package corresponding to the theme displayed in the theme application's interface defines both the lock screen wallpaper types and the desktop wallpaper types for the first and second screens, respectively.

[0069] Then, the theme application sends a command to the wallpaper framework to call the interface to set the current wallpaper to the corresponding multi-engine wallpaper service (step 5.3). Upon receiving the command, the wallpaper framework sends a command to the wallpaper application to launch the multi-engine wallpaper service (step 5.4). Upon receiving the command, the wallpaper application calls the onCreate method. Then, the wallpaper application sends a command to the wallpaper framework to indicate that the multi-engine wallpaper service has been successfully launched (step 5.5). By launching the multi-engine wallpaper service, the electronic device ensures that the service initialization and resource allocation are completed correctly and that subsequent operations are supported.

[0070] After receiving the instruction that the multi-engine wallpaper service has been successfully launched, the wallpaper framework sends instructions to the wallpaper application to create a wallpaper engine (step 5.6). Upon receiving the instructions, the wallpaper application reads the configuration file from the multi-engine theme package (step 5.7). This configuration file defines the specific content to be displayed for the first and second screens under the current theme, as well as the content specifications.

[0071] After reading the configuration file, the wallpaper application creates wallpaper engines corresponding to different screens based on the configuration file (step 5.8). For example, it creates a first wallpaper engine for the first screen and a second wallpaper engine for the second screen. Electronic devices can determine the wallpaper type for each screen by obtaining the theme's configuration information and create corresponding wallpaper engines. This allows for effective management and display of wallpapers on different screens, ensuring the accuracy and consistency of wallpaper types for different screens and improving the quality of wallpaper display.

[0072] In some alternative embodiments, the electronic device can respond to user actions by customizing the wallpaper type for each screen. The electronic device can then create a corresponding wallpaper engine based on the wallpaper type for each screen.

[0073] Then, the wallpaper application sends a notification instruction to the wallpaper frame. Upon receiving the notification instruction, the wallpaper frame saves the wallpaper engine and its corresponding screen identifier (step 5.9), that is, it maps the first wallpaper engine to the first screen identifier of the first screen and the second wallpaper engine to the second screen identifier of the second screen. Electronic devices can ensure the correctness and consistency of wallpaper display by clearly defining the mapping relationship between wallpaper engines and screen identifiers (establishing a target correspondence).

[0074] After the wallpaper frame saves the wallpaper engine and its corresponding screen identifier, it sends a notification instruction to the window management module. Upon receiving the notification instruction, the window management module saves the correspondence between windows on each screen and their screen identifiers (step 5.10). That is, at least one first window corresponding to the first screen is associated with the first screen identifier of the first screen, and at least one second window corresponding to the second screen is associated with the second screen identifier of the second screen. This correspondence between windows and screen identifiers is equivalent to the correspondence between window IDs and screen IDs. Through the collaborative work of the wallpaper application, wallpaper frame, and window management module, electronic devices can associate screen identifiers, windows on the screen, and the wallpaper engine. This ensures that the wallpaper engine can correctly identify and render the wallpaper content for the corresponding screen, achieving effective management and display of wallpapers across multiple screens.

[0075] By associating a first wallpaper engine with a first screen and its corresponding window, and a second wallpaper engine with a second screen and its corresponding window, the electronic device can ensure that the mapping between the wallpaper engine and the screen and window is correct before displaying a wallpaper on each screen. By clearly defining these mappings, the electronic device can ensure that each screen displays the wallpaper content drawn by the corresponding wallpaper engine when subsequently displaying wallpapers.

[0076] At this point, the wallpaper application, having successfully created the wallpaper engine (step 5.11), sends a command to the wallpaper frame indicating successful creation. The wallpaper engine then sends a command to the theme application, at which point the application of the multi-engine wallpaper theme on the electronic device ends.

[0077] After applying the aforementioned multi-engine wallpaper theme to an electronic device, the wallpaper corresponding to that theme can be displayed when needed. The electronic device needs to display a wallpaper when it receives a wallpaper display command.

[0078] Please see Figure 6 , Figure 6 This application provides a schematic diagram illustrating a scenario where an electronic device generates wallpaper display instructions. For example, as shown... Figure 6 As shown in (a), taking a foldable screen phone, which includes a first screen (inner screen) and a second screen (outer screen), as an example, the foldable screen phone in the unfolded state displays the first screen 601, which displays the wallpaper, while the second screen does not display the wallpaper. If the foldable screen phone is detected to be changing from the unfolded state to the folded state, a wallpaper display instruction is generated for the second screen. The foldable screen phone in the folded state displays the second screen 602. At this time, the first screen 601 has been folded, so the wallpaper display stops.

[0079] For example, such as Figure 6 As shown in (b), the foldable phone in the folded state displays the first screen 603, which displays the wallpaper. At this time, the second screen is folded and does not display the wallpaper. If the foldable phone is detected to change from the folded state to the unfolded state, a wallpaper display instruction is generated for the second screen. The unfolded state of the foldable phone displays the second screen 604. At this time, the wallpaper can be stopped or continued to be displayed on the first screen 603.

[0080] Figure 6 (a)- Figure 6 (b) describes folding the electronic device vertically to achieve the folding of the screen. In other words, some electronic devices can have their screens folded vertically. Of course, it's also possible to fold the screen horizontally to achieve the same effect. That is, some other electronic devices can have their screens folded horizontally. For example, as... Figure 6 As shown in (c), when a foldable phone is folded horizontally, it can be divided into a first screen 605 and a second screen 606. The first screen displays the wallpaper, while the second screen does not. If an operation on the second screen 606 is detected, a wallpaper display command is generated for the second screen, and the second screen 606 displays the wallpaper. At this time, the first screen 605 can continue to display the wallpaper. Alternatively, the first screen can also stop displaying the wallpaper.

[0081] In some embodiments, the foldable phone may be equipped with a folding state detection sensor and an unfolding state detection sensor. When the foldable phone is folded from the unfolded state or unfolded from the folded state, the sensor detects this change and notifies the processor. The processor generates a wallpaper display instruction and switches to displaying the wallpaper on the second screen.

[0082] It should be understood that, in addition to folding horizontally or vertically, the foldable screen in the embodiments of this application may also include inward-folding foldable screens and outward-folding foldable screens. Figure 6 The foldable screen phones shown in (a), (b), and (c) are all inward-folding screens. The diagrams for outward-folding screens are not shown in the attached figures.

[0083] In some embodiments, the electronic device includes at least a first screen and a second screen, which can be independent screens in the electronic device or a single, integrated screen that is folded into at least two parts.

[0084] The wallpaper displayed on the first and second screens can be either a desktop wallpaper or a lock screen wallpaper. For example, if the first screen displays a desktop wallpaper, when a wallpaper display command is generated for the second screen, the foldable phone displays the second screen, which can display either the desktop wallpaper or the lock screen wallpaper. Conversely, if the first screen displays a lock screen wallpaper, when a wallpaper display command is generated for the second screen, the foldable phone displays the second screen, which can also display either the desktop wallpaper or the lock screen wallpaper.

[0085] In this embodiment, taking the generation of a wallpaper display instruction after the electronic device changes from an unfolded state to a folded state as an example, the process of the electronic device displaying a multi-engine wallpaper after applying a multi-engine wallpaper theme and receiving a wallpaper display instruction for the folded screen is described. Please refer to... Figure 7 , Figure 7 This is a schematic diagram illustrating a scenario where an electronic device generates wallpaper display instructions, as provided in an embodiment of this application. Figure 7 As shown, the electronic device in the unfolded state displays the first screen 701. If a user's folding operation is detected, the electronic device changes from the unfolded state to the folded state, and the folded electronic device displays the second screen 702. The wallpaper displayed on the first screen 701 is drawn by a first wallpaper engine, and the wallpaper displayed on the second screen 702 is drawn by a second wallpaper engine. The first and second wallpaper engines belong to the same wallpaper service and draw their respective wallpaper content in the same process.

[0086] It should be understood that Figure 1 , Figure 4 , Figure 6 and Figure 7The wallpaper shown is only used to indicate that a wallpaper is displayed on the screen. In addition to displaying a wallpaper, the screen of an electronic device may also display other desktop elements, and this application does not limit this. For example, while displaying a desktop wallpaper, the screen may also display application icons, taskbars, widgets, etc., which are not shown in the figure.

[0087] A flowchart illustrating the process of an electronic device displaying a multi-engine wallpaper after receiving a wallpaper display command for the second screen can be found here. Figure 8 .like Figure 8 As shown, the electronic device includes a window management module, a wallpaper application, and a display data synthesis module. When the window management module receives a wallpaper display instruction (step 8.1), it collects the screen ID of the screen where the wallpaper needs to be displayed and the wallpaper window that needs to be adjusted based on the screen ID (step 8.2). The wallpaper display instruction contains the screen ID corresponding to the second screen where the wallpaper is to be displayed, and the window ID of the wallpaper to be displayed corresponding to the second screen.

[0088] The screen ID can be determined by hardware parameters, screen serial number or other unique identifiers, which will not be elaborated here. For example, the first screen ID is screen A and the second screen ID is screen B.

[0089] In other words, the window management module determines the screen to be displayed as the second screen based on the second screen ID (screen B) contained in the received window display instruction, and determines the window corresponding to the second screen based on the second screen ID. Then, the window management module distributes the visibility change to the wallpaper application (step 8.3).

[0090] Specifically, the window management module sends the visibility status of each window corresponding to each screen on the electronic device to the wallpaper application. The visibility status includes a visible state (first visibility state) and an invisible state (second visibility state). If the visibility status is the first value, it indicates that the corresponding window is visible, that is, the window where the wallpaper is to be displayed. If the visibility status is the second value, it indicates that the corresponding window is invisible. The first and second values ​​can be represented by integers, letters, or other strings, etc., which will not be elaborated here. For example, the first value can be 1, and the second value can be 0.

[0091] Each screen can also have its own set of window IDs for its multiple windows. For example, the lock screen window for the first screen might have the window ID a1, the desktop window for the first screen might have the window ID a2, the lock screen window for the second screen might have the window ID b1, and the desktop window for the first screen might have the window ID b2. This allows electronic devices to effectively ensure that in multi-screen devices, the wallpaper display command accurately locates the target window on the second screen and ensures that the window is visible, thus achieving correct wallpaper display.

[0092] Suppose that the visibility states sent by the window management module to the wallpaper application can include: Screen A: window a1, 0; window a2, 0 and Screen B: window b1, 0; window b2, 1, which means that the windows of the first screen are all invisible, and the desktop wallpaper of the second screen is visible.

[0093] In some optional embodiments, the wallpaper application can identify whether it is currently in lock screen or desktop mode, and can control whether to display the lock screen wallpaper or the desktop wallpaper, without requiring fine-grained control from the window management module. For example, the visibility status sent by the window management module to the wallpaper application may include: Screen A: 0 and Screen B: 1. In this case, it indicates that the first screen is invisible and the second screen is visible. The wallpaper application can identify that the second screen is in desktop mode and needs to control whether to display the desktop wallpaper. At this time, based on the received visibility status of the second screen, it can determine that the desktop wallpaper of the second screen is visible.

[0094] After receiving the visibility status of each window from the window management module, the wallpaper application internally sends the visibility status to each wallpaper engine based on the window ID. Each wallpaper engine then renders the wallpaper content according to the visibility status of its corresponding window (step 8.4). For example, if the lock screen wallpaper and desktop wallpaper share a single wallpaper engine, the first wallpaper engine does not render because all windows on the first screen are invisible, while the second wallpaper engine renders the wallpaper content because the desktop wallpaper on the second screen is visible. If the lock screen wallpaper and desktop wallpaper on each screen correspond to different wallpaper engines, the wallpaper content is rendered by the wallpaper engine corresponding to the desktop wallpaper on the second screen because the desktop wallpaper on the second screen is visible. Each wallpaper engine can call different rendering algorithms based on its type to render the wallpaper content. Therefore, electronic devices can dynamically determine the visibility status of windows, allowing the wallpaper engines to render the corresponding wallpaper content based on these statuses. This ensures that the wallpaper content for the second screen is only acquired and displayed when needed, avoiding unnecessary resource consumption.

[0095] After drawing the wallpaper content, the wallpaper application sends a notification to the window management module. The window management module then sets the corresponding wallpaper window to be visible based on this notification (step 8.5), and then sends an instruction to the display data compositing module to apply the visibility of the wallpaper window to the display data compositing module (step 8.6). The display data compositing module then displays the wallpaper layer data (step 8.7). The specific process of the display data compositing module displaying the wallpaper layer data can be described above and will not be repeated here.

[0096] In some embodiments, when the wallpaper is displayed on the second screen, the wallpaper can be either stopped or continued to be displayed on the first screen. The window management module can then adjust the visibility of each window on the first screen based on whether the wallpaper is displayed on the first screen.

[0097] In summary, when electronic devices utilize a multi-engine wallpaper service, and the wallpaper is switched from the first screen to the second screen, the wallpapers for both screens are rendered within the same process because the first and second wallpaper engines belong to the same multi-engine wallpaper service. Therefore, even if the wallpapers on the first and second screens are different types, switching between screens only requires retrieving the wallpaper rendered by the other wallpaper engine within the same service, eliminating the need to switch processes. This improves the interactivity and responsiveness of wallpaper switching between different screens.

[0098] In some related technologies, if the first and second screens display the same type of wallpaper, such as static wallpapers, and if the first and second screens have different image wallpapers, the wallpaper images can be cached in memory to ensure smooth wallpaper switching during screen transitions. This cached wallpaper images are then quickly rendered based on the images in memory during screen transitions. However, this method of caching wallpaper images results in an additional 30MB of memory usage for the electronic device, and the corresponding wallpaper engine has to render the wallpaper every time a screen transition occurs, leading to high rendering overhead and low wallpaper display efficiency.

[0099] In this embodiment, after setting the theme of the electronic device to the target theme, when the wallpaper is first displayed on a screen, the wallpaper drawn by the corresponding wallpaper engine is displayed on the window corresponding to that screen. For static wallpaper images, if the wallpaper engine has already drawn the wallpaper content on the wallpaper layer, then displaying the wallpaper content here does not require the wallpaper engine to redraw it if the content of the wallpaper layer has not changed. Therefore, when the electronic device needs to display the wallpaper on the screen again, it can directly display the previously drawn wallpaper content. In other words, after setting the theme of the electronic device to the target theme, when the wallpaper is not displayed on the screen for the first time, the wallpaper drawn for the first time is displayed on the wallpaper window to be displayed corresponding to that screen. In this way, not only is it not necessary to cache the wallpaper image, saving caching overhead, but it is also not necessary to draw every time the wallpaper is switched to be displayed on a different screen, saving drawing overhead and improving the efficiency of wallpaper display.

[0100] In some embodiments, when a lock screen wallpaper is displayed on the first screen and / or the second screen of an electronic device, an unlock operation targeting the second screen is detected, and a wallpaper display instruction is generated for the second screen. The wallpaper display instruction instructs the first screen and / or the second screen to display a desktop wallpaper. The unlock operation may include fingerprint unlocking, facial recognition unlocking, or pattern unlocking, etc., which will not be elaborated upon here.

[0101] During the transition from lock screen wallpaper to desktop wallpaper on the first and / or second screens, the electronic device can determine the screen ID of the desktop wallpaper to be displayed based on the wallpaper display instruction. Then, it sends a visibility status to the wallpaper engine corresponding to the determined screen ID, enabling the wallpaper engine to render the wallpaper content. Therefore, when the screen switches from displaying lock screen wallpaper to desktop wallpaper, the wallpaper engine corresponding to the desktop wallpaper can be directly selected from the determined screen IDs to render the wallpaper content. Since the lock screen wallpaper and desktop wallpaper belong to the same multi-engine wallpaper service and are rendered within the same process, the wallpaper display is smoother, display latency is reduced, and the interactivity and responsiveness when switching from lock screen wallpaper to desktop wallpaper are improved.

[0102] The software system of an electronic device can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application uses the layered architecture Android system as an example to illustrate the software structure of an electronic device.

[0103] Figure 9This is a software structure block diagram of an electronic device provided in an embodiment of this application. A layered architecture divides the software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into five layers, from top to bottom: the application layer (referred to as the application layer), the application framework layer (referred to as the framework layer), the Android runtime (ART) and native C / C++ libraries, the hardware abstraction layer (HAL), and the kernel layer (also known as the driver layer).

[0104] The application layer can include a series of application packages. For example... Figure 9 As shown, the application package can include theme applications, wallpaper applications, etc.

[0105] In this embodiment, the theme application can detect a selection instruction for a specific theme, decompress the corresponding theme package, and send an instruction to the wallpaper frame to set the current wallpaper to a multi-engine wallpaper service. The wallpaper application can call the onCreate method to start the multi-engine wallpaper service and create corresponding wallpaper engines for each screen based on the configuration file read from the theme package. Subsequently, when displaying the wallpaper, the wallpaper application can send the window's visibility state to each wallpaper engine.

[0106] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions. During wallpaper display, the application layer uses the application framework layer to pass window attribute information to SurfaceFlinger for composition, and finally to the HAL layer for interaction with the hardware for display.

[0107] like Figure 9 As shown, the application framework layer may include a window management module, wallpaper frame, Surfaceflinger, activity manager, content provider, view system, resource manager, notification manager, input manager, etc.

[0108] The window management module provides Window Manager Service (WMS), which can be used for window management, window animation management, surface management, and as a relay station for the input system.

[0109] In this embodiment of the application, after receiving the notification instruction sent by the window frame, the window management module can save the window on each screen and the corresponding screen identifier, determine the wallpaper window that needs to be adjusted according to the screen identifier when displaying the wallpaper, distribute the visibility status of each window to the wallpaper application, and set the wallpaper window to be displayed to be visible.

[0110] The wallpaper frame can interact with the wallpaper application to launch the multi-engine wallpaper service after receiving the instruction from the theme application to set the current wallpaper to the multi-engine wallpaper service. After successfully launching the multi-engine wallpaper service, it sends an instruction to the wallpaper application to create a wallpaper engine. Finally, after the wallpaper engine is successfully created, it saves the correspondence between the screen identifier of each screen and the wallpaper engine.

[0111] The Activity Manager Service (AMS) can be used to start, switch, and schedule system components (such as activities, services, content providers, and broadcast receivers), as well as manage and schedule application processes.

[0112] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.

[0113] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.

[0114] The Input Manager Service (IMS) provides input management services, which can be used to manage system inputs such as touchscreen input, keypad input, and sensor input. IMS retrieves events from input device nodes and, through interaction with the WMS (Windows Management System), distributes these events to appropriate windows.

[0115] The Android runtime consists of the core libraries and the Android runtime itself. The Android runtime is responsible for converting source code into machine code. The Android runtime primarily employs ahead-of-time (AOT) compilation and just-in-time (JIT) compilation techniques.

[0116] The core library primarily provides basic Java class library functionalities, such as libraries for fundamental data structures, mathematics, I / O, tools, databases, and networking. It also provides APIs for users to develop Android applications.

[0117] Native C / C++ libraries can include multiple functional modules. Examples include: surface manager, media framework, libc, OpenGL ES, SQLite, Webkit, etc.

[0118] The Surface Manager manages the display subsystem and provides fusion of 2D and 3D layers for multiple applications. The Media Framework supports playback and recording of various common audio and video formats, as well as still image files. The Media Library supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG. OpenGL ES provides drawing and manipulation of 2D and 3D graphics in applications. SQLite provides a lightweight relational database for applications on the electronic device.

[0119] The Hardware Abstraction Layer (HAL) runs in user space, encapsulates kernel-level drivers, and provides calling interfaces to higher layers. For example... Figure 9 As shown, the hardware abstraction layer may include display modules, HWC, etc.

[0120] HWC has the function or capability to combine and display image data using hardware. The specific image display can be completed collaboratively by multiple classes such as Surfaceflinger, HWC, and the display screen. HWC is a hardware abstraction layer module in the Android system that performs window / layer composition and display, and provides hardware support for the Surfaceflinger service.

[0121] Surfaceflinger provides all soft layers (wallpaper layers) information to HWC and queries HWC for processing methods. Furthermore, HWC can decide whether to use its underlying hardware (e.g., a hardware compositor) or GPU compositing based on hardware performance; for example, HWC will indicate the compositing method for each layer, whether it's done via GPU or HWC. On one hand, Surfaceflinger processes soft layers requiring GPU compositing and submits the results to the display via HWC; on the other hand, soft layers requiring hardware compositor compositing are processed by HWC itself.

[0122] Surfaceflinger can use 3D graphics processing libraries (such as OpenGL ES) to composite layers. HWC performs layer compositing through a hardware compositor, which can reduce the compositing burden on the GPU.

[0123] The kernel layer is the layer between hardware and software. The kernel layer includes at least a display driver and a GPU driver. Specifically, in the scheme of this application, the hardware involved may include a display driver chip (e.g., a display driver integrated circuit, DDIC) and a display screen (e.g., OLED or LCD). The display driver is used to drive the DDIC to complete the display processing and implementation.

[0124] For example, the electronic device in this application embodiment may be a mobile phone, tablet computer, desktop computer, laptop computer, handheld computer, notebook computer, ultra-mobile personal computer (UMPC), netbook, as well as cellular phone, personal digital assistant (PDA), augmented reality (AR) / virtual reality (VR) device, etc., including the aforementioned foldable screen. This application embodiment does not impose any special limitations on the specific form of the electronic device. The electronic device includes multiple screens. Specifically, the electronic device may be a foldable screen device or a non-foldable screen device, without limitation.

[0125] The embodiments of this application will now be described in detail with reference to the accompanying drawings.

[0126] Please refer to Figure 10 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. Figure 10 As shown, the electronic device may include a processor 910, an external memory interface 920, an internal memory 921, an antenna 1, an antenna 2, a mobile communication module 950, a wireless communication module 960, a sensor module 980, buttons 990, a display screen 994, etc.

[0127] The sensor module may include a magnetic sensor, which may include a Hall effect sensor. The electronic device can use the magnetic sensor to detect the opening and closing of the foldable screen. In some embodiments, when the electronic device is a foldable phone, the electronic device can detect the opening and closing of the foldable screen using the magnetic sensor, and then, based on the detected unfolded or folded state of the foldable screen, set features such as automatic face recognition unlocking for the phone.

[0128] It is understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device. In other embodiments, the electronic device may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0129] The processor 910 may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). These different processing units may be independent devices or integrated into one or more processors.

[0130] A controller can be the nerve center and command center of an electronic device. Based on the instruction opcode and timing signals, the controller generates operation control signals to control the fetching and execution of instructions.

[0131] The processor 910 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 910 is a cache memory. This memory can store instructions or data that the processor 910 has just used or that are used repeatedly. If the processor 910 needs to use the instruction or data again, it can directly retrieve it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 910, and thus improves the efficiency of the system.

[0132] In some embodiments, the processor 910 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0133] It is understood that the interface connection relationships between the modules illustrated in this embodiment are merely illustrative and do not constitute a structural limitation on the electronic device. In other embodiments, the electronic device may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.

[0134] The wireless communication function of electronic devices can be realized through antenna 1, antenna 2, mobile communication module 950, wireless communication module 960, modem processor and baseband processor, etc.

[0135] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device can be used to cover one or more communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with a tuning switch.

[0136] Electronic devices implement display functions through a GPU, a display screen 994, and an application processor. The GPU is a microprocessor for image processing, connecting the display screen 994 and the application processor. The GPU performs mathematical and geometric calculations and is used for graphics rendering. The processor 910 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0137] Display screen 994 is used to display images, videos, etc. Display screen 994 may include the foldable screen described above, which includes a first screen and a second screen. Alternatively, the display screen may also include a third screen, a fourth screen, etc. Display screen 994 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc.

[0138] In this embodiment of the application, the display screen can display lock screen wallpaper or desktop wallpaper.

[0139] The external memory interface 920 can be used to connect external memory cards, such as Micro SD cards, to expand the storage capacity of electronic devices. The external memory card communicates with the processor 910 through the external memory interface 920 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.

[0140] Internal memory 921 can be used to store computer executable program code, which includes instructions. Processor 910 executes various functional applications and data processing of the electronic device by running the instructions stored in internal memory 921. For example, in this embodiment, processor 910 can display different content on display screen 984 (i.e., foldable screen) in response to a user's operation of unfolding or folding display screen 994 (e.g., foldable screen) by executing instructions stored in internal memory 921. Internal memory 921 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (e.g., sound playback function, image playback function, etc.). The data storage area may store data created during the use of the electronic device (e.g., audio data, phone book, etc.). In addition, internal memory 921 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.

[0141] The methods described in the following embodiments can all be implemented in an electronic device with the above-described hardware structure.

[0142] This application also provides a chip system, such as... Figure 11 As shown, the chip system 1000 includes at least one processor and at least one interface circuit. The processor and the interface circuit are interconnected via lines. For example, the interface circuit can be used to receive signals from other devices (e.g., the memory of an electronic device). As another example, the interface circuit can be used to send signals to other devices (e.g., the processor). Exemplarily, the interface circuit can read instructions stored in the memory and send those instructions to the processor. When the instructions are executed by the processor, the electronic device can perform the steps in the above embodiments. Of course, the chip system may also include other discrete components, which are not specifically limited in this application embodiment.

[0143] This application also provides a computer-readable storage medium including computer instructions that, when executed on the electronic device, cause the electronic device to perform various functions or steps performed by the electronic device in the above method embodiments.

[0144] This application also provides a computer program product that, when run on a computer, causes the computer to perform various functions or steps performed by the electronic device in the above method embodiments.

[0145] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0146] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0147] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0148] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0149] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, essentially or in other words, the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0150] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A wallpaper display method, characterized in that, Applied to an electronic device, the electronic device including at least a first screen and a second screen, the method includes: The wallpaper is displayed on the first screen, while no wallpaper is displayed on the second screen; wherein the wallpaper on the first screen is drawn by the first wallpaper engine in the first process; A wallpaper display instruction for the second screen is detected, and the wallpaper is displayed on the second screen; the wallpaper of the second screen is drawn by the second wallpaper engine in the first process, and the second wallpaper engine and the first wallpaper engine belong to the same wallpaper service; the first wallpaper engine and the second wallpaper engine correspond to different wallpaper types or correspond to the same wallpaper type.

2. The method according to claim 1, characterized in that, When the wallpaper is displayed on the second screen, the wallpaper either stops being displayed on the first screen or continues to be displayed on the first screen.

3. The method according to claim 1 or 2, characterized in that, The detection of a wallpaper display instruction for the second screen includes: When the electronic device in its unfolded state is displaying wallpaper on the first screen, if it detects that the electronic device is switching from the unfolded state to the folded state, a wallpaper display command is generated for the second screen, and the wallpaper display on the first screen stops; or, When the electronic device, in its folded state, displays wallpaper on the first screen, and a switch from the folded state to the unfolded state is detected, a wallpaper display instruction is generated for the second screen, causing either the wallpaper to stop displaying on the first screen or to continue displaying wallpaper on the first screen; or, When the electronic device displays a lock screen wallpaper on the first screen and the second screen, an unlock operation targeting the second screen is detected, and the wallpaper display instruction is generated, wherein the wallpaper display instruction is used to instruct the desktop wallpaper to be displayed on the first screen and the second screen.

4. The method according to any one of claims 1-3, characterized in that, The first wallpaper engine and the second wallpaper engine correspond to the same type of wallpaper. Displaying the wallpaper on the second screen includes: After setting the theme of the electronic device to the target theme, when the wallpaper is first displayed on the second screen, the wallpaper is drawn by the second wallpaper engine and displayed on the second screen; After the theme of the electronic device is set to the target theme, the wallpaper that has been drawn for the first time is displayed on the second screen when it is not the first time the wallpaper is displayed on the second screen.

5. The method according to any one of claims 1-4, characterized in that, The method further includes: Establish a target correspondence, which includes the correspondence between the first wallpaper engine and the first screen identifier of the first screen, and the correspondence between the second wallpaper engine and the second screen identifier of the second screen; The wallpaper displayed on the first screen is drawn based on the first wallpaper engine corresponding to the first screen identifier; the wallpaper displayed on the second screen is drawn based on the second wallpaper engine corresponding to the second screen identifier.

6. The method according to claim 5, characterized in that, The method further includes: Receive a first operation, the first operation being used to trigger setting the topic of the electronic device as the target topic; In response to the first operation, it is determined that the target theme belongs to a multi-engine wallpaper theme; Based on the aforementioned multi-engine wallpaper theme, a wallpaper launch service is provided. The establishment of the target correspondence includes: If the wallpaper service is successfully launched, based on the wallpaper types included in the target theme, the first wallpaper engine and the second wallpaper engine are created, and the target correspondence is established.

7. The method according to claim 6, characterized in that, The step of creating a first wallpaper engine and a second wallpaper engine based on the wallpaper types included in the target theme, and establishing the target correspondence, includes: Obtain the configuration information corresponding to the target topic; Based on the configuration information, determine the wallpaper types corresponding to the first screen and the second screen respectively; Based on the wallpaper types corresponding to the first screen and the second screen respectively, a first wallpaper engine and a second wallpaper engine are created, and the target correspondence is established; wherein, the first wallpaper engine is used to draw the wallpaper of the type corresponding to the first screen, and the second wallpaper engine is used to draw the wallpaper of the type corresponding to the second screen.

8. The method according to claim 7, characterized in that, The wallpaper service includes a first wallpaper engine, a second wallpaper engine, and a wallpaper engine agent; the method further includes: The wallpaper engine agent sends a display request to the first wallpaper engine and / or the second wallpaper engine corresponding to the screen to be displayed, according to the wallpaper display instruction; The first wallpaper engine draws the wallpaper corresponding to the first screen based on the received display request; The second wallpaper engine draws the wallpaper corresponding to the second screen based on the received display request.

9. The method according to any one of claims 5-8, characterized in that, The second screen corresponds to at least one second window; the correspondence between the second wallpaper engine and the second screen identifier of the second screen in the target correspondence includes the correspondence between the at least one second window corresponding to the second screen and the second screen identifier; The wallpaper displayed on at least one second window corresponding to the second screen is drawn based on the second wallpaper engine corresponding to the second screen identifier.

10. The method according to claim 9, characterized in that, The wallpaper display instruction is used to indicate the second screen identifier corresponding to the second screen and the target window identifier of the wallpaper to be displayed corresponding to the second screen. The method further includes: At least one second window corresponding to the second screen is determined based on the second screen identifier; The target window from which the wallpaper is to be displayed is determined from the at least one second window based on the target window identifier; The target window is determined to be in a first visibility state, wherein the first visibility state indicates that the corresponding window is the visible window of the wallpaper to be displayed; Displaying the wallpaper on the second screen includes: The corresponding second wallpaper engine is determined based on the second screen identifier; Send the first visibility state corresponding to the target window to the second wallpaper engine; When the target window is in the first visibility state, a wallpaper drawn based on the second wallpaper engine is displayed in the target window on the second screen.

11. The method according to claim 9 or 10, characterized in that, The electronic device includes a window management module, a wallpaper frame, and a wallpaper application, wherein the wallpaper application is used to create the first wallpaper engine and the second wallpaper engine; The establishment of the target correspondence includes: After receiving the first notification instruction from the wallpaper application, the wallpaper frame will associate the second screen identifier of the second screen with the second wallpaper engine; The wallpaper frame sends a second notification instruction to the window management module; After receiving the second notification instruction from the wallpaper frame, the window management module will associate at least one second window corresponding to the second screen with the second screen identifier of the second screen.

12. The method according to claim 11, characterized in that, Before displaying the wallpaper on the second screen, it also includes: After receiving the wallpaper display instruction, the window management module sends the visibility status of each window corresponding to each screen on the electronic device to the wallpaper application; The wallpaper application sends the visibility status of each window to the wallpaper engine corresponding to each screen, so that the wallpaper engine can draw the wallpaper according to the visibility status of each window.

13. An electronic device, characterized in that, The electronic device includes: at least two displays, a memory, and one or more processors; the at least two displays, the memory, and the processors are coupled; the memory is used to store computer program code, the computer program code including computer instructions, which, when executed by the electronic device, cause the electronic device to perform the method as described in any one of claims 1-12.

14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed in an electronic device, cause the electronic device to perform the method as described in any one of claims 1-12.

15. A computer program product, characterized in that, The computer program product includes instructions that, when executed in an electronic device, cause the electronic device to perform the method as described in any one of claims 1-12.