Control method of application, electronic device, and readable medium

By creating a virtual screen in foldable screen devices and performing adaptive snapshot capture, the problem of mismatch between application snapshots and screen states in foldable screen devices is solved, enabling correct display and fast hot start of applications in different screen states.

CN120223797BActive Publication Date: 2026-03-24HONOR DEVICE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-19
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

In foldable electronic devices, a mismatch between application snapshots and screen states can cause incorrect display upon startup.

Method used

By creating virtual screens corresponding to different screen sizes in foldable electronic devices, and drawing images and capturing snapshots as the screen state changes, the application snapshots are ensured to match the active screen size, generating adaptive transition animations.

Benefits of technology

It ensures the correct display of application snapshots under different screen states, optimizes the response time and display continuity of warm starts, and avoids the problem of excessive drawing time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120223797B_ABST
    Figure CN120223797B_ABST
Patent Text Reader

Abstract

The application provides a control method of an application, an electronic device and a readable medium. The control method of the application, the foldable electronic device includes a first screen and a second screen. The first screen corresponds to a first virtual screen, and the second screen corresponds to a second virtual screen. The sizes of the first screen and the second screen are different. The sizes of the first screen and the first virtual screen are the same. The sizes of the second screen and the second virtual screen are the same. The method comprises the following steps: displaying a first interface of a first application on the first screen; receiving an operation of exiting the first application input by a user on the first screen; in response to the operation of exiting the first application input by the user on the first screen, controlling image drawing on the second virtual screen for the first interface. The image drawn on the second virtual screen is a first application snapshot of the first application. The first interface is a second application snapshot of the first application. The problem that the application startup link cannot correctly display the application snapshot can be avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of application control, and more particularly to an application control method, electronic device, computer program product, and computer-readable storage medium. Background Technology

[0002] Electronic devices now feature a TaskSnapshot function. This function allows you to capture a snapshot of the application while it's running in the background, and then use that snapshot as a transition animation when the application returns to the foreground.

[0003] However, in scenarios where the electronic device's display is a foldable screen, when the foldable screen is folded and the application is running in the background, the snapshot of the application is the interface displayed on the folded screen. When the foldable screen is unfolded and the application is brought to the foreground via a warm-start control, the application snapshot and the display area of ​​the foldable screen in the unfolded state do not match. Similarly, when the foldable screen is unfolded and the application is running in the background, the snapshot of the application is the interface displayed on the unfolded screen. When the foldable screen is folded and the application is brought to the foreground via a warm-start control, the application snapshot and the display area of ​​the foldable screen in the folded state also do not match.

[0004] Therefore, in scenarios where electronic devices have foldable screens, an issue arises where application snapshots cannot be displayed correctly during the application startup process. Summary of the Invention

[0005] This application provides an application control method, electronic device, computer program product, and computer-readable storage medium, with the aim of avoiding the problem of application snapshots not being displayed correctly during application startup.

[0006] To achieve the above objectives, this application provides the following technical solution:

[0007] In a first aspect, this application provides a control method for an application in a foldable electronic device. The foldable electronic device includes a first screen and a second screen, the first screen corresponding to a first virtual screen, the second screen corresponding to a second virtual screen, the first screen and the second screen having different sizes, the first screen and the first virtual screen having the same size, and the second screen and the second virtual screen having the same size. The method includes: displaying a first interface of a first application on the first screen; receiving an operation from a user on the first screen to exit the first application; and responding to the user's operation on the first screen to exit the first application, controlling the second virtual screen to draw an image of the first interface, wherein the image drawn on the second virtual screen is used as a first application snapshot of the first application, and the first interface is used as a second application snapshot of the first application.

[0008] In some embodiments, the foldable electronic device is an inwardly folding electronic device, where the first screen can refer to a foldable display screen and the second screen can refer to a small screen visible to the user in the folded state. The foldable electronic device is also an outwardly folding electronic device, where the first screen can refer to a display screen in the unfolded state and the second screen can refer to a small screen in the folded state.

[0009] As can be seen from the above, after the user enters the action of exiting the first application on the first screen, the foldable electronic device responds to this action by controlling the second virtual screen to draw an image of the first interface. This image drawn by the second virtual screen serves as a snapshot of the first application, and the first interface serves as a snapshot of the second application. Because the second virtual screen and the second screen are the same size, the first application snapshot is adapted to the second screen, the first interface is the interface of the first screen, and the second application snapshot is adapted to the first screen. Based on this, the foldable electronic device obtains both an application snapshot adapted to the first screen and an application snapshot adapted to the second screen. During the first application launch phase, either the application snapshot adapted to the first screen or the second screen can be used, and the application snapshot can be displayed correctly during the application launch phase.

[0010] In one possible implementation, in response to a user's input on the first screen to exit the first application, after controlling the second virtual screen to draw an image for the first interface, the method further includes: receiving a user's input on the second screen to launch the first application; in response to the user's input on the second screen to launch the first application, displaying a first transition animation and then displaying the second interface of the first application, wherein the image size in the first transition animation matches the size of the second screen.

[0011] In one possible implementation, the first transition animation is generated based on a snapshot of the first application. The user launches the first application on the second screen, and the image size of the first transition animation displayed on the foldable electronic device matches the second screen, ensuring the proper display of the first application snapshot.

[0012] In one possible implementation, displaying a second interface of the first application after displaying the first transition animation further includes: determining that the first application is a hot start.

[0013] In one possible implementation, the method further includes controlling the rendering of images on the first virtual screen for the second interface. When a user launches the first application on the second screen, the second screen is active, and the first virtual screen is activated. The foldable electronic device controls the rendering of images on the first virtual screen for the second interface, which avoids the problem of excessive rendering time on the first virtual screen when the user exits the first application after displaying the second interface on the second screen.

[0014] In one possible implementation, after the first screen displays the first interface of the first application, the method further includes: receiving a user's input on the first screen to switch interfaces; responding to the user's input on the first screen to switch interfaces, displaying the third interface of the first application on the first screen, and controlling the second virtual screen to perform image rendering for the third interface, thereby avoiding the problem that the rendering time of the second virtual screen is too long when exiting the first application after the third interface is displayed on the first screen.

[0015] In one possible implementation, determining that the first application is a hot start includes: determining that both the process and the activity of the first application exist.

[0016] In one possible implementation, in response to a user's input on the first screen to exit the first application, after controlling the second virtual screen to draw an image on the first interface, the method further includes: receiving a user's input on the first screen to launch the first application; in response to the user's input on the first screen to launch the first application, displaying a second transition animation and then displaying a fourth interface of the first application, the second transition animation being generated based on a snapshot of the second application.

[0017] In the above possible implementation, the user launches the first application on the first screen, and the foldable electronic device can generate a second rotation animation based on the second application snapshot and display the second transition animation. Since the second transition animation is the first interface displayed on the first screen, it matches the first screen and realizes the correct display of the application snapshot on the first screen.

[0018] In one possible implementation, it also includes controlling the drawing of images on the second virtual screen for the fourth interface.

[0019] In a second aspect, this application provides an electronic device, including: one or more processors, a memory, and a foldable display screen; the foldable display screen includes: a first screen and a second screen, the first screen corresponding to a first virtual screen, the second screen corresponding to a second virtual screen, the first screen and the second screen having different sizes, the first screen and the first virtual screen having the same size, and the second screen and the second virtual screen having the same size; the memory and the foldable display screen are coupled to one or more processors, the memory being used to store a computer program, the computer program including computer instructions, and when one or more processors execute the computer instructions, the electronic device executes the control method of the application provided in any of the first aspects.

[0020] Thirdly, this application provides a computer-readable storage medium for storing a computer program, which, when executed, is specifically used to implement a control method for the application provided in any of the first aspects.

[0021] Fourthly, this application provides a computer program product that, when run on a computer, causes the computer to execute the control method of the application provided in any of the first aspects. Attached Figure Description

[0022] Figure 1 These are illustrations of application snapshots and transition animations provided in related technologies;

[0023] Figure 2 A flowchart illustrating the application snapshot capture method provided in this application embodiment;

[0024] Figure 3 A flowchart illustrating the method for warm-starting an application provided in this application embodiment;

[0025] Figure 4 These are illustrations of application snapshots and transition animations provided for embodiments of this application.

[0026] Figure 5 A hardware structure diagram of the electronic device provided in the embodiments of this application;

[0027] Figure 6 A software structure diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0028] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. The terminology used in the following embodiments is for the purpose of describing specific embodiments only and is not intended to be a limitation of this application. As used in the specification and appended claims of this application, the singular expressions "a," "an," "the," "the," "the," and "this" are intended to also include expressions such as "one or more," unless the context clearly indicates otherwise.

[0029] References to "some embodiments" and the like 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 some embodiments," "in other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiments, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless otherwise specifically emphasized.

[0030] The "multiple" mentioned in the embodiments of this application refers to two or more. It should be noted that in the description of the embodiments of this application, terms such as "first" and "second" are used only for the purpose of distinguishing descriptions and should not be construed as indicating or implying relative importance, nor should they be construed as indicating or implying order.

[0031] The operation of electronic devices can be divided into five stages during a certain period of time: foreground, background, compression, swapping out, and swapping in (warm start).

[0032] Taking application A as an example: Foreground stage: The user opens application A, and application A starts its process. Background stage: After using application A for a period of time, if the user wants to use another application, such as application B, the user will open application B. At this time, application A switches from running in the foreground to running in the background. Compression stage: If the user opens other applications, consuming more memory, the memory pressure on the electronic device increases. When the proportion of total memory space occupied exceeds a preset threshold A, the electronic device compresses the data of applications not in the foreground in memory. Swap-out stage: If the user continues to open other new applications, consuming more memory, the memory pressure continues to increase. When the proportion of compressed memory space occupied also exceeds a preset threshold B, the electronic device can swap some data from the compressed memory space to the swap partition of the storage device. Swap-in stage (also known as warm start): If the user wants to use application A again at this time, the user actively switches application A to the foreground.

[0033] To improve application startup time when warming up, electronic devices have added a task snapshot feature. The task snapshot feature means that when an application is running in the background, a snapshot of the application is taken, and when the application returns to the foreground, this snapshot is used as a transition animation.

[0034] Then, when the foldable electronic device was used to hot-launch the application using the task snapshot function, the inventors discovered that the foldable electronic device could not display the application snapshot correctly.

[0035] Take foldable screen phones that fold outwards as an example. Figure 1 (a) shows a foldable phone in its folded state, displaying the interface of an instant messaging application. When the user controls the application to run in the background, the phone first captures the application's interface before it ran in the background—a snapshot of the application. This snapshot is... Figure 1 As shown in (a), when a foldable phone switches from a folded to an unfolded state, the user can bring the application back to the foreground via the multitasking interface or by clicking the application icon. The application uses a warm-start method. The foldable phone uses... Figure 1The application snapshot shown in (a) generates a transition animation, which is displayed on the expanded screen, with the effect as follows: Figure 1 As shown in (b).

[0036] It can be seen that the application snapshots captured by a foldable phone in its folded state are not compatible with the unfolded display. During the process of generating transition animations using application snapshots, the phone will determine that the application snapshot is invalid or missing. To address this, related technologies suggest that foldable phones can generate transition animations using the following two methods.

[0037] 1. Foldable screen phones utilize in-app images (Splashscreen, typically used for app cold starts) to generate and display transition animations, with the display effect as follows: Figure 1 As shown in (c). However, foldable phones use built-in images in applications to generate transition animations, which results in display discontinuity. The foldable phone first displays... Figure 1 The interface shown in (c) then displays the application's main interface, giving the user the feeling of a sudden change in display.

[0038] 2. Foldable phones wait for the application's initial screen to finish rendering before generating and displaying transition animations. However, this process delays the start time of the transition animations, slightly increasing the application's startup time. Furthermore, the foldable phone becomes less responsive after the user taps the application icon.

[0039] Based on this, embodiments of this application provide an application control method. This method can be divided into a step of capturing application snapshots during application startup, operation, and exit, and a step of displaying transition animations during hot-start of the application. The application control method provided in this application can be applied to foldable electronic devices such as foldable screen phones. Foldable electronic devices can be folded outwards or inwards, depending on the folding direction. Typically, an outward-folding electronic device includes an outward-folding display screen, which can be folded to form at least two smaller screens, typically of the same size. Depending on the form of the display screen, an outward-folding electronic device may include a large display screen and two smaller screens. An inward-folding electronic device also includes an inward-folding display screen, which can be folded to form at least two smaller screens. In some embodiments, an inward-folding electronic device further includes a smaller screen that is visible to the user when the electronic device is in the folded state. Depending on the form of the display screen, an inward-folding electronic device may include a large display screen and a smaller screen visible to the user in the folded state.

[0040] The following embodiments use a foldable screen phone as an example.

[0041] The following combination Figure 2The method for capturing application snapshots provided in the embodiments of this application will be introduced.

[0042] like Figure 2 As shown, the method for capturing application snapshots includes the following steps:

[0043] S201. Create multiple virtual screens corresponding to different screen sizes, with one virtual screen corresponding to one screen size.

[0044] Foldable phones have foldable displays, allowing them to have at least two sizes: a folded size and an unfolded size. Once the foldable phone is powered on, a corresponding virtual screen is created for each screen size. This virtual screen's size is identical to the foldable phone's actual screen size. In other words, a foldable phone creates multiple virtual screens, each corresponding to one of the foldable phone's screen sizes. When the foldable phone is powered off, all virtual screens are destroyed.

[0045] A virtual screen can be understood as a display screen that does not exist physically and is not visible to the user, but images can be drawn on the virtual screen.

[0046] In some embodiments, creating a virtual screen on a foldable phone means that a portion of the foldable phone's memory is used to store images drawn on that virtual screen.

[0047] In some embodiments, the application framework of the operating system of the foldable phone includes a screen management service (DisplayManagerService, DMS). The foldable phone starts up when it boots up, and DMS starts up along with it. During the startup process of DMS, multiple virtual screens corresponding to different screen sizes are created.

[0048] In this embodiment of the application, a foldable screen phone including a screen of a first screen size and a screen of a second screen size is used as an example for explanation. In the following content, the screen of the first screen size is referred to as the first screen and the screen of the second screen size is referred to as the second screen.

[0049] S202. Enter the activation state on the first screen and activate the virtual screen corresponding to the second screen.

[0050] Once the foldable phone has finished powering on, its first screen is lit up and activated, and the corresponding virtual screen on the second screen is activated.

[0051] When a foldable phone is powered on in its folded state, the folded screen becomes the first screen and is activated, while the unfolded screen becomes the second screen, and its corresponding virtual screen is activated. Similarly, when a foldable phone is powered on in its unfolded state, the unfolded screen becomes the first screen and is activated, while the folded screen becomes the second screen, and its corresponding virtual screen is activated.

[0052] In some embodiments, when the first screen enters the active state, the DMS activates the virtual screen corresponding to the second screen. The DMS can also monitor the switching between the folded and unfolded states of the foldable phone. When the screen size changes due to the state switching, the DMS switches the virtual screen in the opposite direction of the change to ensure that the virtual screen to be activated is different in size from the screen in the active state. That is: when the folded display enters the active state, the DMS activates the virtual screen corresponding to the size of the unfolded display; similarly, when the unfolded display enters the active state, the DMS activates the virtual screen corresponding to the size of the folded display.

[0053] S203. When the interface switches on the first screen, control the virtual screen corresponding to the second screen to draw images for the switched interface.

[0054] When the interface switches on the first screen, the Activity of the switched interface performs image frame drawing after onResume. After the first screen completes image drawing, the image drawing of the virtual screen corresponding to the second screen is triggered.

[0055] In some embodiments, during operation, the foldable phone can display different interfaces on its first screen based on user actions on the application. When the first interface on the first screen switches to a second interface, the foldable phone can control the corresponding virtual screen on the second screen to draw the image of the second interface, i.e., trigger the drawing of the second interface on the corresponding virtual screen. The interface of the first application consists of a series of activities, and each activity consists of views. A view is a form of window existence, and a window is the carrier of a view.

[0056] The first screen switching usually refers to the application switching from its first interface to its second interface.

[0057] In other embodiments, after the foldable phone powers on and the first screen becomes active, it can enter the interface startup phase of the first screen. During the interface startup phase of the first screen, the first screen completes the rendering of the first frame. Since the rendering of the first frame includes the interface layout, after the first screen completes the first frame operation, i.e., displays the first interface, it also triggers the corresponding virtual screen on the second screen to render the first frame.

[0058] In some embodiments, the application framework of the foldable phone's operating system includes a WindowManagerService (WMS) and a View System. The WindowManagerService is typically used to manage windows, while the View System builds the basic components of the application. The WindowManagerService can create windows on virtual screens corresponding to the first and second screens to support the View System in refreshing the interface on these virtual screens, i.e., rendering images on the virtual screens corresponding to the first and second screens. It should be noted that when the first screen switches interfaces, rendering the new interface requires refreshing the layout, which is time-consuming. To avoid excessive rendering time on the virtual screen when exiting the first application after a screen switch, the rendering of the new interface is controlled on the virtual screen corresponding to the second screen after the screen switch.

[0059] S204. When the first application exits, control the virtual screen corresponding to the second screen to draw an image of the interface when the first application exits, and capture a snapshot of the image drawn on the virtual screen corresponding to the second screen.

[0060] The first application refers to the application that is in the foreground and whose interface is displayed on the first screen.

[0061] When the first application exits, to support hot-launching of the first application, the foldable phone captures a snapshot of the interface displayed on the first screen when the first application exits, as a first application snapshot. This first application snapshot is used to generate a transition animation when the foldable phone hot-launches the first application while the first screen is active. Furthermore, when the foldable phone detects the first application exit, it first controls the virtual screen to draw an image of the interface at the time of the first application exit, and then captures the image drawn on the virtual screen as a second application snapshot. This second application snapshot is used to generate a transition animation when the foldable phone hot-launches the first application while the second screen is active. Thus, whether the first application is hot-launched on the foldable phone while the first screen is active or on the second screen, a snapshot of the application matching the size of the active display can be used to generate the transition animation.

[0062] In some embodiments, when the exit of the first application is detected, the view system controls the virtual screen corresponding to the second screen to draw an image of the interface displayed when the first application exits. After the view system completes drawing the image on the virtual screen corresponding to the second screen, the window management service captures the interface displayed on the virtual screen corresponding to the second screen. Furthermore, the window management service also captures the interface displayed on the first screen when the first application exits.

[0063] The following combination Figure 3 This application provides a method for warm-starting applications.

[0064] This application provides a method for warm-starting an application, such as... Figure 3 As shown, the steps include:

[0065] S301, Receive the startup operation of the first application.

[0066] Users can launch the first application by clicking its icon or through the multitasking management interface. The foldable phone receives the user's input to launch the first application to know that the user needs to launch the first application.

[0067] S302. In response to the startup operation of the first application, determine whether the first application is a warm start.

[0068] In some embodiments, the window management service described above responds to the startup operation of the first application and determines whether the first application is a hot start.

[0069] If the first application is determined to be a warm start, steps S303 to S305 are executed. If the first application is not a warm start, the process can exit. Normally, if the first application is not a warm start, it is a cold start, and a transition animation can be generated based on the application's built-in image and displayed until the first frame of the first application's interface is completed.

[0070] In some embodiments, a warm start refers to restarting the first application after exiting it, where the first application process still exists and the Activity still exists in memory upon restart. Based on this, a foldable phone can determine that the first application process has started and is running, and that the first application's Activity exists in memory, thus identifying the first application as a warm start; otherwise, the first application is not a warm start.

[0071] S303. Determine the screen that is in the active state as the second screen.

[0072] In some embodiments, the orientation of the foldable phone can be determined based on the detection data from the sensors of the foldable phone, and based on the orientation of the foldable phone, it can be further determined whether the screen in the active state is a second screen.

[0073] In other embodiments, following the adjustment of the foldable phone's posture—that is, when the foldable phone switches from a folded state to an unfolded state, or vice versa—the window management service can record the active screen of the foldable phone. Based on this, after determining that the first application is a hot start, the foldable phone searches the content recorded by the window management service to determine whether the active screen is the second screen.

[0074] In some embodiments, the window management service determines whether the active screen is a second screen.

[0075] If the foldable phone determines that the active screen is not the second screen (i.e., the first screen), it selects the application snapshot of the first screen and generates a transition animation based on the application snapshot. The transition animation is displayed until the first application's main interface is drawn, at which point the display of the transition animation switches to displaying the first application's main interface.

[0076] It should also be noted that, once the foldable phone determines that the second screen is active, it can also activate the virtual screen corresponding to the first screen. The method by which the foldable phone activates the virtual screen corresponding to the first screen can be found in step S202 of the aforementioned embodiment.

[0077] S304. Select the application snapshot of the virtual screen corresponding to the second screen, and generate a transition animation based on the application snapshot.

[0078] If a foldable phone determines that the first application is a hot start and identifies the active display as the second screen, it can select the application snapshot of the virtual screen corresponding to the second screen and generate a transition animation based on the application snapshot. This can achieve size matching between the application snapshot and the screen displaying the transition animation.

[0079] In some embodiments, the window management service may select an application snapshot of the virtual screen corresponding to the second screen and generate a transition animation based on the application snapshot. Furthermore, the window management service may use conventional techniques to generate the transition animation based on the application snapshot, and this application does not limit this to any particular method.

[0080] S305, Display transition animation.

[0081] For example, Figure 4 (a) shows a foldable phone in a folded state, with the foldable screen (i.e., the first screen) displaying the interface of an instant messaging application. At this time, the user controls the application to run in the background. The foldable phone captures the application's interface before it ran in the background, i.e., an application snapshot. This application snapshot is... Figure 4 As shown in (a). When the user-controlled application runs in the background, the foldable phone also uses... Figure 2 The provided method obtains an application snapshot of the virtual screen corresponding to the expanded screen (i.e., the virtual screen corresponding to the second screen).

[0082] When the foldable phone switches from a folded to an unfolded state, the user-controlled instant messaging application is brought back to the foreground. The application uses a warm-start method, and the foldable phone generates a transition animation based on a snapshot of the application on the virtual screen corresponding to the unfolded screen. Because the application snapshot on the virtual screen matches the size of the unfolded screen, the display effect of the transition animation generated from the application snapshot on the virtual screen is as follows. Figure 4 As shown in (b).

[0083] S306. In response to the startup operation of the first application, start the first application and draw the first application's main interface.

[0084] After the user launches the first application, the foldable phone can execute steps S302 to S305 in addition to steps S306 to S307 in parallel.

[0085] In some embodiments, when the first application is warm-started, the content of its initial interface is the same as the content of the interface when the first application is exited.

[0086] It should be noted that after the first application's main interface is drawn, the foldable phone can also trigger the virtual screen corresponding to the first screen to draw the main interface.

[0087] S307. After the first application's main interface is drawn, the transition animation will switch to displaying the first application's main interface.

[0088] During the rendering of the first application's main screen, the foldable phone generates and displays a transition animation. Once the first application's main screen is rendered and the transition animation has finished playing, the display switches from showing the transition animation to showing the first application's main screen.

[0089] In this embodiment, when the foldable phone hot-launches the first application while the second screen is active, a transition animation is generated using the application snapshot of the virtual screen corresponding to the second screen. This ensures the continuity of the transition animation and the initial screen display. Furthermore, since there is no need to wait for the initial screen to generate the transition animation, the hot-launch response time can be optimized, avoiding the problem of excessively long hot-launch times for foldable phones.

[0090] The foldable electronic device described in the above embodiments of this application can also be a tablet computer, a personal digital assistant (PDA), a desktop, laptop, or notebook computer, an ultra-mobile personal computer (UMPC), a handheld computer, a netbook, and a wearable device, etc.

[0091] Taking foldable screen phones as an example, Figure 5 This is an example of the composition of an electronic device provided in an embodiment of this application. For example... Figure 5 As shown, the electronic device 100 may include a processor 110, an internal memory 120, a camera 130, a display screen 140, and a sensor module 150, etc.

[0092] It should be understood that, for the purpose of facilitating the understanding of the embodiments of this application, Figure 5The electronic device 100 shown only includes some components related to the application snapshot capture method and the warm-start application method provided in the embodiments of this application. The electronic device provided in the embodiments of this application may include more than Figure 5 The electronic device shown has 100 or more or fewer components. That is to say, Figure 5 The electronic device 100 shown does not constitute a specific limitation on the electronic device provided in the embodiments of this application.

[0093] Processor 110 may include one or more processing units, such as an application processor (AP), a graphics processing unit (GPU), an image signal processor (ISP), or a video codec. Processor 110 may also include memory for storing instructions and data.

[0094] Internal memory 120 can be used to store computer executable program code, including instructions. Processor 110 executes various functional applications and data processing of electronic device 100 by running the instructions stored in internal memory 120. In some embodiments, internal memory 120 stores instructions for performing methods of capturing application snapshots and methods of warm-starting applications. Processor 110 can capture application snapshots when an application exits and warm-start applications by executing the instructions stored in internal memory 120.

[0095] The electronic device 100 can perform shooting functions through an ISP, camera 130, video codec, GPU, display screen 140, and application processor. The electronic device 100 can also perform display functions through a GPU, display screen 140, and application processor.

[0096] In sensor module 150, pressure sensor 150A is used to sense pressure signals and convert them into electrical signals. Touch sensor 150B, also known as a "touch device," can be placed on display screen 140. Touch sensor 150B and display screen 140 together form a touchscreen, also known as a "touch screen." Touch sensor 150B is used to detect touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event.

[0097] Furthermore, an operating system runs on top of the aforementioned components. The operating system of the electronic device 100 can adopt a layered architecture. This application embodiment uses the layered architecture Android system as an example to exemplify the software structure of the electronic device 100.

[0098] Figure 6 This is a software structure block diagram of the electronic device 100 according to an embodiment of this application.

[0099] A layered architecture divides 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 four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.

[0100] The application layer can include a series of application packages. For example... Figure 6 As shown, the application package can include applications such as instant messaging applications and video applications.

[0101] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions. For example... Figure 3 As shown, the application framework layer may include a view system, a window management service (WindowManagerService, WMS), and a screen management service (DisplayManagerService, DMS), etc. The functions of the view system, window management service, and screen management service are described in the above embodiments and will not be repeated here.

[0102] The Android Runtime consists of core libraries and a virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.

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

[0104] Another embodiment of this application provides a computer-readable storage medium storing instructions that, when executed on a computer or processor, cause the computer or processor to perform one or more steps of any of the above methods.

[0105] Computer-readable storage media can be non-transitory computer-readable storage media, such as read-only memory (ROM), random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage devices.

[0106] Another embodiment of this application provides a computer program product containing instructions. When the computer program product is run on a computer or processor, it causes the computer or processor to perform one or more steps of any of the methods described above.

Claims

1. A control method for an application, characterized in that, A method for creating a foldable electronic device includes a first screen and a second screen. The first screen corresponds to a first virtual screen, and the second screen corresponds to a second virtual screen. The first screen and the second screen have different sizes. Alternatively, the first screen and the first virtual screen may have the same size, and the second screen and the second virtual screen may have the same size. The first virtual screen and the second virtual screen are created by the electronic device. The first interface of the first application is displayed on the first screen; Receive the user's input on the first screen to exit the first application; In response to the user's operation of exiting the first application input on the first screen, the system controls the second virtual screen to draw an image for the first interface. The image drawn on the second virtual screen serves as a first application snapshot of the first application, and the first interface serves as a second application snapshot of the first application.

2. The control method for the application according to claim 1, characterized in that, The step of responding to the user's input on the first screen to exit the first application, after the second virtual screen has rendered an image for the first interface, further includes: Receive the user's input on the second screen to launch the first application; In response to the user's input on the second screen to launch the first application, a second interface of the first application is displayed after a first transition animation, wherein the image size in the first transition animation matches the size of the second screen.

3. The control method for the application according to claim 2, characterized in that, The first transition animation is generated based on the first application snapshot.

4. The control method for the application according to claim 3, characterized in that, The step of displaying the second interface of the first application after displaying the first transition animation further includes: The first application was determined to be a warm start.

5. The control method for the application according to claim 2, characterized in that, Also includes: The system controls the image rendering of the second interface on the first virtual screen.

6. The control method for the application according to any one of claims 1 to 5, characterized in that, After the first screen displays the first interface of the first application, it also includes: Receive user input on the first screen to switch interfaces; In response to the user's operation of switching interfaces on the first screen, the third interface of the first application is displayed on the first screen, and the second virtual screen is controlled to draw images for the third interface.

7. The control method for the application according to claim 4, characterized in that, Determining that the first application is a hot start includes: determining that both the process and the Activity of the first application exist.

8. The control method for the application according to claim 1, characterized in that, The step of responding to the user's input on the first screen to exit the first application, after the second virtual screen has rendered an image for the first interface, further includes: Receive the user's input on the first screen to launch the first application; In response to the user's input on the first screen to launch the first application, a second transition animation is displayed, followed by the display of the fourth interface of the first application. The second transition animation is generated based on a snapshot of the second application.

9. The control method for the application according to claim 8, characterized in that, Also includes: The system controls the image rendering on the second virtual screen for the fourth interface.

10. A foldable electronic device, characterized in that, include: One or more processors, memory, and a foldable display; The foldable display screen includes: a first screen and a second screen, the first screen corresponding to a first virtual screen, the second screen corresponding to a second virtual screen, the first screen and the second screen having different sizes, the first screen and the first virtual screen having the same size, and the second screen and the second virtual screen having the same size. The memory and the foldable display screen are coupled to one or more of the processors. The memory is used to store a computer program, the computer program including computer instructions, which, when executed by the one or more processors, enable the electronic device to perform a control method for the application as described in any one of claims 1 to 9.

11. A computer-readable storage medium, characterized in that, Used to store computer programs, which, when executed, are specifically used to implement the control method of the application as described in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Snapshot processing method and device

    CN116149531A