A program startup method, device, storage medium, and program product

CN119396506BActive Publication Date: 2026-08-14HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-26
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

即,应用程序在启动的过程中具有卡顿、跟手性差等情况

Benefits of technology

[0030]第三方面,本申请提供一种可读存储介质,可读存储介质上存储有指令,指令在电子设备上执行时使得电子设备执行本申请提及的程序启动方法。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119396506B_ABST
    Figure CN119396506B_ABST
Patent Text Reader

Abstract

This application relates to the field of terminal technology and discloses a program launch method, device, storage medium, and program product. The program launch method includes: when a user clicks a desktop application icon, and the electronic device detects a user's press operation, the electronic device loads a preview animation. Next, when a user's finger is released, the electronic device can play the already loaded preview animation. Furthermore, after detecting the user's finger release operation, the electronic device also performs preparatory work for a launch window animation. After completing the preparatory work, the electronic device merges the launch window animation and the preview animation to play the merged launch window animation. Thus, when the electronic device detects a user's click on a desktop application icon, the application's response latency can be shortened.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of terminal technology, and in particular to a program startup method, device, storage medium, and program product. Background Technology

[0002] Mobile phones and other electronic devices typically have multiple applications (APPs) installed. Users can launch these applications by clicking their desktop app icons. Clicking an app icon can involve pressing down or lifting your finger up. The electronic device usually only begins the preparatory work related to application launch after detecting a finger lift-up event. For example, the device will only begin drawing the layers for the launch window animation after detecting the lift-up event, and then display these layers to the user. These launch window animation layers refer to the layer interface displayed when the application first starts. Therefore, after lifting the finger up, there is a certain response delay before the user sees the first frame of the application launch screen. This means that the application may experience lag or poor responsiveness during launch. Summary of the Invention

[0003] To address the aforementioned problems, this application provides a program startup method, device, storage medium, and program product.

[0004] In a first aspect, this application provides a program launch method applied to an electronic device, the method comprising: at a first moment, detecting a user's click action event of clicking a first application icon and loading a first animation effect; at a second moment, detecting a user's click action event of clicking the first application icon and playing the first animation effect, wherein the first animation effect includes an animation effect of enlarging a first image; at a third moment during the playback of the first animation effect, detecting that the preparation work of a second animation effect is completed and the first image is enlarged to a first size; enlarging the second image of the second animation effect to the first size to obtain a third animation effect, wherein the first image is the same as the second image, and the second image is the first frame image of the third animation effect; playing the third animation effect to display the initial application interface of the first application corresponding to the first application icon.

[0005] In this application, the first moment can be the moment when the user's down operation is detected, as mentioned in this application, for example, as described below. Figure 3A The time t1 shown; the first application icon can be the desktop application icon corresponding to the application to be launched mentioned in this application; the first animation effect can be the preview animation effect mentioned in this application; the second time can be the time when the user's lift-up operation is detected mentioned in this application, for example, as described below. Figure 3AThe time shown is t2; the first image can be a layer related to the preview animation mentioned in this application; the third time can be the time when the startup window animation mentioned in this application is ready to complete; the second animation can be the startup window animation mentioned in this application; the first size can be the playback progress of the preview animation mentioned in this application after the preparation work of the startup window animation is completed; the second image can be a layer related to the startup window animation mentioned in this application; the third animation can be the merged startup window animation mentioned in this application; the first application can be the application to be launched mentioned in this application.

[0006] In some implementations, when the electronic device detects a press operation during a user's click, it triggers the loading of a first animation. Next, when the electronic device detects a release operation, it initiates the lifecycle of a startActivity. After initiating the startActivity lifecycle (i.e., while the relevant code for the startActivity is executing but not yet complete), the electronic device plays the first animation. Then, after the startActivity lifecycle completes (i.e., after the relevant code for the startActivity has finished executing), the electronic device begins preparations for a second animation. After detecting the completion of the second animation's preparations, the electronic device merges the first and second animations to obtain and play the merged third animation. This merging process may include adjusting the playback progress of the second animation to match the playback progress of the currently playing first animation.

[0007] In some implementations, after the playback of the third animation effect is completed, the electronic device may also play the display animation effect of the initial application interface of the first application. For example, the initial application interface may be gradually displayed on the screen through a "fade-in" animation effect, thereby displaying the initial application interface of the first application on the screen. This application does not limit the display animation effect when displaying the initial application interface.

[0008] In this way, by using the above method, the screen when the application starts can be displayed quickly when the user lifts their hand, thus shortening the application's response latency. Furthermore, after completing the relevant preparation work for the launch window animation, the playback progress of the launch window animation is adjusted to match the playback progress of the preview animation, so as not to start playing the launch window animation from the initial state, thereby shortening the overall startup time of the application.

[0009] In one possible implementation of the first aspect above, the above-mentioned second moment, detecting the user's click on the first application icon and playing the first animation, includes: at the second moment, detecting the user's click on the first application icon and triggering the electronic device to start running the startActivity program in the operating system of the electronic device; after triggering the electronic device to start running the startActivity program, playing the first animation.

[0010] In some implementations, on Android TM The system architecture defines a `startActivity` procedure for launching new activities. When an electronic device is playing a launch window animation, it initiates the lifecycle of the `startActivity` procedure upon detecting a user's finger lift-off action. After the `startActivity` procedure's lifecycle begins (at which point the electronic device is just starting to execute its related code, but before the code has finished executing), a preview animation can be set to play. Furthermore, after the `startActivity` procedure's lifecycle completes (i.e., the related code has finished executing), the electronic device will trigger preparation work for the launch window animation. This allows for a quick display of the same preview animation as the application's launch screen as the electronic device begins executing the `startActivity` procedure and determines that a launch window animation will play, thus reducing application response latency.

[0011] In one possible implementation of the first aspect above, the method further includes: at the fourth moment of the first animation playback, detecting the completion of the startActivity program's execution process, and performing preparation work for the second animation, wherein the fourth moment is earlier than the third moment.

[0012] In this application, the fourth moment can be the moment mentioned in this application when the lifecycle of the startActivity application is detected to be complete.

[0013] In some implementations, the electronic device begins the preparation work for the launch window animation only after the launch activity program lifecycle is completed, that is, after the relevant code of the launch activity program has been executed.

[0014] In one possible implementation of the first aspect above, the second image of the second animation effect is enlarged to a first size to obtain the third animation effect, including: passing the callback operation data in the relevant code of the first animation effect to the relevant code of the second animation effect; merging the second tree data structure of the second animation effect with the first tree data structure of the first animation effect to obtain the third tree data structure; and enlarging the second image of the second animation effect having the callback operation data and the third tree data structure to a first size to obtain the third animation effect.

[0015] In this application, the first tree data structure can be the tree structure of the preview animation mentioned in this application; the second tree data structure can be the tree structure of the launch window animation mentioned in this application; and the third tree data structure can be the tree structure of the merged launch window animation mentioned in this application.

[0016] In some implementations, a callback refers to passing a function related to the preview animation as a parameter to another function. Passing callback data from the preview animation's code to the launch window animation's code can represent passing the launch window animation's function as a parameter to the same other function. Enlarging the second image of the second animation, which contains callback data and a third tree data structure, to the first size can represent adjusting the playback progress of the merged launch window animation to match the playback progress of the currently playing preview animation.

[0017] In some implementations, the tree structure of the animation is a non-linear data structure, including a root node and multiple child nodes. A child node in the tree structure can represent a single animation unit (e.g., a background color gradient, a layer enlarging, etc.). Child nodes can be nested or dependent on each other; for example, the animation of one child node may need to wait for the animation of another child node to complete before it can begin execution. Merging the tree structure of the preview animation with the tree structure of the launch window animation refers to merging the nodes in the two animations, thereby merging the animation units of each child node.

[0018] In one possible implementation of the first aspect above, the method further includes: during the playback of the third animation effect, ending the playback of the first animation effect; and, upon detecting that the playback of the third animation effect has been completed, releasing the relevant resources of the first animation effect.

[0019] In some implementations, the electronic device ends the preview animation's lifecycle while the merged launch window animation is playing. At this point, it only indicates that the preview animation is stopping playback; it does not release the related resources. The electronic device then releases the preview animation's resources only after detecting that the merged launch window animation has finished playing.

[0020] In one possible implementation of the first aspect above, during the running of the startActivity program, the method further includes: determining whether data exists corresponding to the focus window of the electronic device, the focus window being the interactive area when the user clicks the first application icon; if the data corresponding to the focus window does not exist, and if it is determined that the first animation effect is playing, continuing to run the startActivity program; if the data corresponding to the focus window does not exist, and if it is determined that the first animation effect is not playing, stopping the running of the startActivity program.

[0021] In some implementations, since the electronic device begins preparing for the launch window animation after the lifecycle of the launching activity is complete, if the electronic device intercepts the lifecycle of the launching activity, preventing it from functioning correctly, the electronic device will not perform the preparation work for the launch window animation, thus preventing the fusion of the preview animation and the launch window animation. Therefore, after detecting a user's lift-off action, the electronic device can determine whether to intercept the lifecycle of the launching activity, ensuring that interception only occurs when the focused window is empty and no preview animation is playing.

[0022] In some implementations, when it is determined that the data corresponding to the focus window does not exist, that is, when the focus window is empty, the startup activity program can continue to be executed as long as the electronic device is playing the preview animation. This allows the preview animation and the startup window animation to blend normally, and prevents the electronic device's interface from getting stuck on the preview animation interface that cannot respond to user operation commands.

[0023] In one possible implementation of the first aspect above, it is determined that a first motion effect is playing by at least one of the following methods: detecting the existence of relevant parameter values ​​for the motion effect in the electronic device, and the motion effect type corresponding to the relevant parameter values ​​is a preset type, thus determining that a first motion effect is playing; detecting that the electronic device is in the stage of preparing the first motion effect, thus determining that a first motion effect is playing, wherein the stage of preparing the first motion effect includes at least one of the following stages: acquiring motion effect data of the first motion effect, and the motion effect type corresponding to the motion effect data is a preset type, wherein the motion effect data includes at least one of the motion effect duration, frame count, color, and transparency of the first motion effect; and starting a remote animation service in the electronic device, wherein the remote animation service is used to generate the corresponding first motion effect based on the motion effect data.

[0024] In some implementations, the electronic device indicates that it is playing a motion effect when it detects that the relevant parameter value of the motion effect is not empty, that is, when the relevant parameter value of the motion effect exists. Since the electronic device can play various motion effects, a motion effect type can be set (e.g., the motion effect type can be a number). When it is determined that the motion effect type corresponding to the detected motion effect parameter value is the same as the pre-set preview motion effect type, it indicates that the electronic device is playing a preview motion effect.

[0025] In other embodiments, multiple preparation stages are included before playing the preview animation. Therefore, when it is detected that the electronic device is preparing the preview animation, it can also indicate that the electronic device is playing the preview animation.

[0026] In this way, the electronic device can determine whether a preview animation is playing. Once it determines that a preview animation is playing, it can directly continue running the relevant code for the launch activity. Therefore, during the playback of the preview animation, the lifecycle of the launch activity will not be interrupted due to delays in the internal transmission of user input data on the electronic device; nor will it be interrupted due to the lack of a focused window. This allows the preview animation and the launch window animation to blend seamlessly, preventing the electronic device's interface from getting stuck on a preview animation screen that is unresponsive to user input.

[0027] In one possible implementation of the first aspect above, it is determined that the first animation effect has not been played by detecting that the pre-launch function is not enabled, wherein the pre-launch function is used to load and play the first animation effect.

[0028] In some implementations, when the electronic device detects that the pre-launch function is not enabled, meaning the preview animation has not yet been triggered, it can directly determine that no preview animation is currently playing. Thus, if the electronic device determines that the focused window is empty and also determines that no preview animation is playing, it can invoke an interceptor to end the lifecycle of the startActivity application, thereby stopping the execution of the relevant code for the startActivity application.

[0029] Secondly, this application provides an electronic device, including: a memory and a processor, wherein the memory is used to store instructions executed by one or more processors of the electronic device, and the processor is one of one or more processors of the electronic device, used to execute the program startup method mentioned in this application.

[0030] Thirdly, this application provides a readable storage medium storing instructions that, when executed on an electronic device, cause the electronic device to perform the program startup method mentioned in this application.

[0031] Fourthly, this application provides a computer program product, including: computer instructions, which, when executed on an electronic device, cause the electronic device to execute the program startup method mentioned in this application.

[0032] The beneficial effects of the second to fourth aspects mentioned above can be referred to the relevant descriptions in the first aspect and various possible implementations of the first aspect, which will not be repeated here. Attached Figure Description

[0033] Figure 1 According to some embodiments of this application, a schematic diagram of an application startup process is shown;

[0034] Figure 2A According to some embodiments of this application, a schematic diagram of the system architecture of an electronic device is shown;

[0035] Figure 2B According to some embodiments of this application, a playback timing diagram of a startup window animation is shown;

[0036] Figure 3A According to some embodiments of this application, a playback timing diagram of a preview animation and a startup window animation is shown;

[0037] Figure 3B According to some embodiments of this application, a schematic diagram of the fusion process of preview animation and startup window animation is shown;

[0038] Figure 4 According to some embodiments of this application, a flowchart of a program startup method is shown;

[0039] Figure 5A According to some embodiments of this application, a schematic diagram of a lifecycle exception of a startActivity program is shown;

[0040] Figure 5B According to some embodiments of this application, a specific flowchart for determining whether to intercept the launching activity program is shown;

[0041] Figure 5C According to some embodiments of this application, a flowchart illustrating the execution logic for determining whether a preview animation is being played is shown;

[0042] Figure 6 According to some embodiments of this application, an interactive schematic diagram of a program startup method is shown;

[0043] Figure 7 According to some embodiments of this application, an interactive schematic diagram of a loading preview animation is shown;

[0044] Figure 8 According to some embodiments of this application, an interactive schematic diagram of playing a startup window animation is shown;

[0045] Figure 9 According to some embodiments of this application, an interactive schematic diagram of initiating anomaly interception is shown;

[0046] Figure 10 According to some embodiments of this application, a schematic diagram of the hardware structure of an electronic device is shown. Detailed Implementation

[0047] The illustrative embodiments of this application include, but are not limited to, a program startup method, an apparatus, a storage medium, and a program product.

[0048] The background of the program startup method provided in this application will be described below.

[0049] Currently, electronic devices can first play a startup window animation during application launch, and then gradually transition from the startup window animation to the application interface, thus achieving a visual transition and avoiding excessive abrupt changes in the user's gaze. For example, Figure 1 As shown in Figure (a), the user can click on the desktop application icon 101 on the mobile phone 100 to launch the application "Email" corresponding to the desktop application icon 101. During the process of launching Email, the mobile phone 100 first plays a launch window animation. Figure 1 As shown in Figures (b) and (c), the mobile phone 100 will display the relevant layer 102 of the startup window animation effect, and gradually enlarge the relevant layer 102 of the startup window animation effect until it occupies the entire screen of the mobile phone 100. After the relevant layer 102 of the startup window animation effect is enlarged to occupy the entire screen of the mobile phone 100, the mobile phone 100 will jump to the application interface 103. At this time, as shown in Figures (b) and (c), the mobile phone 100 will display the relevant layer 102 of the startup window animation effect until it occupies the entire screen of the mobile phone 100, and the mobile phone 100 will jump to the application interface 103. Figure 1 As shown in Figure (d), the mobile phone 100 can display the application interface 103 of the email application for user operation. Thus, the process of gradually transitioning from the relevant layer 102 of the startup window animation to the application interface 103 achieves a visual transition effect.

[0050] In electronic devices, the implementation of startup window animations requires the collaborative work of multiple modules. Only through data transmission and close cooperation between these modules can complex startup window animation playback effects be effectively designed and implemented. The following description, in conjunction with the modules within the electronic device system architecture, illustrates the playback process of startup window animations.

[0051] It is understood that the electronic devices applicable to the embodiments of this application can be any electronic device, including mobile phones, computers, virtual reality (VR) devices, tablet computers, wearable devices, augmented reality (AR) devices, laptop computers, in-vehicle devices, etc. The embodiments of this application do not specifically limit the form of the electronic devices.

[0052] The following uses Android's layered architecture as an example. TM Taking a system as an example, a schematic diagram of the system architecture of an electronic device according to an embodiment of this application is illustrated.

[0053] like Figure 2A As shown, Android TM The system architecture can include the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.

[0054] like Figure 2A As shown, the application layer can include applications such as the launcher. The launcher application is responsible for managing and presenting the user interface, including the desktop layout and wallpaper. For example, the launcher application can be used to display the position of desktop application icons.

[0055] The application framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer. The application framework layer may include SurfaceFlingfer, Input modules, Window Manager Service (WMS), Activity Manager Service (AMS), and System Server, among others.

[0056] The input module is used to receive user input data, which may include, for example, press and release events when the user clicks a desktop application icon.

[0057] AMS is used to track and manage the lifecycle of activities in an application, including starting, pausing, ending, and destroying activities.

[0058] WMS can be used to display, move, hide, and destroy application startup windows, and can also be used to support animation effects for startup windows, such as their appearance, disappearance, movement, and scaling.

[0059] The layer compositor is responsible for managing and rendering all display content, ensuring the smoothness and efficiency of the user interface.

[0060] System services are responsible for starting and managing various services in the system, including service management and inter-process communication.

[0061] Android TM The runtime includes core libraries and a virtual machine, Android. TM It is responsible for the scheduling and management of the Android system during runtime.

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

[0063] The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.

[0064] The system library can include multiple functional modules. For example, the surface manager can be used to create and manage layer information related to the startup window animation, and send the layer information to the layer compositor for compositing and display.

[0065] The kernel layer is the layer between hardware and software, responsible for the management and abstraction of the underlying hardware, providing a stable and efficient operating environment for upper-layer applications. The kernel layer may include display drivers, and can receive layers sent by the layer compositor for displaying startup window animations.

[0066] In addition, unlike the kernel layer in a system architecture, electronic devices may also include a computer shell, which can be used to manage windows and render graphics.

[0067] When a user clicks a desktop application icon, the input module receives the relevant operation data and sends it to the application. If the application determines the operation is a press based on the operation data, it will not execute the application launch task. If the desktop application determines the operation is a release based on the operation data, the application can send the relevant operation data to the WMS, allowing the WMS to determine which desktop application icon the user interacted with based on the user's position. After receiving the determination result from the WMS, the application can send a request to the AMS to launch the specified application. During the application launch process, the AMS calls the computer shell, which in turn calls the surface manager and layer compositor to draw and render the layers related to the launch window animation. After the computer shell completes the drawing and rendering of the launch window animation layers, it can send these layers to the AMS, which then sends a command to the computer shell to play the launch window animation. After the computer shell receives the instruction to play the launch window animation, the computer shell can send the relevant layers of the launch window animation to the application layer, and the application layer will play the launch window animation.

[0068] Based on the application startup process described above, it's clear that after detecting a user's lift-off action, the electronic device needs to complete the drawing and rendering of the layers related to the startup window animation, and multiple data transfers are required between the various architectural layers before the startup window animation can be played. In other words, the interval between detecting a user's lift-off action and playing the startup window animation (which can be described as "response latency") is relatively long. For example, as... Figure 2B As shown, after the electronic device detects a user's press operation at time t1, it continues to monitor the user's operation commands until it detects a user's release operation at time t2. Only then does the electronic device begin executing the work related to the launch window animation. For example, after detecting a release operation, it first runs the relevant code of the startActivity program to indicate that the application can be launched. After the relevant code of the startActivity program has finished running, the electronic device performs preparatory work such as drawing and rendering the relevant layers of the launch window animation. Only after the preparatory work is completed will the launch window animation be played.

[0069] Furthermore, loading the launch window animation requires the coordinated operation of multiple code modules within the application. The electronic device plays the launch window animation by running these code modules. In other words, the application is considered to be launching while the launch window animation is loading. However, as mentioned earlier, the electronic device cannot launch the application before detecting a user's lift-up action, thus preventing the launch window animation from being loaded in advance and consequently hindering its rapid playback after the lift-up action. Therefore, in this application, the electronic device can preload a static layer (which can be described as a preview layer) with the same content as the launch window animation and does not require running application code modules. This allows for the rapid display of a static image with the same content as the launch window animation after detecting a user's lift-up action.

[0070] In the program launch method provided in this application, when the electronic device detects a user's press operation, it loads a preview animation. The layers related to the preview animation have the same content as the layers related to the launch window animation mentioned above, but the preview animation is only a static layer and cannot actually respond to user clicks or other operation commands during its playback. Next, when the electronic device detects a user's finger lift operation, it can play the already loaded preview animation. Furthermore, after detecting the user's finger lift operation, the electronic device also performs the aforementioned preparatory work for the launch window animation, such as drawing or rendering the layers related to the launch window animation. Finally, after the electronic device completes the preparatory work for the launch window animation, when playing the launch window animation, it can enlarge the layers related to the launch window animation to the same size as the layers related to the preview animation, and then play the processed launch window animation until the layers gradually enlarge to occupy the entire screen.

[0071] As an example, it can be combined with Figure 3A The timing diagram shown describes the timing process of the above program startup method. Figure 3AAs shown, after the electronic device detects the user's finger pressing action at time t1, it loads a preview animation. It's understandable that the layers related to the preview animation are static layers, and the loading process is relatively fast. After loading the preview animation, the electronic device continues to monitor the user's operation commands until it detects the user's finger lifting action at time t2. At this point, the electronic device begins executing the relevant code for the start activity (startActivity) to indicate that the application can start. Initially, when the start activity code is executed, the electronic device plays the preview animation and continues playing it until the preparation work for the launch window animation is complete. After the start activity code completes, it performs preparatory work such as drawing and rendering the layers related to the launch window animation. After the preparation work for the launch window animation is complete, the electronic device enlarges the layers related to the launch window animation to the same size as the layers related to the preview animation, stops playing the preview animation, and plays the processed launch window animation until the layers gradually enlarge to occupy the entire screen. Therefore, after detecting the user's finger lifting action, the electronic device quickly plays a static image with the same content as the launch window animation.

[0072] In this way, by using the above method, when the user's finger is lifted, a preview animation that is the same as the screen when the application is launched can be quickly displayed, shortening the application's response latency; and after completing the relevant preparation work for the launch window animation, the playback progress of the launch window animation is adjusted to match the playback progress of the preview animation, without having to start playing the launch window animation from the initial state, thereby shortening the overall startup time of the application.

[0073] Among them, in Android TM The system architecture defines a `startActivity` procedure for launching new activities. Currently, when an electronic device plays a launch window animation, it executes the relevant code of the `startActivity` procedure upon detecting a user's finger lift-off. After the relevant code of the `startActivity` procedure is executed, the loading and playback of the launch window animation begins. In the program launch method provided in this application, the electronic device initiates the lifecycle of the `startActivity` procedure after detecting a user's finger lift-off. After the lifecycle of the `startActivity` procedure is initiated (at which point the electronic device has just begun executing the relevant code of the `startActivity` procedure, but the code has not yet finished executing), the preview animation can be set to play. Furthermore, after the lifecycle of the `startActivity` procedure is completed (i.e., the relevant code of the `startActivity` procedure has finished executing), the electronic device will trigger the relevant preparatory work for the launch window animation.

[0074] In some embodiments, after completing the preparation work related to the launch window animation, the electronic device will merge the launch window animation and the preview animation, so that the user cannot see the changes in the animation layer. The merging of the launch window animation and the preview animation may include the following: (1) The electronic device will pass the relevant data of the callback operation in the relevant code of the preview animation to the relevant code of the launch window animation. Here, callback refers to passing the relevant function of the preview animation as a parameter to another function. Passing the relevant data of the callback operation in the relevant code of the preview animation to the relevant code of the launch window animation can mean that the relevant function of the launch window animation is passed as a parameter to the same other function. (2) The tree structure of the preview animation and the tree structure of the launch window animation are merged to obtain the launch window animation after the tree structure is merged. Here, the tree structure of the animation is a non-linear data structure, including a root node and multiple child nodes. In the tree structure, a child node can be used to represent a motion effect unit (e.g., background color gradient, layer enlargement, etc.). The child nodes can be nested or dependent on each other. For example, the motion effect of one child node may need to wait for the motion effect of another child node to be completed before it can start executing. Merging the tree structure of the preview motion effect with the tree structure of the launch window motion effect means merging the nodes in the two motion effects, thereby merging the motion effect units of each child node. (3) Adjust the playback progress of the merged launch window motion effect to be consistent with the playback progress of the preview motion effect that is currently playing. (4) End the life cycle of the preview motion effect, that is, stop playing the preview motion effect.

[0075] In some embodiments, application startup includes cold start and warm start. A warm start refers to a situation where the application's process is running in the background, and the electronic device requires no or only partial initialization. For example, if a user launches application A for the first time and does not clear its memory, launching application A a second time would be a warm start. A cold start refers to a situation where no application's process is running in the background, and the electronic device requires full initialization of the application.

[0076] When a user exits an application, the electronic device saves the interface layer it was on at the time of exit, for example, by taking a screenshot and saving it. If the next time the application is launched is a warm start, the electronic device can retrieve the interface layer saved from the previous exit and use it as the layer for previewing animation effects. If the next time the application is launched is a cold start, for example, if a memory clearing operation was performed after the previous exit, the layer for previewing animation effects can be the application's custom startup window, such as the application's logo.

[0077] In some embodiments, the playback duration of the preview animation can be extended, ensuring that the preview animation merges with the launch window animation before ending, thus preventing animation interruptions. Furthermore, after merging the preview animation with the launch window animation, the electronic device ends the preview animation's lifecycle when playing the merged launch window animation (an example of the third animation of this application). At this point, only playback of the preview animation stops; the related resources of the preview animation are not released. The electronic device only releases the related resources of the preview animation when it detects that the merged launch window animation has finished playing.

[0078] Specifically, the process of blending the preview animation and the launch window animation can be found in [reference needed]. Figure 3B The process is shown below. Figure 3B As shown, when a user presses a button, the application framework layer (also described as the core layer) can initiate a preview animation loading request. Upon receiving this request, the shell layer executes the relevant work for loading the preview animation. After detecting a user release, the application layer can play the already loaded preview animation. Simultaneously, after detecting a user release, the application framework layer can also initiate a launch window animation preparation request. Upon receiving this request, the shell layer executes the relevant preparation work for the launch window animation. After completing this preparation work, before playing the launch window animation, the application layer merges the launch window animation with the preview animation. After merging the launch window animation and the preview animation, the application framework layer ends its processing of the preview animation, thus ending the preview animation's lifecycle. Furthermore, after ending its processing of the preview animation, the application framework layer also monitors the playback status of the launch window animation. When the application framework layer ends its processing of the launch window animation, that is, when the launch window animation finishes playing, it notifies the preview animation to trigger the release of related resources. In this way, by merging the startup window animation and the preview animation, the phenomenon of animation disconnection can be avoided.

[0079] The following is based on Figure 4 The flowchart shown describes the processing steps of the program startup method mentioned in this application. This method can be applied to electronic devices, such as the aforementioned mobile phone 100. Specifically, the method is as follows:

[0080] S401: At the first moment, the user's click action event on the first application icon is detected, and the first animation is loaded.

[0081] In this application, the first moment can be the moment when the user presses down, as mentioned in this application, for example, the moment mentioned above. Figure 3AThe first application icon can be the desktop application icon corresponding to the application to be launched mentioned in this application; the first animation effect can be the preview animation effect mentioned in this application.

[0082] In some embodiments, when an electronic device detects a press operation during a user click, it can trigger the loading of a preview animation. The preview animation layer is a static layer; that is, clicking a button in the preview animation layer will not elicit any response.

[0083] S402: At the second moment, a user's click on the first application icon and a lift-up action event are detected, and a first animation effect is played, wherein the first animation effect includes an animation effect that enlarges the first image.

[0084] In this application, the second moment can be the moment when the user's lift-up operation is detected, as mentioned in this application, for example, as described above. Figure 3A The first image can be a layer related to the preview animation mentioned in this application, showing time t2.

[0085] In some embodiments, when an electronic device detects a user's press and release action, it determines that the user's press and release actions correspond to a click on a desktop application icon, rather than a non-click action such as dragging the icon. For example, the electronic device can determine whether it is a click action by monitoring the interval between the press and release actions. If the interval is less than a preset time, it indicates a click action, and a preview animation can be played; if the interval is greater than or equal to the preset time, it indicates a non-click action, and no preview animation will be played.

[0086] In some embodiments, when an electronic device detects a user's up-click action on a desktop application icon, it triggers the electronic device to start running a startActivity in the operating system. After the startActivity is triggered, that is, while the relevant code of the startActivity is executing but has not yet completed, the electronic device plays a preview animation.

[0087] S403: At the third moment during the playback of the first motion effect, it is detected that the preparation work for the second motion effect is completed, and the first image is enlarged to the first size.

[0088] In this application, the third moment can be the moment when the preparation of the startup window animation mentioned in this application is completed; the second animation can be the startup window animation mentioned in this application; and the first size can be the playback progress of the preview animation mentioned in this application after the preparation of the startup window animation is completed.

[0089] In some embodiments, during the playback of the preview animation (which can be an example of the fourth moment in this application, and the fourth moment is earlier than the third moment), the electronic device detects the completion of the lifecycle of the startActivity program. That is, after the relevant code of the startActivity program has been executed, the electronic device will begin to perform the relevant preparatory work for the launch window animation. The layer content of the launch window animation is the same as the layer content of the preview animation, but the launch window animation can respond to the user's operation commands.

[0090] S404: Enlarge the second image of the second motion effect to the first size to obtain the third motion effect.

[0091] In this application, the second image can be a layer related to the startup window animation mentioned in this application; the third animation can be the merged startup window animation mentioned in this application.

[0092] In some embodiments, the first image is the same as the second image, and the second image is the first frame image of the third animation. That is, the relevant layer content of the preview animation and the relevant layer content of the launch window animation are the same, and the merged launch window animation starts playing from the second image.

[0093] In some embodiments, after the preparation work for detecting the launch window animation effect is completed through the above-described S403, the electronic device merges the launch window animation effect and the preview animation effect to obtain a merged launch window animation effect (i.e., the third animation effect). The fusion process for obtaining the third animation effect may include: transferring the callback operation-related data from the relevant code of the preview animation effect to the relevant code of the launch window animation effect; merging the tree data structure of the preview animation effect (which may be an example of the first tree data structure of this application) with the tree data structure of the launch window animation effect (which may be an example of the second tree data structure of this application) to obtain a merged tree data structure (which may be an example of the third tree data structure of this application); next, the electronic device can enlarge the second image of the launch window animation effect, which has the callback operation-related data and the merged tree data structure, to a first size to obtain the merged launch window animation effect. The tree structure of the animation effect is a non-linear data structure, including a root node and multiple child nodes. In this tree structure, a child node can represent a motion effect unit (e.g., background color gradient, layer enlargement, etc.). Child nodes can be nested or dependent on each other. For example, the motion effect of one child node may need to wait for the motion effect of another child node to complete before it can start executing. Merging the tree structure of the preview motion effect with the tree structure of the launch window motion effect means merging the nodes in the two motion effects, thereby merging the motion effect units of each child node.

[0094] S405: Play the third animation effect and display the initial application interface of the first application corresponding to the first application icon.

[0095] In this application, the first application can be the program to be launched mentioned in this application.

[0096] In some embodiments, the electronic device can play the merged launch window animation until the relevant layers are gradually enlarged to occupy the entire screen of the electronic device, thus completing the playback of the merged launch window animation. After the playback of the merged launch window animation is complete, the resources related to the preview animation can be released.

[0097] In some embodiments, after completing the playback operation of the third animation effect, the electronic device may also play the display animation effect of the initial application interface of the first application, for example, gradually displaying the initial application interface on the screen through a "fade-in" animation effect, thereby displaying the initial application interface of the first application on the screen. This application does not limit the display animation effect when displaying the initial application interface.

[0098] In this way, by using the above method, the screen when the application starts can be displayed quickly when the user lifts their hand, thus shortening the application's response latency. Furthermore, after completing the relevant preparation work for the launch window animation, the playback progress of the launch window animation is adjusted to match the playback progress of the preview animation, so as not to start playing the launch window animation from the initial state, thereby shortening the overall startup time of the application.

[0099] In some embodiments, an electronic device can receive user input data (e.g., operation data such as clicking a desktop application icon) and transmit the user input data between processes or internal system modules, for example, between the application's process and the WMS, or between different message queues within the application. Typically, input data transmission within the electronic device is fast, and the transmission is completed before the lifecycle of the startActivity program begins. However, some abnormal situations may occur, such as operating system malfunctions, causing the input data transmission time within the electronic device to be too long, i.e., the data transmission is not completed when the startActivity program's lifecycle begins. Currently, if the input data transmission is not complete when the electronic device initiates the startActivity program's lifecycle, the electronic device will intercept the startActivity program's lifecycle; that is, the startActivity program will terminate its execution before the relevant code for the startActivity program has finished executing.

[0100] For example, such as Figure 5A As shown, by monitoring the background application processes of an electronic device, a situation is illustrated where the lifecycle of a startup activity is blocked due to an abnormal condition. Figure 5AIn this scenario, when the lifecycle of a startup program is initiated, the input data transmission process is not yet complete. At this point, the electronic device will directly intercept the lifecycle of the startup program before the relevant code for starting the program has finished executing.

[0101] In other embodiments, the electronic device transmits input data to the application corresponding to the focus window based on the focus window in the input data (e.g., the area where a desktop icon that the user interacts with is located). However, when the focus window is empty, the electronic device also intercepts the lifecycle of the launched application before the execution of the relevant code for launching the application is complete, after initiating the lifecycle of the launched application.

[0102] It is understandable that since the electronic device begins preparing for the launch window animation after the lifecycle of the launching activity is complete, if the electronic device intercepts the lifecycle of the launching activity, preventing it from functioning correctly, it will also not perform the preparation work for the launch window animation, thus preventing the fusion of the preview animation and the launch window animation. Therefore, after detecting the user's lift-off operation, the electronic device can determine whether to intercept the lifecycle of the launching activity. In this application, the electronic device can intercept the lifecycle of the launching activity only if it determines that the focused window is empty and no preview animation is playing. The specific process can be found in [reference needed]. Figure 5B The flowchart shown is shown.

[0103] The following is combined with Figure 5B The flowchart shown details the process of determining whether to intercept the lifecycle of the launching program in the program startup method mentioned in this application. This method can be applied to electronic devices, such as the aforementioned mobile phone 100. Specifically, the method is as follows:

[0104] S501: Start executing the interception and judgment procedure.

[0105] In some embodiments, during the running of a startup activity program, the electronic device may also perform the following process to determine whether to intercept the lifecycle of the startup activity program.

[0106] S502: Determine if the task is empty. If yes, proceed to S512; otherwise, proceed to S503.

[0107] In some embodiments, the electronic device can detect whether there is an activity in the task. If not, it proceeds to S503 to determine whether the activity type of the task is the main type (Home); if so, it proceeds to S512 to end the execution of the current process.

[0108] In some embodiments, a task is a logical collection, and a task can contain multiple activities. Tasks are independent of each other, and the activities included in a task typically belong to the same application. When a user clicks a desktop application icon, it triggers the launch of the application's related activities. Electronic devices can place the application's related activities into tasks to manage and organize the interaction between the application and the user.

[0109] S503: Determine if the task's Activity type is the Home type. If yes, proceed to S504; otherwise, proceed to S512.

[0110] In some embodiments, after the electronic device detects that the task is not empty in S502, it also needs to determine whether the activity type of the current task is the primary type (Home). If yes, it proceeds to S504 to obtain the display area of ​​the task; otherwise, it proceeds to S512 to end the execution of the current process.

[0111] In some embodiments, the activity type of a task as the primary type (Home) means that the current user action is being performed on the desktop of the electronic device, such as clicking a desktop application icon.

[0112] S504: Get the display area for the task.

[0113] In some embodiments, when the Activity type of the task is determined to be Home through the above S503, the display area (homeTda) for displaying task-related content or controls can be obtained.

[0114] S505: Get the currently focused window.

[0115] In some embodiments, the focus window can be an area that is being interacted with by the user. For example, when a user clicks a desktop application icon, the focus window can be an area on the electronic device screen that is interacting with the user's click.

[0116] S506: Determine if the focused window is not empty and the display area of ​​the task is not empty. If yes, proceed to S507; otherwise, proceed to S509.

[0117] In some embodiments, when the electronic device determines that the focus window is not empty and the display area of ​​the task is not empty, it may execute S507. When the electronic device determines that the focus window is empty or the display area of ​​the task is empty, it may execute S509.

[0118] In some embodiments, a non-empty focus window indicates that the electronic device has detected interaction with the user. A non-empty display area for the task indicates that the electronic device can normally acquire the display area of ​​the task.

[0119] S507: Determine if the focused window is a child window of the task display area and if there are multiple focused windows. If yes, proceed to S508; otherwise, proceed to S509.

[0120] In some embodiments, when it is determined that the focus window is a child window of the task display area and there are multiple focus windows, the process proceeds to S508; when it is determined that the focus window is not a child window of the task display area, the process proceeds to S509.

[0121] S508: Enter parallel event handling logic.

[0122] In some embodiments, multiple focus windows may exist. For example, when launching a social media application on a tablet, the tablet interface is typically displayed in a split-screen format. For instance, one screen may be used to display the friend list, and another screen may be used to display the chat window; the two screens in the split-screen display are the two focus windows. When the electronic device determines, via the above-described S507, that multiple focus windows exist, it executes the current parallel event processing logic. For example, through resource management and scheduling mechanisms, it ensures that multiple windows can access resources fairly and avoids mutual interference. This application does not limit this aspect.

[0123] S509: Determine if the focused window is empty and a preview animation is playing. If yes, proceed to S510; otherwise, proceed to S511.

[0124] In some embodiments, when it is determined through S507 that the focus window is not a child window of the task display area, that is, when it is determined that the focus window is not on the desktop, the focus window can be preset to be empty. Then, in S509, it can be determined whether a preview animation is playing when the focus window is empty. Alternatively, when it is determined through S506 that the focus window is empty or the task display area is empty, it can be determined through S509 whether a preview animation is playing when the focus window is empty. If yes, then proceed to S510, and the electronic device will not intercept the lifecycle of the startActivity program; if no, then proceed to S511, and the interception algorithm is called.

[0125] The execution logic for determining whether a preview animation is playing can be found in [reference needed]. Figure 5C The flowchart shown is illustrated below. Specifically, the execution logic for determining whether a preview animation is playing is as follows:

[0126] S5091: Pre-start function not enabled detected; no preview animation is playing.

[0127] In some embodiments, when the electronic device detects that the pre-launch function is not enabled, that is, the electronic device has not yet triggered the loading of the preview animation, it can directly determine that there is currently no preview animation being played, and execute S5094 to return the determination result. The pre-launch function can be any of the functions mentioned in this application related to loading and playing preview animations.

[0128] S5092: The value of the animation is not empty and the animation type is a preview animation type. It is confirmed that a preview animation is playing.

[0129] In some embodiments, when the electronic device detects that the relevant parameter value of the animation effect is not empty, that is, when the relevant parameter value of the animation effect exists, it indicates that the electronic device is playing an animation effect. Since the electronic device can play various animation effects, an animation effect type can be set (e.g., the animation effect type can be a number). When it is determined that the animation effect type corresponding to the detected animation effect parameter value is the same as the pre-set preview animation effect type, it indicates that the electronic device is playing a preview animation effect, and S5094 is executed to return the determination result.

[0130] S5093: It was detected that the collection of preview animations was underway, and the determination result was "Preview animations are playing".

[0131] In some embodiments, multiple preparation stages are included before playing the preview animation. When it is detected that the electronic device is preparing to preview the animation, it can also indicate that the electronic device is playing the preview animation, and S5094 is executed to return the determination result. The stages of preparing the preview animation may include, but are not limited to, any of the following: collecting animation data, wherein the animation type corresponding to the collected animation data is a pre-set preview animation type, wherein the collected animation data may include at least one of the following: the animation time of the preview animation, the frame number of the preview animation, the color of the preview animation, and the transparency of the preview animation; or, the stages of preparing the preview animation may also include starting a remote animation service, wherein the remote animation service can be used to generate a preview animation based on the collected animation data, and the generated preview animation starts playing from the desktop.

[0132] S5094: Return the judgment result.

[0133] In some embodiments, after calling the function related to determining whether a preview animation is playing, the electronic device also needs to return the determination result to the original function that called the function. That is, in the above... Figure 5B Among the functions shown that determine whether to intercept the execution logic of the startActivity application lifecycle, this function needs to be called. Figure 5C The function shown is related to determining whether a preview animation is playing (the calling process can be...). Figure 5B (S509 in the example). Then, the electronic device completes the execution. Figure 5C After the function shown determines whether a preview animation is playing, it is necessary to return to the previous step if any of the determination results obtained in S5091 to S5093 (i.e., no preview animation is playing or a preview animation is playing). Figure 5B The relevant function corresponding to the execution logic shown (returning to S509) allows the electronic device to continue execution based on the judgment result. Figure 5B The subsequent processes. The electronic device continues execution based on the judgment result. Figure 5B For details of the subsequent processes, please refer to S510 or S511, which will not be elaborated here.

[0134] S510: Logs "The focused window is not on the desktop while the preview animation is playing".

[0135] In some embodiments, if it is determined in S509 that the focus window obtained in S505 is empty and a preview animation is playing, that is, if the data corresponding to the focus window does not exist, and the electronic device is still playing a preview animation, the electronic device will not intercept the lifecycle of the startActivity program and will continue to run the relevant code of the startActivity program, thereby performing the preparation work for the launch window animation when the lifecycle of the startActivity program is completed. Furthermore, the electronic device can also record in the log that "the focus window is not on the desktop when the preview animation is playing".

[0136] In other embodiments, if it is determined through S506 that the focus window is not empty and the task's display area is not empty, and if it is determined through S507 that the focus window is a child window of the task's display area but there are no multiple focus windows, the relevant code of the startActivity program can be directly continued to run, thereby performing the preparation work for the launch window animation when the lifecycle of the startActivity program is completed. Furthermore, if the focus window is not empty, it is not necessary to log "the focus window is not on the desktop when the preview animation is playing".

[0137] In other embodiments, it may be possible to continue running the relevant code of the startActivity program directly, without needing to detect whether the focus window is empty, simply by determining in S5092 or S5093 that a preview animation is playing. This prevents the lifecycle of the startActivity program from being interrupted due to delays in the transmission of user input data within the electronic device during the playback of the preview animation; or, it prevents the lifecycle of the startActivity program from being interrupted due to the lack of a detected focus window. This allows the preview animation and the start window animation to blend normally, preventing the electronic device's interface from getting stuck on a preview animation interface that is unresponsive to user input commands.

[0138] S511: Invoke the interceptor.

[0139] In some embodiments, if it is determined by S509 that the focus window is empty and no preview animation is played, that is, when the data corresponding to the focus window does not exist, and if the electronic device does not play the preview animation, the electronic device can call the interceptor to end the lifecycle of the startActivity program, thereby stopping the execution of the relevant code of the startActivity program.

[0140] S512: Execution of the interception and judgment procedure ends.

[0141] In some embodiments, after the above process is completed, the execution of the interception judgment procedure can be terminated. Specifically, if the electronic device executes S510, the electronic device is still running the code related to the startActivity program when the execution of the interception judgment procedure ends. If the electronic device executes S511, the electronic device has already intercepted the lifecycle of the startActivity program when the execution of the interception judgment procedure ends.

[0142] In this way, the interception logic of the startActivity program lifecycle can be reconstructed using the above method, so that the preview animation and the start window animation can be properly integrated.

[0143] The following is combined with Figure 6The interactive diagram illustrates the overall execution process of the program startup method provided in this application. During the execution of this program startup method, the electronic device needs to transmit data between multiple software architecture modules. These modules may include the system user interface (System UI), the desktop (Launcher); the application framework layer (Framework) containing the SurfaceFlinger, input module, activity manager service (AMS), and system service (SystemServer); and the display driver in the kernel layer. The application can be started through data interaction between these modules. Specifically, the interaction process is as follows:

[0144] 601: The desktop has received a down operation event sent by the input module.

[0145] In some embodiments, when a user touches the screen, the input module detects a press event in the user's click operation and sends the press event to the desktop.

[0146] 602: The desktop sends the application package name of the application to be launched to the system service.

[0147] In some embodiments, the desktop can send the application package name of the application to be launched to the system service, which will then determine whether the launch type is a cold start or a warm start. The application package name can serve as a unique identifier for the application.

[0148] 603: System service sends startup type to desktop.

[0149] In some embodiments, when the system service obtains the application package name, it can determine whether the same application has already been loaded in the background based on the package name. If so, the application's startup type is a warm start; otherwise, the application's startup type is a cold start. After determining the startup type of the application to be launched, the system service can send that startup type to the desktop.

[0150] 604: The system service sends information to the system user interface indicating that preparation work is complete.

[0151] In some embodiments, when loading the preview animation corresponding to the application to be launched, it is necessary to obtain the relevant layer of the preview animation. For example, when the user last exited the application, the electronic device saves the interface layer at the time of application exit. If the current launch type of the application is a warm start, the electronic device can obtain the interface layer saved when the application was previously exited and use that interface layer as the layer of the preview animation. If the current launch type of the application is a cold start, for example, if a memory clearing operation was performed after the application was previously exited, the layer of the preview animation can be the application's custom launch window, such as the application's logo interface.

[0152] In other embodiments, when loading the preview animation, it is also necessary to obtain the preview animation clearing operation in advance. If the preview animation can be integrated with the launch window animation, the preview animation clearing operation can be triggered after the launch window animation finishes playing. If the preview animation and the launch window animation cannot be integrated, the preview animation clearing operation can be triggered in advance.

[0153] In some embodiments, after completing all relevant tasks for loading the preview animation, the system service can send a command indicating that preparation is complete to the system user interface. The specific process of loading the preview animation can be found in [reference needed]. Figure 7 The interactive diagrams related to the loading of the preview animation shown are not detailed here.

[0154] 605: The system user interface sends a command to the desktop to play the animation.

[0155] In some embodiments, after the system user interface receives information from the system service indicating that preparation work is complete, it can notify the desktop that the preview animation can be played.

[0156] 606: Creates the root control layer for the desktop when the preview animation is open and the root control layer for the desktop when the preview animation is closed.

[0157] In some embodiments, a leash can be used to mount other layers, thus isolating the layers mounted under the leash. That is, processing the layers mounted under the leash will not affect other layers in the business logic. Specifically, creating a pre-opening root leash can be done by creating a leash related to the animation at the beginning of the preview animation, so that the relevant layers at the beginning of the preview animation are mounted under the leash, ensuring that processing these layers on the electronic device will not interfere with other layers. Similarly, creating a pre-closing root leash can be done by creating a leash related to the animation at the end of the preview animation, so that processing these layers on the electronic device will not interfere with other layers.

[0158] 607: The desktop received an up operation event sent by the input module.

[0159] In some embodiments, when a user's finger leaves the screen, the input module detects a lift-off event during the user's tap operation and sends the lift-off event to the desktop.

[0160] 608: Desktop triggers AMS to call the startActivity program.

[0161] In some embodiments, when an up operation is detected, AMS is triggered to execute relevant code for launching an activity, thereby starting a new activity to display a new window or interface. AMS is the core component for activity management, providing functions such as activity launch, lifecycle management, and stack management.

[0162] 609: Create animation objects on the desktop.

[0163] In some embodiments, an electronic device creates a motion effect object when playing any motion effect. The created motion effect object may include various attributes of the preview motion effect, such as the type of motion effect change (e.g., fade, rotation, etc.) and the duration of the preview motion effect.

[0164] 610: The layer compositor obtains the animation sent from the desktop.

[0165] In some embodiments, the layer compositer is AndroidTM A key component of the system, primarily responsible for managing and compositing display content. The layer compositor receives preview animations, renders them, and displays them.

[0166] 611: Layer compositor performs layer processing.

[0167] In some embodiments, the layer compositor can combine multiple graphic elements (e.g., multiple text boxes) in a preview animation layer into a single layer to form the final, complete display. Furthermore, when performing layer processing, the layer compositor can also render layers based on the animation information of the preview animation (e.g., fade-in, gradient, etc.). For example, if the preview animation information is fade-in (e.g., the layer gradually becomes clear from a transparent state), the layer compositor can determine the layer's transparency at each moment, thus achieving a fade-in animation effect based on the determined different transparency levels when displaying the relevant layers of the preview animation. This application does not limit the method by which the layer compositor performs layer processing.

[0168] 612: The layer compositor sends the preview animation to the display driver.

[0169] In some embodiments, the layer compositor sends the relevant layers of the processed preview animation to the display driver, so that the display driver can send the layers to the screen for display, thus enabling the playback of the preview animation.

[0170] 613: The system service sends information indicating that preparation work is complete to the system user interface.

[0171] In some embodiments, after completing the preparation work related to the launch window animation effect, the system service can send relevant information indicating that the preparation work is complete to the system user interface.

[0172] 614: The system user interface sends a motion blending command to the desktop.

[0173] In some embodiments, after completing the relevant preparations for the launch window animation, it is also necessary to merge the launch window animation with the preview before playing the launch window animation.

[0174] 615: Disable the startup window animation on the desktop.

[0175] In some embodiments, after the launch window animation is prepared, it is necessary to merge the launch window animation and the preview animation; the launch window animation is not played directly. Therefore, Android can be called... TM The system's onAnimationCancelled code cancels the playback of the startup window animation.

[0176] 616: The desktop sends messages to the system user interface.

[0177] In some embodiments, after the desktop cancels the playback of the startup window animation, a message can be passed to the system user interface so that the system user interface can execute subsequent corresponding instructions.

[0178] 617: The system user interface sends a completion message to the system service.

[0179] In some embodiments, the system user interface may send information to the system service indicating that the cancellation of the startup window animation playback has been completed.

[0180] 618: Desktop creation of startup window animation effects: the root control layer when opening and the root control layer when closing.

[0181] In some embodiments, a leash can be used to mount other layers so that the layers mounted under the leash can be isolated. That is, processing the layers mounted under the leash will not affect other layers in the business logic. Specifically, creating the opening root leash for the startup window animation can be done by creating a leash related to the animation at the beginning of the startup window animation, so that the relevant layers at the beginning of the startup window animation are mounted under the leash, ensuring that processing these layers on the electronic device will not interfere with other layers. Similarly, creating the closing root leash for the startup window animation can be done by creating a leash related to the closing animation, so that the relevant layers at the closing stage of the startup window animation are mounted under the leash, ensuring that processing these layers on the electronic device will not interfere with other layers.

[0182] 619: The system service releases the root node of the preview animation's transition effect and the root control layer when the preview animation is closed.

[0183] In some embodiments, the transition root node is the start and end point of the motion transition. For example, it can include the effect when entering the motion (e.g., fade-in, rotation-in, etc.) and the effect when the motion disappears (e.g., fade-out, rotation-out, etc.). When an electronic device merges the launch window motion and the preview motion, it can play the merged launch window motion without displaying the preview motion's entry or disappearance effects. Therefore, the preview motion's transition root node can be released.

[0184] In some embodiments, a leash can be used to mount other layers so that the layers mounted under the leash can be isolated. When an electronic device merges the launch window animation and the preview animation, it can play the merged launch window animation without displaying the effect when the preview animation is closed. Therefore, the electronic device can also release the root leash when the preview animation is closed.

[0185] 620: Create animation objects on the desktop.

[0186] In some embodiments, an electronic device creates a motion effect object when playing any motion effect. The created motion effect object may include various attributes of the merged launch window motion effect, such as the motion effect change type (e.g., fade, rotation, etc.) and the motion effect duration of the merged launch window motion effect.

[0187] 621: The layer compositor obtains the animation sent from the desktop.

[0188] In some embodiments, the layer compositer is Android TM A key component of the system, primarily responsible for managing and compositing display content. The layer compositor can receive the blended launch window animation, render it, and send it for display.

[0189] 622: Layer compositor performs layer processing.

[0190] In some embodiments, the layer compositor can combine multiple graphic elements (e.g., multiple text boxes) from the merged startup window animation layer into a single layer, thereby forming the final complete display. Furthermore, when performing layer processing, the layer compositor can also render the layers based on the animation information (e.g., fade-in, gradient, etc.) of the merged startup window animation. For example, if the startup window animation's animation information is fade-in (e.g., the layer gradually transitions from a transparent state to a clear state), the layer compositor can determine the layer's transparency at each moment, thus achieving a fade-in animation effect based on the determined different transparency levels when displaying the relevant layers of the startup window animation. This application does not limit the method by which the layer compositor performs layer processing.

[0191] 623: The layer compositor sends the animation to the display driver.

[0192] In some embodiments, the layer compositor sends the relevant layers of the processed and blended launch window animation to the display driver, so that the display driver can send the layers to the screen for display, thus enabling the playback of the blended launch window animation.

[0193] Thus, through the above interactive diagram, the screen when the application starts can be quickly displayed when the user lifts their hand, shortening the application's response latency. Furthermore, after completing the relevant preparation work for the launch window animation, the playback progress of the launch window animation is adjusted to match the playback progress of the preview animation, without having to start playing the launch window animation from the initial state, thereby shortening the overall startup time of the application.

[0194] The following is combined with Figure 7 The interactive diagram illustrates the process of loading and playing preview animations in the program startup method provided in this application. During the loading and playing of preview animations, the electronic device needs to transfer data between multiple processes or code modules. These processes or code modules may include the desktop (Launcher), preview animation-related code class (PreAniController), remote animation service (RemoteTransition), window management service (HwWindowManager), animation participant collection service (TransitionController), animation participant collection class (Transition), window transaction synchronization engine (BLASTSyncEngine), synchronization group (SyncGroup), computer shell (Shell), and layer compositor (SurfaceFlinger). Through data interaction between these processes or code modules, the loading of preview animations can be achieved. Specifically, the interaction process is as follows:

[0195] 701: A press operation was detected on the desktop.

[0196] In some embodiments, a user's action of clicking a desktop application icon may include a finger-down action and a finger-up action. When the desktop process detects a user's down action, it can trigger the relevant processes for loading preview animations in each process.

[0197] 702: Desktop creation preview animation related code class.

[0198] In some embodiments, during the process of loading and previewing animation effects, it is necessary to create a code class and call the code of each module in the code class to realize the operation of the process.

[0199] 703: Preview animation-related code class creates remote animation service.

[0200] In some embodiments, a remote animation service can be used to transmit layer information. Specifically, creating a remote animation service through preview animation-related code classes means that the remote animation service process also needs to be started while the preview animation-related code classes are running.

[0201] 704: Preview animation related code class registers and passes remote animation service to window management service.

[0202] In some embodiments, registering a created remote animation service means actually loading the remote animation service into the process of the electronic device for execution. The window management service resides in the application framework layer of the electronic device. When the window management service process receives the remote animation service interface, it indicates that the application framework layer has received a request to load the preview animation.

[0203] 705: The window management service calls the motion effect participant collection service process to create an entity of the motion effect participant collection class and pass the motion effect status.

[0204] In some embodiments, the motion effect participant collection class entity can be used to collect motion effect participants, so that subsequent electronic devices can operate only on the collected participants and not on elements unrelated to the motion effect participants (such as desktop wallpapers, etc.), so that elements unrelated to the motion effect participants will not be changed.

[0205] 706: The motion effect participant collection service process creates a motion effect participant collection class entity.

[0206] In some embodiments, after receiving a request to create a motion effect participant collection class entity, the motion effect participant collection service process can create an entity of the motion effect participant collection class to collect motion effect participants.

[0207] 707: The motion participant collection service calls the motion participant collection class entity to collect motion participants.

[0208] In some embodiments, the motion effect participant collection class entity can be used to collect motion effect participants, so that subsequent electronic devices can operate only on the collected participants and not on elements unrelated to the motion effect participants (such as desktop wallpapers, etc.), so that elements unrelated to the motion effect participants will not be changed.

[0209] 708: The animation participant collects the class entity and calls the startSyncset method in the window transaction synchronization engine process.

[0210] In some embodiments, when it is necessary to process transactions of multiple window containers, and these transactions need to be performed synchronously, a new synchronization group (SyncGoup) can be initialized by calling the startSyncset method. This synchronization group will be used to collect the transactions of all window containers participating in the synchronization. Synchronization refers to multiple operations or transactions being performed simultaneously according to a certain order and rules to ensure their dependencies and consistency.

[0211] 709: The window transaction synchronization engine process is preparing to synchronize.

[0212] In some embodiments, after a window container is added to a synchronization group, the prepareSync method is executed to set its synchronization state to an appropriate value.

[0213] 710: Window transaction synchronization engine creates synchronization groups.

[0214] In some embodiments, the synchronization group can be created when the startSyncset method in the window transaction synchronization engine process is called.

[0215] 711: The window management service process initiates an animation request to the animation participant collection class.

[0216] In some embodiments, after the motion effect participant collection class has collected all motion effect participants, the window management service process can send a playback request for previewing the motion effect to the motion effect participant collection class.

[0217] 712: Animation participants collect class entities and send animation requests to the computer shell.

[0218] In some embodiments, after receiving a playback request for a preview animation, the animation participant collection class entity can send the request to the computer shell process. The computer shell can be a processing class in the application framework layer used to handle the playback of animations.

[0219] In some embodiments, after receiving a playback request for a preview animation, if the computer shell determines that it can handle the animation request, the shell can return a confirmation instruction to the window management service.

[0220] 713: The window management service process calls the playnow method and notifies the animation participants to collect classes.

[0221] In some embodiments, the window management service process may call the playnow method to indicate that the preview animation can be started and send the instruction to play the preview animation to the animation participant collection class.

[0222] 714: The animation participant collection class calls the method in the window transaction synchronization engine process used to detect whether synchronization has been completed (onSurfacePlacement).

[0223] In some embodiments, when the preview animation can be played, the animation participant collection class can call the method in the window transaction synchronization engine process used to detect whether synchronization has been completed (onSurfacePlacement) to trigger the window transaction synchronization engine process to call the end method and end the synchronization group.

[0224] 715: The window transaction synchronization engine process calls the tryFinish method to complete.

[0225] In some embodiments, the window transaction synchronization engine process can call the tryFinish method to terminate the synchronization group.

[0226] 716: The synchronization group sends relevant information about completed preparations to the motion effects participants.

[0227] In some embodiments, after the synchronization group ends, the motion effects participant can be notified that the collection class has completed its preparation work.

[0228] 717: The window management service process obtains the relevant layers of the preview animation and saves them in the animation participant collection class.

[0229] In some embodiments, when a user exits an application, the electronic device saves the interface layer where the application was at the time of exit. If the next launch of the application is a warm start, the electronic device can retrieve the interface layer saved from the previous application exit and use that interface layer as the layer for previewing animation effects. If the next launch of the application is a cold start, for example, if a memory clearing operation was performed after the previous application exit, the layer for previewing animation effects can be the launch window customized for that application, such as, typically, the application's logo.

[0230] 718: The window management service process obtains the deletion operation of the preview animation and saves it in the animation participant collection class.

[0231] In some embodiments, the window management service process can obtain the deletion operation flow of the preview animation in advance and save it to the animation participant collection class. For example, if the preview animation can be integrated with the launch window animation, the deletion operation of the preview animation can be triggered after the launch window animation finishes playing.

[0232] 719: The window management service process obtains the clearing operation of the preview animation and saves it in the animation participant collection class.

[0233] In some embodiments, the window management service process can also obtain the preview animation clearing operation process in advance and save it to the animation participant collection class. For example, if the preview animation can be integrated with the launch window animation, the operation of clearing the preview animation memory can be triggered after the launch window animation finishes playing.

[0234] 720: Animation participant collection class notification computer shell preview animation preparation complete.

[0235] In some embodiments, the motion effect participant collection class can call the OnAnimationStart method of the computer shell to notify the computer shell that the preview motion effect is ready to be played.

[0236] 721: Layer Composer callback preview animation to desktop.

[0237] In some embodiments, since the preview animation is played on the desktop, the layer compositor can bring the preview animation back to the desktop so that it can be played on the desktop.

[0238] 722: The desktop detected a lift operation.

[0239] In some embodiments, the desktop can detect the user's finger lifting action when the user's finger leaves the screen.

[0240] 723: Desktop playback preview animation.

[0241] In some embodiments, the desktop does not immediately play the preview animation after receiving it. Instead, it begins playing only after detecting a user's lift-off action and after detecting the lifecycle of the application that initiated the startActivity.

[0242] 724: Transfer layer information from the desktop to the layer compositor.

[0243] In some embodiments, the layer compositor is used to manage and optimize rendering layer data, and the desktop can also call back the relevant layer information of the preview animation to the layer compositor for storage or subsequent processing.

[0244] In this way, through the above interaction process, the electronic device can load the preview animation when it detects the user's press operation, and quickly play the preview animation when it detects the user's release operation, so that the user can quickly see the application's startup screen after clicking the desktop application icon.

[0245] The following is combined with Figure 8 The interactive diagram illustrates the process of loading and playing the startup window animation in the program startup method provided in this application. During the loading and playing of the startup window animation, the electronic device needs to transfer data between multiple processes or code modules. These processes or code modules may include the desktop (Launcher), activity manager service (AMS), animation participant collection service (TransitionController), animation participant collection class (Transition), window transaction synchronization engine (BLASTSyncEngine), synchronization group (SyncGroup), computer shell, and layer compositor (SurfaceFlinger). Through the data interaction between these processes or code modules, the loading and playing of the startup window animation can be achieved. Specifically, the interaction process is as follows:

[0246] 801: Desktop detected a lift operation.

[0247] In some embodiments, when the desktop process detects a user's finger lift-up action, it can trigger the execution of the relevant processes for loading and playing the startup window animation, which will be described later.

[0248] 802: Desktop triggers AMS to call the startActivity program.

[0249] In some embodiments, when a lift-off operation is detected, AMS is triggered to execute the startActivity procedure to launch a new Activity in order to display a new window or interface. AMS is the core component for Activity management, providing functions such as Activity launch, lifecycle management, and stack management.

[0250] 803: AMS calls the motion participant collection service process to create an entity of the motion participant collection class (Transition).

[0251] In some embodiments, the motion effect participant collection class entity can be used to collect motion effect participants, so that subsequent electronic devices can only operate on the collected participants and will not operate on elements unrelated to the motion effect participants (such as desktop wallpaper, time settings, etc.), so that elements unrelated to the motion effect participants will not be changed.

[0252] 804: The motion effect participant collection service process creates a motion effect participant collection class entity.

[0253] In some embodiments, after receiving a request to create a motion effect participant collection class entity, the motion effect participant collection service process can create an entity of the motion effect participant collection class to collect motion effect participants.

[0254] 805: The motion effect participant collection service calls the motion effect participant collection class entity to collect motion effect participants.

[0255] In some embodiments, a motion effect participant collection entity can be used to collect motion effect participants, allowing subsequent electronic devices to operate only on the collected participants and not on elements unrelated to the motion effect participants (such as desktop wallpapers), thus ensuring that elements unrelated to the motion effect participants remain unchanged. The participants that initiate the window motion effect can be components, layouts, views, etc.

[0256] 806: The animation participant collects the class entity and calls the startSyncset method in the window transaction synchronization engine process.

[0257] In some embodiments, when it is necessary to process transactions of multiple window containers, and these transactions need to be performed synchronously, a new synchronization group can be initialized by calling the `startSyncset` method. This synchronization group will be used to collect the transactions of all window containers participating in the synchronization. Synchronization refers to multiple operations or transactions being performed simultaneously according to a certain order and rules to ensure their dependencies and consistency.

[0258] 807: The window transaction synchronization engine process is preparing to synchronize.

[0259] In some embodiments, after a window container is added to a synchronization group, the prepareSync method is executed to set its synchronization state to an appropriate value.

[0260] 808: Window transaction synchronization engine creates synchronization groups.

[0261] In some embodiments, the synchronization group can be created when the startSyncset method in the window transaction synchronization engine process is called.

[0262] 809: Animation participants collect class entities and send animation data to the computer shell.

[0263] In some embodiments, the computer shell can be a processing class within the application framework layer, used to handle tasks such as playing animations. Therefore, data related to the startup window animation can be sent to the computer shell.

[0264] 810: The animation participant collection class calls the method in the window transaction synchronization engine process used to detect whether synchronization has been completed (onSurfacePlacement).

[0265] In some embodiments, the animation participant collection class can call the method in the window transaction synchronization engine process used to detect whether synchronization has been completed (onSurfacePlacement) to trigger the window transaction synchronization engine process to call the end method and end the synchronization group.

[0266] 811: The window transaction synchronization engine process calls the tryFinish method to complete.

[0267] In some embodiments, the window transaction synchronization engine process can call the tryFinish method to terminate the synchronization group.

[0268] 812: The synchronization group sends relevant information about completed preparations to the motion effects participants.

[0269] In some embodiments, after the synchronization group ends, the motion effects participant can be notified that the collection class has completed its preparation work.

[0270] 813: Animation participants collect class notifications that the computer shell can play startup window animations.

[0271] In some embodiments, the motion effect participant collection class can call the computer shell's OnAnimationStart method to notify the computer shell that the launch window motion effect can be played.

[0272] 814: Layer Composer callback launch window animation to the desktop.

[0273] In some embodiments, since the launch window animation is played on the desktop, the layer compositor can bring the launch window animation back to the desktop so that it can be played on the desktop. Before playing the launch window animation, it is also necessary to blend it with the preview animation to avoid the user seeing two different animations. For example, the playback progress of the launch window animation can be adjusted to match the playback progress of the currently playing preview animation.

[0274] 815: Transfer layer information from the desktop to the layer compositor.

[0275] In some embodiments, the layer compositor is used to manage and optimize rendering layer data, and the desktop can also call back the relevant layer information of the startup window animation to the layer compositor for storage or subsequent processing.

[0276] Thus, through the above interaction process, the electronic device can start the window animation when it detects the user's lift-up action.

[0277] In some embodiments, as described above, in cases of abnormal input information transmission, the electronic device may intercept the lifecycle of the startActivity application. The following is in conjunction with... Figure 9 The illustrated interaction diagram describes the process of intercepting the lifecycle of the startup activity (startActivity) program in the program startup method provided in this application. During the interception of the startup activity program's lifecycle, the electronic device needs to transfer data between multiple processes or code modules. These processes or code modules may include the launcher, input module, window manager service (WindowManagerService, WMS), and activity manager service (Activity ManagerService, AMS). Through data interaction between these processes or code modules, the interception of the startup activity (startActivity) program's lifecycle can be achieved. Specifically, the interaction process is as follows:

[0278] 901: The desktop detected a user lifting action.

[0279] In some embodiments, when the desktop process detects a user's finger lift-up action, it can trigger the relevant processes for playing the startup window animation.

[0280] 902: The desktop triggers the AMS to initiate the lifecycle of the program's startActivity.

[0281] In some embodiments, when a lift-off operation is detected, AMS is triggered to execute the startActivity procedure to launch a new Activity in order to display a new window or interface. AMS is the core component for Activity management, providing functions such as Activity launch, lifecycle management, and stack management.

[0282] 903: WMS determines the focus window for the input data transmitted by the input module.

[0283] In some embodiments, the Input module can receive user input data (press and release operations) and transfer the user input data between processes or internal system modules, for example, between the application's process and the WMS. The WMS can determine the focused window in the input data, for example, whether the user's operation is performed on the desktop.

[0284] 904: The lifecycle of the startActivity application is blocked on the AMS side.

[0285] In some embodiments, input data is typically transmitted quickly within the electronic device, and the focus window is determined quickly. That is, the transmission of input data and the determination of the focus window are completed before the lifecycle of the active program begins. However, in this… Figure 9 In the interactive flowchart shown, WMS only receives input data and determines the focus window after the desktop triggers AMS to call the launch activity (initiating the launch activity's lifecycle). At this point, the launch activity's lifecycle is blocked on the AMS side. That is, AMS cancels the launch activity call, and the launch activity is not executed.

[0286] It's understandable that since electronic devices begin preparing for the launch window animation after the lifecycle of the launching activity is complete, if the electronic device intercepts the lifecycle of the launching activity, preventing it from functioning correctly, it will also not perform the preparation work for the launch window animation, thus preventing the merging of the preview animation and the launch window animation. Because the preview animation cannot respond to user commands, and its release operation is set at the end of the launch window animation, if the electronic device cannot complete the preparation work for the launch window animation, it will remain stuck on the preview animation interface, unable to respond to user commands.

[0287] In some embodiments, to avoid the situation described above where the preview animation cannot blend with the launch window animation because the lifecycle of the launching activity is blocked on the AMS side after the preview animation has already played, the electronic device can also perform the above after detecting the user's lift-up operation. Figure 5B and Figure 5C The interception and judgment logic shown ensures that when it is determined that a preview animation is playing, the lifecycle of the launch activity will continue to be executed, thereby completing the preparation work for the launch window animation and merging the launch window animation and the preview animation.

[0288] Thus, the program launch method provided in this application can quickly display the screen when the user lifts their hand, thus shortening the application's response time. Furthermore, when it is determined that a preview animation is playing, the lifecycle of the launch activity (startActivity) program will continue to be executed, so that the launch window animation and the preview animation are integrated, preventing the electronic device from remaining on the preview animation interface that cannot respond to user operation commands.

[0289] This application provides a readable storage medium storing instructions that, when executed on an electronic device, cause the electronic device to perform the program startup method mentioned in this application.

[0290] This application provides a computer program product, including: computer instructions, which, when executed on an electronic device, cause the electronic device to perform the program startup method mentioned in this application.

[0291] This application also provides an electronic device, which includes a memory and a processor. The memory stores instructions executed by one or more processors of the electronic device, and the processor is one of the one or more processors of the electronic device, used to execute the program startup method mentioned in this application.

[0292] The above-described program initiation method can be executed by an electronic device, which can be any electronic device such as a server, mobile phone, computer, tablet computer, augmented reality (AR) device, or laptop computer. The form of the electronic device is not specifically limited in the embodiments of this application.

[0293] like Figure 10 As shown, taking mobile phone 100 as an example, this is an exemplary illustration of the hardware structure of an electronic device according to an embodiment of this application.

[0294] like Figure 10As shown, the mobile phone 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, antenna 1, antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a gyroscope sensor 180A, a magnetic sensor 180B, an accelerometer sensor 180C, an infrared sensor 180D, a temperature sensor 180E, a touch sensor 180F, an ambient light sensor 180G, a light sensor 180H, etc.

[0295] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the mobile phone 100. In other embodiments of this application, the mobile phone 100 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.

[0296] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), controllers, video codecs, digital signal processors (DSPs), etc. These different processing units may be independent devices or integrated into one or more processors.

[0297] In this embodiment, the processor 110 can be used to execute the program startup method mentioned in this application. For example, loading preview animations, running the startActivity program, and executing the interception and judgment logic of the startActivity program lifecycle.

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

[0299] USB port 130 can be used to connect a charger to charge mobile phone 100, and can also be used for data transfer between mobile phone 100 and peripheral devices. It can also be used to connect headphones for audio playback. This port can also be used to connect other electronic devices, such as AR devices.

[0300] The charging management module 140 receives charging input from a charger, which can be a wireless charger or a wired charger. While charging the battery 142, the charging management module 140 can also supply power to the electronic device via the power management module 141.

[0301] The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the processor 110, internal memory 121, screen 194, camera 193, and wireless communication module 160, etc. In some other embodiments, the power management module 141 may also be located within the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be located in the same device.

[0302] The wireless communication function of mobile phone 100 can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, and modem processor, etc. Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in mobile phone 100 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, antenna 1 can be used in conjunction with a tuning switch.

[0303] The mobile communication module 150 can provide wireless communication solutions, including 2G / 3G / 4G / 5G, for use on the mobile phone 100.

[0304] Screen 194 is used to display images, videos, etc. Screen 194 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), or the like. In some embodiments, mobile phone 100 may include one or N screens 194, where N is a positive integer greater than 1.

[0305] Camera 193 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element may be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. In some embodiments, mobile phone 100 may include one or N cameras 193, where N is a positive integer greater than 1.

[0306] The internal memory 121 can be used to store computer executable program code, which includes instructions. The internal memory 121 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 (such as sound playback, image playback, etc.). The data storage area may store data created during the use of the mobile phone 100 (such as audio data, phonebook, etc.). Furthermore, the internal memory 121 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. The processor 110 executes various functional applications and data processing of the mobile phone 100 by running instructions stored in the internal memory 121 and / or instructions stored in memory located in the processor.

[0307] The mobile phone 100 can achieve audio functions such as music playback and recording through the audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.

[0308] The gyroscope sensor 180A can be used to determine the motion attitude of the mobile phone 100. In some embodiments, the angular velocity of the mobile phone 100 about three axes (i.e., the x, y, and z axes) can be determined by the gyroscope sensor 180A.

[0309] The magnetic sensor 180B includes a Hall sensor, which can be used to detect the strength of the surrounding magnetic field.

[0310] The accelerometer 180C can detect the magnitude of acceleration of the mobile phone 100 in various directions (generally three axes). When the mobile phone 100 is stationary, it can detect the magnitude and direction of gravity. It can also be used to identify the posture of electronic devices and applied to applications such as screen orientation switching and pedometers.

[0311] The 180D infrared sensor is used to detect, receive, and analyze infrared radiation signals.

[0312] Temperature sensor 180E is used to detect temperature. In some embodiments, mobile phone 100 uses the temperature detected by temperature sensor 180E to execute a temperature processing strategy. For example, when the temperature reported by temperature sensor 180E exceeds a threshold, mobile phone 100 reduces the performance of the processor located near temperature sensor 180E to reduce power consumption and implement thermal protection.

[0313] Touch sensor 180F, also known as a "touch device," can be placed on screen 194. The touch sensor 180F and screen 194 together form a touch screen, also known as a "touchscreen." Touch sensor 180F is used to detect touch operations applied to or near it.

[0314] The 180G ambient light sensor is used to detect ambient light intensity.

[0315] The 180H light sensor can be used to detect light intensity. It has high sensitivity and fast response speed, and can be used in various lighting environments to provide real-time feedback on light conditions.

[0316] Keypad 190 includes a power button, volume buttons, etc. Keypad 190 can be a mechanical keypad or a touch keypad. Mobile phone 100 can receive keypad input and generate key signal inputs related to user settings and function control of mobile phone 100.

[0317] Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback.

[0318] Indicator 192 can be an indicator light, used to indicate charging status, power changes, or to indicate messages, missed calls, notifications, etc.

[0319] The SIM card interface 195 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to make contact with or separate from the mobile phone 100. The mobile phone 100 can support one or N SIM card interfaces, where N is a positive integer greater than 1.

[0320] The embodiments disclosed in this application can be implemented in hardware, software, firmware, or a combination of these implementation methods. Embodiments of this application can be implemented as computer programs or program code executable on a programmable system, the programmable system including at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device.

[0321] Program code can be applied to input instructions to execute the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, the processing system includes any system having a processor such as, for example, a digital signal processor, a microcontroller, an application-specific integrated circuit, or a microprocessor.

[0322] The program code can be implemented using a high-level procedural language or an object-oriented programming language to communicate with the processing system. Assembly language or machine language can also be used when needed. In fact, the mechanisms described in this application are not limited to any particular programming language. In either case, the language can be a compiled language or an interpreted language.

[0323] In the accompanying drawings, some structural or methodological features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be necessary. Rather, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. Furthermore, including structural or methodological features in a particular figure does not imply that such features are required in all embodiments, and in some embodiments, these features may be omitted or may be combined with other features.

[0324] It should be noted that all units / modules mentioned in the device embodiments of this application are logical units / modules. Physically, a logical unit / module can be a physical unit / module, a part of a physical unit / module, or a combination of multiple physical units / modules. The physical implementation of these logical units / modules themselves is not the most important factor; the combination of functions implemented by these logical units / modules is the key to solving the technical problems proposed in this application. Furthermore, to highlight the innovative aspects of this application, the above-described device embodiments of this application have not introduced units / modules that are not closely related to solving the technical problems proposed in this application. This does not mean that the above-described device embodiments do not contain other units / modules.

[0325] It should be noted that in the examples and description of this application, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one" does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0326] Although this application has been illustrated and described with reference to certain preferred embodiments thereof, those skilled in the art will understand that various changes in form and detail may be made thereto without departing from the scope of this application.

Claims

1. A program startup method, applied to an electronic device, characterized in that, The method includes: At the first moment, the user's click action event on the first application icon is detected, and the first animation is loaded; At the second moment, a user's click on the first application icon and release action event is detected, and the first animation effect is played. The first animation effect includes an animation effect that enlarges the first image, and the layer of the first animation effect is a static layer. At the third moment during the playback of the first motion effect, it is detected that the preparation work for the second motion effect has been completed, and the first image is enlarged to the first size; The second image of the second animation effect is enlarged to the first size to obtain the third animation effect, wherein the first image is the same as the second image, the second image at the first size is the first frame image of the third animation effect, and the second animation effect is the launch window animation effect; Play the third animation effect to display the initial application interface of the first application corresponding to the first application icon; wherein, the third animation effect includes gradually enlarging the second image from the first size; At the second moment, when a user's lift-up action event after clicking the first application icon is detected, the first animation effect is played, including: At the second moment, a user's lift-up action event after clicking the first application icon is detected, triggering the electronic device to start running the startup activity program in the operating system of the electronic device; After the electronic device is triggered to start running the startup activity program, the first animation effect is played; The step of enlarging the second image of the second motion effect to the first size to obtain the third motion effect includes: Pass the callback operation data in the relevant code of the first animation to the relevant code of the second animation. The second tree data structure of the second animation is merged with the first tree data structure of the first animation to obtain the third tree data structure; The method further includes enlarging the second image of the second animation effect, which has the callback operation data and the third tree data structure, to the first size to obtain the third animation effect; the method also includes: At the fourth moment of the first animation playback, the completion of the startup activity program is detected, and the preparation work for the second animation is executed, wherein the fourth moment is earlier than the third moment; During the execution of the startup activity program, the method further includes: Determine whether the data corresponding to the focus window of the electronic device exists, wherein the focus window is the interactive area when the user clicks the first application icon; If the data corresponding to the focus window does not exist, and it is determined that the first animation effect is playing, the startup activity program continues to run; If the data corresponding to the focus window does not exist, and it is determined that the first animation effect is not playing, the startup activity program will stop running.

2. The method according to claim 1, characterized in that, The method further includes: During the playback of the third animation effect, the playback of the first animation effect ends; and, Once the third animation effect is detected to have finished playing, the resources related to the first animation effect are released.

3. The method according to claim 1, characterized in that, The first animation is determined to be playing by at least one of the following methods: If the presence of relevant parameter values ​​for the motion effect in the electronic device is detected, and the motion effect type corresponding to the relevant parameter values ​​is a preset type, it is determined that the first motion effect is being played. The electronic device is detected to be in the stage of preparing the first motion effect, and it is determined that the first motion effect is being played, wherein the stage of preparing the first motion effect includes at least one of the following stages: The motion effect data of the first motion effect is obtained, and the motion effect type corresponding to the motion effect data is a preset type. The motion effect data includes at least one of the motion effect time of the first motion effect, the frame number of the first motion effect, the color of the first motion effect, and the transparency of the first motion effect. The remote animation service in the electronic device is activated, wherein the remote animation service is used to generate the corresponding first animation effect based on the animation effect data.

4. The method according to claim 1, wherein the first animation effect is not played is determined by the following means: The pre-launch function was detected as not being enabled, confirming that the first animation effect was not playing. The pre-launch function is used to load and play the first animation.

5. An electronic device, characterized in that, include: A memory and a processor, the memory being used to store instructions executed by one or more processors of the electronic device, the processor being one of one or more processors of the electronic device, for executing the program startup method according to any one of claims 1 to 4.

6. A readable storage medium, characterized in that, The readable storage medium stores instructions that, when executed on an electronic device, cause the electronic device to perform the program startup method according to any one of claims 1 to 4.

7. A computer program product, characterized in that, include: Computer instructions, when executed on an electronic device, cause the electronic device to perform the program startup method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Application program starting method and communication terminal

    CN102929532A

  • Display method and electronic equipment

    CN115480834A