A method for playing application startup animation, electronic device and related medium
By starting to draw the startup layer immediately after the user touches the screen or target application icon, and synthesizes and plays the startup animation after the user leaves the screen, the problem of slow application response speed in the prior art is solved, and the user experience is improved.
Patent Information
- Application Number
- CN202411273565.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-12
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-09-12
AI Technical Summary
After the user clicks the application icon, the response speed of existing electronic devices is slow, resulting in a long time to start the application and poor user experience.
After the user touches the screen or target application icon, immediately start drawing the target application's startup layer, and synthesize and play the startup animation after the user's finger leaves the screen.
It shortens the response time of electronic devices to user operation gestures, improves the speed and fluency of the target application's startup response animation, and improves the user's user experience.
Smart Images

Figure CN118885234B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computers, and in particular to a method for playing an application startup animation, an electronic device, and related media. Background Art
[0002] With the development of technology, users can install and use different types of applications in electronic devices to meet their daily life or work needs, which brings convenience to daily life or work. Since the memory space or running memory capacity of electronic devices is limited, when electronic devices are loaded with too many applications or run multiple applications at the same time, it is easy for the application to respond to user operations too slowly. For example, after the user clicks the application icon, the application often responds slowly and the application is stuck and not smooth, which makes the application startup time longer and the user experience poor.
[0003] Therefore, how to improve the response speed of the application program, thereby improving the user experience, is a problem that those skilled in the art need to solve urgently. Summary of the invention
[0004] In a first aspect, the present application provides a method for playing an application startup animation, an electronic device, and related media. The method is applied to an electronic device, the electronic device includes a screen, the screen displays a desktop window, and the desktop window may include a desktop application layer and a background layer;
[0005] The method may include;
[0006] Receiving a user's start-up operation for a target application, where the start-up operation may include the user's finger touching the screen and the finger leaving the screen;
[0007] In response to a finger touching the screen, acquiring a startup data packet of the target application based on a package name of the target application;
[0008] Based on the startup data packet, draw the startup layer corresponding to the target application;
[0009] In response to the finger leaving the screen, a first startup animation is synthesized and played based on the desktop application layer and the startup layer.
[0010] By implementing the method provided in the first aspect, the electronic device can start drawing the startup layer of the target application after the user touches the screen (or touches the icon corresponding to the target application). Furthermore, the electronic device can synthesize and play the corresponding first startup animation based on the desktop application layer and the startup layer after the user's finger leaves the screen (which can be understood as after the user completes the action of clicking the icon of the target application), which helps to shorten the electronic device (or target application) to the user's operation gesture follow-up response time, and can make the response animation or startup animation of the target application startup presented to the user more quickly and smoothly, so that the user can have a smoother operation experience. Among them, the electronic device in the prior art only starts to draw the startup window corresponding to the target application after the user completes the action of clicking the target application, and then synthesizes the startup animation based on the startup window and the desktop application layer. This may cause the electronic device (or target application) to not display the startup animation corresponding to the target application for a long time after the user clicks the target application, and the electronic device appears to run slowly, thereby affecting the user's experience. The difference is that the method of the embodiment of the present application immediately starts drawing the startup layer corresponding to the target application after the user touches the screen (or touches the icon corresponding to the target application), which helps to quickly synthesize and play the startup animation after the user's finger leaves the screen (which can be understood as after the user completes the action of clicking the icon of the target application), thereby presenting the user with a faster and smoother target application startup effect, thereby improving the user's experience.
[0011] Implementing the method provided in the first aspect, in some embodiments, the method may further include:
[0012] In response to the finger leaving the screen, drawing a startup window corresponding to the target application, where the startup window may include a startup layer and an application interface layer;
[0013] Based on the desktop application layer and the startup window, synthesize and play the second startup animation.
[0014] By implementing the method provided in the above embodiment, the electronic device can draw the startup window corresponding to the target application after the user's finger leaves the screen (which can be understood as after the user completes the action of clicking the icon of the target application), wherein the startup window can include a startup layer and an application interface layer. It can be understood that the startup layer can be used to present the cover content corresponding to the target application, such as a cover interface including the target application icon; the application interface layer can be used to present the application content corresponding to the target application, such as the main operation interface of the target application. Furthermore, after the startup window corresponding to the target application is drawn, the electronic device can synthesize and play the second startup animation based on the startup window and the desktop application layer. It can be seen that the embodiment of the present application can split the startup animation corresponding to the target application into two parts, namely the first startup animation and the second startup animation mentioned above, which is helpful for the subsequent fusion of the first startup animation and the second startup animation, thereby displaying the real application interface to the user and ensuring that the user can use the target application normally.
[0015] In some embodiments of the method provided in the first aspect, synthesizing and playing the second startup animation based on the desktop application layer and the startup window may include:
[0016] In response to the completion of drawing the startup window, stop playing the first startup animation, and record the playing progress corresponding to the first startup animation;
[0017] Based on the play progress of the first startup animation, the desktop application layer, and the startup window, the second startup animation is synthesized and played.
[0018] By implementing the method provided in the first aspect, after the startup window corresponding to the target application is drawn, the electronic device can complete the fusion of the first startup animation and the second startup animation by "stopping playing the first startup animation, and synthesizing and playing the second startup animation based on the playing progress of the first startup animation, the desktop application layer and the startup window". This helps to switch the first startup animation to the startup animation that truly corresponds to the target application (which can be understood as the second startup animation) without the user's perception, thereby ensuring the user's usage experience.
[0019] In some embodiments of the method provided in the first aspect, synthesizing and playing the second startup animation based on the desktop application layer and the startup window may include:
[0020] In response to the completion of drawing the startup window, recording the playback progress corresponding to the first startup animation;
[0021] Based on the play progress of the first startup animation, the desktop application layer, and the startup window, the second startup animation is synthesized and played.
[0022] By implementing the method provided in the first aspect, after the startup window corresponding to the target application is drawn, the electronic device can also synthesize the second startup animation based on the playback progress of the first startup animation, the desktop application layer and the startup window, and play the first startup animation and the second startup animation at the same time, which can ensure that after the first startup animation is played, the electronic device can normally present the application interface corresponding to the target application to the user, so that the user can use the target application normally.
[0023] In some embodiments of the method provided in the first aspect, before receiving a start operation of the user for the target application, the method may further include:
[0024] The layer hierarchy relationship corresponding to the desktop window is stored in a first tree structure. The root node of the first tree structure is a display area node. The child nodes of the display area node may include a desktop node. The child nodes of the desktop node may include a desktop launcher node. The child nodes of the desktop launcher node may include a first node corresponding to the desktop application layer.
[0025] By implementing the method provided in the first aspect, the electronic device can store and manage the display hierarchy relationship between the various layers contained in the desktop window in the first tree structure, which helps to present a reasonable and beautiful desktop interface to the user and ensure the user's usage experience.
[0026] Implementing the method provided in the first aspect, in some embodiments, the method may further include:
[0027] In response to a finger touching the screen, creating an approach preparation node and a first transition node in the first tree structure to generate a second tree structure;
[0028] In response to the finger leaving the screen, creating a first exit node and a first entry node in the second tree structure to generate a third tree structure;
[0029] In response to the completion of drawing the startup window, a second transition node is created in the third tree structure to generate a fourth tree structure or a fifth tree structure.
[0030] Implementing the method provided in the first aspect, the electronic device can adjust the tree structure of the storage layer display hierarchical relationship in response to different user operations or thread completion conditions, so as to achieve the purpose of orderly, correctly and beautifully displaying the application startup process. Specifically, in response to the user's finger touching the screen, the electronic device can create an entry preparation node and a first transition node in the first tree structure, thereby generating a second tree structure, wherein the entry preparation node is used to mount the above-mentioned startup layer, and the first transition node is used to prepare for the subsequent playback of the first startup animation. Further, in response to the finger leaving the screen, the electronic device can create a first exit node and a first entry node in the second tree structure, thereby generating a third tree structure, wherein the first exit node helps to realize the subsequent exit effect of the desktop application layer, and the first entry node helps to realize the subsequent entry effect of the startup layer of the target application. Further, in response to the completion of the startup window drawing, the electronic device can create a second transition node in the third tree structure to generate a fourth tree structure or a fifth tree structure, wherein the second transition node helps to play the second startup animation later.
[0031] Implementing the method provided in the first aspect, in some embodiments, in the second tree structure, the child nodes of the desktop node may include an entry preparation node and a first transition node, and the child nodes of the entry preparation node may include a second node corresponding to the startup layer.
[0032] In some embodiments of the method provided in the first aspect, in the third tree structure, the child nodes of the desktop node may include a first transition node, and the child nodes of the first transition node may include a first exit node and a first entry node;
[0033] The child nodes of the first exit node may include a desktop launcher node;
[0034] The child nodes of the first approach node may include an approach preparation node.
[0035] In some embodiments of the method provided in the first aspect, in the fourth tree structure, the child nodes of the display area node may include a second transition node, and the child nodes of the second transition node may include a second exit node and a second entry node;
[0036] The child nodes of the second exit node may include a desktop node, and the child nodes of the desktop node may include a desktop launcher node;
[0037] The sub-nodes of the second approach node may include the first approach node and an application node;
[0038] The child nodes of the application node may include a third node corresponding to the startup window.
[0039] By implementing the method provided in the first aspect, the electronic device can realize the exit effect of the desktop application layer with the help of the second exit node, and can realize the entry effect of the launch window of the target application with the help of the second entry node, thereby realizing the playback of the second animation, which helps to ensure that the specific operation interface of the target application can ultimately be correctly presented to the user, and provides a guarantee for the user's use experience. Furthermore, the electronic device simultaneously mounts the launch layer and the launch window under the second entry node, which helps to merge the first launch animation and the second launch animation, thereby providing the user with a good application launch operation experience.
[0040] In some embodiments of the method provided in the first aspect, in the fifth tree structure, the child node of the display area node may include a second transition node, and the child node of the second transition node may include a second exit node;
[0041] The child nodes of the second exit node may include a desktop node;
[0042] The child nodes of the first exit node may include a desktop launcher node;
[0043] The child nodes of the first approach node may include an application node;
[0044] The child nodes of the application node may include a third node corresponding to the startup window.
[0045] By implementing the method provided in the first aspect, the electronic device can use the first exit node and the second exit node to achieve the exit effect of the desktop application layer, and can also use the first entry node to achieve the entry effect of the startup window of the target application, thereby achieving the playback of the second animation, which helps to ensure that the specific operation interface of the target application can ultimately be correctly presented to the user, providing a guarantee for the user's usage experience. Furthermore, the electronic device simultaneously mounts the startup layer and the startup window under the first entry node, and achieves the effect of merging the first startup animation with the second startup animation by synchronously playing the first startup animation and the second startup animation, which helps to provide users with a good application startup operation experience.
[0046] In some embodiments of implementing the method provided in the first aspect, synthesizing and playing the first startup animation may include:
[0047] The first startup animation is synthesized and played based on the third tree structure.
[0048] By implementing the method provided in the first aspect, the electronic device can play the first startup animation correctly and beautifully based on the third tree structure, thereby ensuring the user's usage experience.
[0049] In some embodiments of implementing the method provided in the first aspect, synthesizing and playing the second startup animation may include:
[0050] The second startup animation is synthesized and played based on the fourth tree structure, or the second startup animation is synthesized and played based on the fifth tree structure.
[0051] By implementing the method provided in the first aspect, the electronic device can correctly and beautifully play the second startup animation based on the fourth tree structure or the fifth tree structure, thereby ensuring the user experience.
[0052] In a second aspect, an embodiment of the present application provides an electronic device, the electronic device comprising: a screen and a processor;
[0053] The screen can be used to display a desktop window, which may include a desktop application layer and a desktop background layer;
[0054] The screen may also be used to receive a user's start-up operation for a target application, and the start-up operation may include the user's finger touching the screen and the finger leaving the screen;
[0055] The processor may be configured to obtain a startup data packet of a target application based on a package name of the target application in response to a finger touching the screen;
[0056] The processor can also be used to draw a startup layer corresponding to the target application based on the startup data packet;
[0057] The processor can also be used to synthesize and play a first startup animation based on the desktop application layer and the startup layer in response to the finger leaving the screen.
[0058] To implement the method provided in the second aspect, in some embodiments, the electronic device may further include:
[0059] The processor may also be configured to draw a startup window corresponding to the target application in response to the finger leaving the screen, where the startup window may include a startup layer and an application interface layer;
[0060] The processor can also be used to synthesize and control the playback of a second startup animation based on the desktop application layer and the startup window;
[0061] The screen can also be used to present a second startup animation.
[0062] To implement the method provided in the second aspect, in some embodiments, the electronic device may further include:
[0063] The processor may also be configured to stop playing the first startup animation in response to the completion of drawing the startup window, and record the playing progress corresponding to the first startup animation;
[0064] The processor can also be used to synthesize and play the second startup animation based on the playback progress of the first startup animation, the desktop application layer and the startup window.
[0065] To implement the method provided in the second aspect, in some embodiments, the electronic device may further include:
[0066] The processor may also be configured to record the playback progress corresponding to the first startup animation in response to completion of drawing the startup window;
[0067] The processor can also be used to synthesize and play the second startup animation based on the playback progress of the first startup animation, the desktop application layer and the startup window.
[0068] To implement the method provided in the second aspect, in some embodiments, the electronic device may further include:
[0069] The processor can also be used to store the layer hierarchy relationship corresponding to the desktop window in a first tree structure, the root node of the first tree structure is the display area node, the child nodes of the display area node may include a desktop node, the child nodes of the desktop node may include a desktop launcher node, and the child nodes of the desktop launcher node may include a first node corresponding to the desktop application layer.
[0070] To implement the method provided in the second aspect, in some embodiments, the electronic device may further include:
[0071] The processor may also be configured to create an approach preparation node and a first transition node in the first tree structure in response to a finger touching the screen, thereby generating a second tree structure;
[0072] The processor may also be configured to create a first exit node and a first entry node in the second tree structure in response to the finger leaving the screen, so as to generate a third tree structure;
[0073] The processor may also be configured to create a second transition node in the third tree structure in response to completion of drawing the startup window, and generate a fourth tree structure or a fifth tree structure.
[0074] Implementing the method provided in the second aspect, in some embodiments, in the second tree structure, the child nodes of the desktop node may include an entry preparation node and a first transition node, and the child nodes of the entry preparation node may include a second node corresponding to the startup layer.
[0075] In some embodiments of the method provided in the second aspect, in the third tree structure, the child nodes of the desktop node may include a first transition node, and the child nodes of the first transition node may include a first exit node and a first entry node;
[0076] The child nodes of the first exit node may include a desktop launcher node;
[0077] The child nodes of the first approach node may include an approach preparation node.
[0078] In some embodiments of the method provided in the second aspect, in the fourth tree structure, the child nodes of the display area node may include a second transition node, and the child nodes of the second transition node may include a second exit node and a second entry node;
[0079] The child nodes of the second exit node may include a desktop node, and the child nodes of the desktop node may include a desktop launcher node;
[0080] The sub-nodes of the second approach node may include the first approach node and an application node;
[0081] The child nodes of the application node may include a third node corresponding to the startup window.
[0082] In some embodiments of the method provided in the second aspect, in the fifth tree structure, the child node of the display area node may include a second transition node, and the child node of the second transition node may include a second exit node;
[0083] The child nodes of the second exit node may include a desktop node;
[0084] The child nodes of the first exit node may include a desktop launcher node;
[0085] The child nodes of the first approach node may include an application node;
[0086] The child nodes of the application node may include a third node corresponding to the startup window.
[0087] To implement the method provided in the second aspect, in some embodiments, the electronic device 100 may further include:
[0088] The processor can also be used to synthesize and control the playing of the first startup animation based on the third tree structure.
[0089] To implement the method provided in the second aspect, in some embodiments, the electronic device 100 may further include:
[0090] The processor may also be configured to synthesize and control the playing of the second startup animation based on the fourth tree structure, or to synthesize and control the playing of the second startup animation based on the fifth tree structure.
[0091] In a third aspect, an embodiment of the present application provides an electronic device, which may include one or more processors and one or more memories; wherein the one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program code, and the computer program code includes computer instructions, and when the one or more processors execute the computer instructions, the method described in the first aspect and any possible implementation method of the first aspect is executed.
[0092] In a fourth aspect, an embodiment of the present application provides a chip, comprising a logic circuit and an interface, wherein the logic circuit and the interface are coupled; the interface is used to input and / or output code instructions, and the logic circuit is used to execute the code instructions so that the method in the first aspect or any possible implementation of the first aspect is executed.
[0093] In a fifth aspect, the present application provides a computer-readable storage medium comprising instructions, which, when executed on an electronic device, execute the method described in the first aspect and any possible implementation manner of the first aspect.
[0094] In a sixth aspect, the present application provides a computer program product comprising instructions, which, when executed on an electronic device, enables the electronic device to execute the method described in the first aspect and any possible implementation of the first aspect.
[0095] It can be understood that the electronic devices provided in the second and third aspects, the chip provided in the fourth aspect, the computer-readable storage medium provided in the fifth aspect, and the computer program product provided in the sixth aspect are all related to the method for playing an application startup animation provided in the first aspect, and can be used to execute the method provided in the present application. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects of the method for playing an application startup animation in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0096] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0097] Figure 1 This is a schematic diagram of a scenario for starting an application provided in an embodiment of the present application;
[0098] Figure 2 This is a schematic diagram of a process of starting an application provided in an embodiment of the present application;
[0099] Figure 3 It is a flowchart of a method for playing an application startup animation provided by an embodiment of the present application;
[0100] Figure 4 is a schematic diagram of an interface of an electronic device provided in an embodiment of the present application;
[0101] Figure 5 It is a schematic diagram of the composition of a startup layer provided in an embodiment of the present application;
[0102] Figure 6 It is a schematic diagram of a process of drawing a startup layer provided in an embodiment of the present application;
[0103] Figure 7 It is a schematic diagram of the composition of another startup layer provided in an embodiment of the present application;
[0104] Figure 8 is a schematic diagram of a playback scene of a first startup animation provided in an embodiment of the present application;
[0105] Fig. 9 is a schematic diagram of another playback scene of the first startup animation provided in an embodiment of the present application;
[0106] Fig.10 This is a schematic diagram of a scene for starting animation fusion provided in an embodiment of the present application;
[0107] Fig.11 is another schematic diagram of a scene for starting animation fusion provided in an embodiment of the present application;
[0108] Fig.12 is a structural schematic diagram of a first tree structure provided in an embodiment of the present application;
[0109] Fig.13 is a structural schematic diagram of a second tree structure provided in an embodiment of the present application;
[0110] Fig.14 is a structural schematic diagram of a third tree structure provided in an embodiment of the present application;
[0111] Fig.15 is a structural schematic diagram of a fourth tree structure provided in an embodiment of the present application;
[0112] Fig.16 is a structural schematic diagram of a fifth tree structure provided in an embodiment of the present application;
[0113] Fig.17 It is a schematic diagram of a process of synthesizing and playing a first startup animation provided by an embodiment of the present application;
[0114] Fig.18 is a schematic diagram of a process of synthesizing and playing a second startup animation provided by an embodiment of the present application;
[0115] Fig.19 It is a schematic diagram of the composition of an electronic device provided in an embodiment of the present application;
[0116] Fig. 20 It is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;
[0117] Fig.21 It is a software structure block diagram provided in an embodiment of the present application. DETAILED DESCRIPTION
[0118] The technical solutions in the embodiments of the present application will be described clearly and in detail below in conjunction with the accompanying drawings. The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to be used as limitations on the present application. As used in the specification and the appended claims of the present application, the singular expressions "one", "a kind", "said", "above", "the" and "this" are intended to also include plural expressions, unless there is a clear contrary indication in the context. It should also be understood that in the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in the text is only a kind of association relationship describing the associated objects, indicating that there can be three relationships, for example, A and / or B, can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" refers to two or more than two.
[0119] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.
[0120] The term "user interface (UI)" in the following embodiments of the present application refers to a medium interface for interaction and information exchange between an application or operating system and a user, which realizes the conversion between the internal form of information and the form acceptable to the user. The user interface is a source code written in a specific computer language such as Java and extensible markup language (XML). The interface source code is parsed and rendered on an electronic device and finally presented as content that the user can recognize. The commonly used form of user interface is a graphical user interface (GUI), which refers to a user interface related to computer operations that is displayed in a graphical manner. It can be a visual interface element such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, etc. displayed on the display screen of an electronic device.
[0121] In order to make the description of the following embodiments clear and concise, a brief introduction to the related technology is first given:
[0122] (1) Chirality
[0123] In the technical field, especially in touch technology, chirality (or touch delay) can refer to the response speed of the screen image to react or change according to the user's operation gesture when the user clicks or slides the screen of the electronic device. It can be understood that when the user operates an electronic device with higher chirality, the animation or motion effect presented by the electronic device is smoother, so the electronic device with higher chirality can provide users with better operation or interaction experience. On the contrary, the lower the chirality of an electronic device, the higher the touch delay will be, which will cause the user to feel obvious lag when using the electronic device. For example, the chirality of the electronic device may deteriorate when multiple applications are opened or used for a long time.
[0124] (2) Desktop Launcher
[0125] The desktop launcher can be called Launcher, also known as "HomeScreen", which is the first application that users see after turning on their mobile phones or other electronic devices. It not only displays and manages other applications on the phone, but also provides functions such as desktop switching, application shortcut functions, background images, etc. In the Android system, Launcher is a core component responsible for loading the icons and names of other applications and opening them through intents.
[0126] (3) Application layer, application framework layer, hardware abstraction layer, and kernel layer
[0127] The application layer (Application), application framework layer (Android Framework), hardware abstraction layer (Hardware Abstraction Layer) and kernel layer (Linux Kernel) are the four layers in the Android system architecture. Among them:
[0128] The application layer includes system-built-in applications and non-system-level applications, which are usually developed based on the Java language and are mainly responsible for direct interaction with users.
[0129] The application framework layer is the foundation of Android application development. This layer is written in Java code and provides developers with the APIs they need to develop applications. Many core applications also use this layer to implement their core functions. This layer simplifies the reuse of components. Developers can directly use the components it provides to quickly develop applications, or they can implement personalized expansion through inheritance. Specifically, the application framework layer can include multiple parts such as activity manager, window manager, content provider, view system, package manager, phone manager, resource manager, location manager, notification manager, etc.
[0130] The hardware abstraction layer encapsulates the underlying hardware driver and provides a general interface for calling the driver to the application framework layer. Manufacturers only need to implement the corresponding interface according to the specification and store it in a specific directory in the form of a shared library. The upper layer only needs to load this shared library and find the pointer to the device corresponding to the corresponding module. After obtaining the pointer to the entire device, it can operate the underlying hardware.
[0131] The kernel layer provides underlying drivers for various hardware of electronic devices (display driver, keyboard driver, Flash memory driver, camera driver, audio driver, Bluetooth driver, WF driver, Binder IPC driver, power management (PowerManagement)). The kernel exists as an abstract layer between hardware and software, with powerful memory management and process management, permission-based security mode, and support for shared libraries. In the present application method, the operation process of the electronic device presenting the application startup effect to the user is mainly related to the display driver.
[0132] (4) Window Management Framework
[0133] The Window Manager Service (WMS) is a window management service located in the Framework layer. Its responsibility is to manage all windows in the system, that is, Windows. In layman's terms, a Window is a display area on a mobile phone, which is the drawing canvas Surface in Android. The process of adding a Window is the process of applying for a Surface, and the manager of the entire process is WMS.
[0134] (5) Cold start and hot start
[0135] A cold start occurs when an app is opened for the first time, or when the app is started again after being completely closed. In this case, the system needs to create a new process from scratch to start the app. This process may include loading and starting the app, displaying a blank window, creating an app process, creating an app object, starting the main process, creating the main activity (MainActivity), rendering views, performing layout and drawing operations, and finally replacing the displayed background window with the main activity. It can be seen that since a cold start involves building the entire environment of the app from scratch, a cold start takes a long time and requires more running resources.
[0136] Hot start occurs when the app has been opened but is placed in the background due to a user operation (such as pressing the back key or the Home key), and the user tries to start the app again. In this case, since the app process is still running, the system does not need to recreate a new process. It can directly restore the app state from the existing process and create and initialize the main activity (MainActivity). It can be seen that since hot start does not require recreating the process and loading resources, the hot start process is relatively fast. Compared with cold start, hot start can respond to the user's startup operation faster, thereby providing users with a smoother operating experience.
[0137] See also Figure 1 , Figure 1 A schematic diagram of a scenario for launching an application provided in an embodiment of the present application.
[0138] like Figure 1 As shown, the electronic device 100 is installed with the first application 1. In response to the user's startup operation on the first application 1, the electronic device 100 may start drawing the startup window corresponding to the first application 1, and synthesize and play the startup animation based on the startup window, and finally present the application interface (or application operation interface) corresponding to the first application 1 to the user. The startup operation may be clicking the icon of the first application 1. The startup window corresponding to the first application 1 may include a startup layer and an application interface layer, and the application interface layer may correspond to the main operation interface of the first application 1.
[0139] For example, the process corresponding to the electronic device 100 responding to the user's start operation on the first application 1 can refer to Figure 2 , Figure 2 A schematic diagram of a process of starting an application provided in an embodiment of the present application. Figure 2 As shown, in response to the user's startup operation, the electronic device 100 can synthesize the startup animation corresponding to the target application based on the desktop window and the startup window of the target application. Among them, the desktop window is generated and managed by the desktop launcher Launcher in the electronic device 100, and the startup window can be generated and managed by the window management framework WMS in the electronic device 100.
[0140] Furthermore, the startup animation synthesized by the electronic device 100 includes two parts: an exit animation and an entry animation. Among them, the exit animation is used to play the exit process of the desktop application layer, and the entry animation is used to play the entry process of the startup window. Further, the entry animation of the startup window may include the exit process of the startup layer and the entry process of the application interface layer. Among them, the entry animation of the startup window is to first present the startup interface of the target application to the user, and then present the main operation interface of the target application to the user. Therefore, it is necessary to gradually hide the startup interface after presenting the startup interface of the target application to the user. This invisible process can be regarded as an exit animation; in contrast, in the process of the startup interface gradually disappearing, the main operation interface will gradually appear, and the process of the main operation interface gradually appearing can be regarded as an entry animation.
[0141] It can be seen that Figure 1 to Figure 2 The electronic device 100 involved in the process starts drawing the startup window corresponding to the first application 1 only after the user completes the action of clicking on the first application 1 (or completes the operation of starting the target application). This may result in the electronic device 100 (or the first application 1) not displaying the startup animation corresponding to the first application 1 for a long time after the user clicks on the first application 1, making the electronic device 100 appear to run slowly, thereby affecting the user's experience.
[0142] Therefore, in order to improve the speed at which an electronic device (or application) responds to user operations, an embodiment of the present application provides a method for playing an application startup animation. By implementing this method, after the user touches the corresponding area of the target application on the screen of the electronic device (which can be understood as the user touches the icon corresponding to the target application), the electronic device can immediately start drawing the startup layer corresponding to the target application, which helps to quickly synthesize and play the startup animation after the user's finger leaves the screen (which can be understood as after the user completes the action of clicking the icon of the target application), thereby presenting the user with a faster and smoother target application startup effect, thereby improving the user's experience.
[0143] For a more detailed description of the method of the present application, please see Figure 3 , Figure 3 A flowchart of a method for playing an application startup animation provided in an embodiment of the present application.
[0144] like Figure 3 As shown, the method of the embodiment of the present application may include:
[0145] S201: The electronic device 100 receives a user's start-up operation for a target application.
[0146] Among them, the startup operation may include the user's finger touching the screen and the finger leaving the screen. Exemplarily, the startup operation can be understood as: first, the user's finger touches the icon corresponding to the target application; second, the user's finger stays in the screen area corresponding to the icon for a period of time; finally, the user's finger leaves the screen. It can be understood that the user's startup operation for the target application can be clicking the icon corresponding to the target application. It should be noted that the user can also implement the startup operation for the target application based on other tools, for example, using a capacitive pen to click the icon corresponding to the target application, or using a mouse cursor to click the icon corresponding to the target application.
[0147] It should be noted that the electronic device 100 can be understood as a device including a screen, wherein the screen can also be called a display screen, and the functions of the screen may include a display function and an interactive function. Specifically, the electronic device 100 can present various texts, pictures, videos, applications and other information to the user through the screen, and the user can also perform various operations through gestures such as clicking and sliding. Furthermore, the electronic device 100 can also be referred to as user equipment (User Equipment, abbreviated as UE), which can be a handheld or wearable device, and its specific form can be a mobile phone, a tablet computer (Pad), a smart watch or other wearable device, a laptop or desktop computer with a touch screen function, etc. The specific structure of the electronic device 100 can be referred to. Figures 19 to 21 The relevant content will not be elaborated here.
[0148] For example, see Figure 4 , Figure 4 This is a schematic diagram of an interface of an electronic device provided in an embodiment of the present application. Figure 4 As shown, the electronic device 100 may include a screen 910, on which a desktop window may be displayed, wherein the desktop window may be composed of two layers overlapping each other. Specifically, the desktop window may be composed of a desktop application layer and a desktop background layer, wherein the display level of the desktop application layer is higher than the display level of the desktop background layer.
[0149] S202: In response to a finger touching the screen, the electronic device 100 obtains a startup data packet of the target application based on the package name of the target application.
[0150] Among them, the user's finger touching the screen can be understood as the user touching the target area of the screen, and the target area can be understood as the screen operation area corresponding to starting the target application. For example, the area corresponding to the target application icon displayed on the screen can be understood as the target area.
[0151] Furthermore, the electronic device 100 can use the package name of the target application to obtain various data related to running or using the target application, such as layer data corresponding to the startup window of the target application. It should be noted that the startup data packet of the target application may include layer information related to the startup layer for presenting the cover content corresponding to the target application, and may also include layer information of the application interface layer for presenting the main operation interface of the target application.
[0152] In a possible implementation, in response to a finger touching the screen, the electronic device 100 can determine the startup type of the target application based on the package name of the target application. Specifically, the startup type of the target application can include cold startup and hot startup, wherein, when the startup type of the target application is cold startup, the electronic device 100 needs to obtain the layer information of the cover content corresponding to the target application from the startup data packet; when the startup type of the target application is hot startup, the electronic device 100 needs to obtain the target screenshot data from the startup data packet, and the target screenshot data is the application interface screenshot corresponding to when the user switches the target application to the running background.
[0153] In another possible implementation, if the electronic device 100 cannot obtain the corresponding startup data packet based on the package name of the target application, there is no need to execute the subsequent steps of this application. From the user's usage perception, the electronic device 100 does not respond to the user's startup operation.
[0154] S203: The electronic device 100 draws a startup layer corresponding to the target application based on the startup data packet.
[0155] Specifically, the electronic device 100 draws a startup layer corresponding to the target application based on the startup data packet, which helps to subsequently generate and present a startup animation corresponding to the target application to the user.
[0156] For example, see Figure 5 , Figure 5 A schematic diagram of the composition of a startup layer provided in an embodiment of the present application. Figure 5 As shown, in the case where the startup type of the target application is a cold start, in response to the user's finger touching the screen, the electronic device 100 can obtain the layer information corresponding to the first startup layer 410 and draw the first startup layer 410; in the case where the startup type of the target application is a hot start, if the display interface corresponding to the target application at the moment before being switched to the background is the display interface of the second startup layer 420, the electronic device 100 will take a screenshot of the display interface corresponding to the second startup layer 420 and save it. In response to the user's finger touching the screen, the electronic device 100 can obtain the screenshot information corresponding to the second startup layer 420, and draw the second startup layer 420 based on the screenshot information.
[0157] For example, see Figure 6 , Figure 6 A schematic diagram of a process of drawing a startup layer provided in an embodiment of the present application. Figure 6 As shown, in response to the user's finger touching the screen (which can be understood as the user's finger touching the icon of the target application, or the user's finger being placed on the icon of the target application), the startup animation control module can send a startup layer request to the startup window control module. Further, the startup window control module creates a blank layer in response to the startup layer drawing request, and sends a parameter transmission instruction and a layer drawing instruction to the layer drawing module. Among them, the parameter transmission instruction is used to obtain the type of the startup layer. Specifically, the type of the startup layer includes a cold start layer, a hot start layer, and empty. Empty means that the layer drawing module cannot obtain the corresponding startup data packet based on the package name of the target application.
[0158] Further, in response to the parameter transmission instruction and the layer drawing instruction, the layer drawing module can go to the resource library corresponding to the electronic device 100 to obtain the startup data packet of the target application based on the package name of the target application. Exemplarily, if the startup type of the target application is cold start, the layer drawing module can pass parameter 1 to the startup window control module and start drawing the corresponding startup layer, indicating that the type of the startup layer is a cold start layer; if the startup type of the target application is hot start, the layer drawing module can pass parameter 2 to the startup window control module, indicating that the type of the startup layer is a hot start layer, and start drawing the corresponding startup layer; if the layer drawing module cannot obtain the corresponding startup data packet based on the package name of the target application, the layer drawing module can pass parameter 0 to the startup window control module, indicating that the startup data packet corresponding to the target application does not exist in the resource library corresponding to the electronic device 100.
[0159] Furthermore, when the startup type of the target application is a cold start, in order to avoid the situation where the startup layer has not been drawn after the user's finger leaves the screen (which can be understood as the user has completed the startup operation for the target application, or the user's finger has left the icon corresponding to the target application), thereby causing the electronic device 100 to be unable to provide the user with the first startup animation in time, the layer drawing module can first draw a startup background layer (the startup background layer mainly includes background color information, and the drawing difficulty is lower than that of the startup layer), and then draw a startup icon layer, and finally synthesize the startup layer based on the startup background layer and the startup icon layer. For example, see Figure 7 , Figure 7 This is a schematic diagram of another startup layer composition provided in an embodiment of the present application. Figure 7As shown, when the startup type of the target application is a cold start, the layer drawing module can first draw a startup background layer (the startup background layer mainly includes background color information, and the drawing difficulty is lower than that of the startup layer), and then draw a startup icon layer. Finally, the startup layer is synthesized based on the startup background layer and the startup icon layer, which helps to ensure that the electronic device provides a better interactive experience for users.
[0160] Furthermore, after drawing the startup layer, the layer drawing module can feed back the startup layer to the startup window control module, and then pass the startup window to the startup animation control module via the startup window control module. It should be noted that the interaction process between the startup animation control module, the startup window control module and the layer drawing module is all located in the system service SystemServer process.
[0161] It should be noted that the resource management of the target application (or other application programs) by the electronic device 100 may include three management types: adding, deleting and using.
[0162] Specifically, for the resource management type of "addition": when the target application (or other application) is installed on the electronic device 100, or when the target application (or other application) is run in the electronic device 100 for the first time after the update, the electronic device 100 can take a screenshot of the startup layer of the target application (or other application) and save it persistently. Furthermore, based on the compatibility of the size of its own screen and the target application (or other application), the electronic device 100 can simultaneously save the package name information of the target application (or other application), the size information of the screenshot corresponding to the startup layer, the display direction information, and the display color mode information (such as dark mode or light mode), etc. while saving the screenshot corresponding to the startup layer of the target application (or other application).
[0163] Furthermore, for the resource management type of "deletion": if the target application (or other application) has an installation package update or uninstallation, or if the electronic device supplier pushes major version update information to the electronic device 100 based on the cloud server, the electronic device 100 can choose to delete the above-mentioned persistently saved startup layer screenshot and other related information of the startup layer.
[0164] Further, for the resource management type of "use": the electronic device 100 can match the layer information based on the state information of the target application when it is called (or, it can be understood as the startup state of the target application, such as cold start or hot start) and the layer request size corresponding to the user's startup operation, wherein the matching can be understood as the electronic device 100 obtaining the startup layer data that meets the above-mentioned state information and layer request size requirements from the resource stack. Among them, only when the matching startup layer data is obtained from the resource stack, the electronic device 100 can start drawing the startup layer, otherwise the subsequent steps of this application cannot be executed. From the user's usage perception, the electronic device 100 does not respond to the user's startup operation.
[0165] S204: In response to the finger leaving the screen, the electronic device 100 synthesizes and plays a first startup animation based on the desktop application layer and the startup layer.
[0166] It should be noted that the first startup animation includes two parts, namely, an exit animation and an entry animation. Specifically, the electronic device 100 needs to perform an exit animation for the desktop application layer and an entry animation for the startup layer. For example, see Figure 8 , Figure 8 A schematic diagram of a playback scene of a first startup animation provided in an embodiment of the present application. Figure 8 As shown, when the startup type of the target application is a cold start, in response to the user's finger leaving the screen, the electronic device 100 can draw a first startup animation based on the first startup layer 410. Specifically, the electronic device 100 needs to perform an exit animation for the desktop application layer, for example, gradually shrinking the desktop application layer. Further, the electronic device 100 needs to perform an entry animation for the first startup layer 410, for example, gradually enlarging the first startup layer 410. Among them, the user's finger leaving the screen can be understood as the user completing the action of clicking the target application icon, or the user completing the startup operation for the target application.
[0167] For example, see Fig. 9 , Fig. 9 This is another schematic diagram of a playback scene of a first startup animation provided in an embodiment of the present application. Fig. 9 As shown, when the startup type of the target application is hot startup, in response to the user's finger leaving the screen, the electronic device 100 can draw the first startup animation based on the second startup layer 420. Specifically, the electronic device 100 needs to perform an exit animation on the desktop application layer, for example, gradually shrinking the desktop application layer. Further, the electronic device 100 needs to perform an entry animation on the second startup layer 420, for example, gradually enlarging the second startup layer 420.
[0168] In a possible implementation, the method of the embodiment of the present application may further include:
[0169] In response to the finger leaving the screen, the electronic device 100 draws a startup window corresponding to the target application;
[0170] The electronic device 100 synthesizes and plays the second startup animation based on the desktop application layer and the startup window.
[0171] It is understandable that, since the electronic device 100 does not generate an application interface layer corresponding to the target application, after the above-mentioned first startup animation is played, the electronic device cannot present the operation interface corresponding to the target application to the user. In order to ensure that the user can use the target application normally, in response to the user's finger leaving the screen (which can be understood as the user has completed the startup operation for the target application), the electronic device 100 can start drawing the startup window corresponding to the target application, wherein the startup window may include a startup layer and an application interface layer. Furthermore, the electronic device 100 can synthesize and play the corresponding second startup animation based on the desktop application layer and the startup window. It should be noted that the electronic device 100 may currently be playing the above-mentioned first startup animation, so the embodiment of the present application will fuse the first startup animation and the second startup animation, or perform transition processing, so as to ensure that a smooth and correct transition effect can be presented to the user.
[0172] Specifically, in a possible implementation, the electronic device 100 synthesizes and plays the second startup animation based on the desktop application layer and the startup window, which may include:
[0173] In response to the completion of drawing the startup window, the electronic device 100 stops playing the first startup animation and records the playing progress corresponding to the first startup animation;
[0174] The electronic device 100 synthesizes and plays the second startup animation based on the playback progress of the first startup animation, the desktop application layer, and the startup window.
[0175] For example, see Fig.10 , Fig.10 A schematic diagram of a scene for starting animation fusion provided in an embodiment of the present application. Fig.10As shown, in response to the completion of drawing the startup window, the electronic device 100 can control the stop of playing the first startup animation and record the playing progress of the first startup animation. Among them, the playing progress may include the display parameters corresponding to the startup layer when the first startup animation stops playing, such as the size, transparency, color information and coordinate information of the startup layer. Further, the electronic device 100 can also determine the display parameters corresponding to the startup window based on the playing progress of the first startup animation (which can be understood as the display parameters corresponding to the startup layer when the first startup animation stops playing), so that the fusion or transition of the first startup animation and the second startup animation can be completed under the premise of maintaining the consistency of the picture and the user is not aware of it. Further, the electronic device 100 can synthesize and play the second startup animation based on the display parameters corresponding to the startup window, the desktop application layer and the startup window.
[0176] Further, in another possible implementation, the electronic device 100 synthesizes and plays the second startup animation based on the desktop application layer and the startup window, which may include:
[0177] In response to the completion of drawing the startup window, the electronic device 100 records the playback progress corresponding to the first startup animation;
[0178] The electronic device 100 synthesizes and plays the second startup animation based on the playback progress of the first startup animation, the desktop application layer, and the startup window.
[0179] For example, see Fig.11 , Fig.11 This is another schematic diagram of a scene for starting animation fusion provided in an embodiment of the present application. Fig.11 As shown, in response to the completion of drawing the startup window, the electronic device 100 can determine the display parameters corresponding to the startup window based on the playback progress of the first startup animation. Further, the electronic device 100 can synthesize the second startup animation based on the display parameters corresponding to the startup window, the desktop application layer, and the startup window. Furthermore, since the startup layer in the first startup animation has the same display parameters as the startup window in the second startup animation, the electronic device 100 can play the first startup animation and the second startup animation at the same time, achieving the fusion or transition of the first startup animation and the second startup animation without the user's perception.
[0180] In another possible implementation, before the electronic device 100 receives a user's start-up operation for the target application, the method may further include:
[0181] The electronic device 100 stores the layer hierarchy relationship corresponding to the desktop window in a first tree structure, wherein the root node of the first tree structure is a display area node, the child nodes of the display area node may include a desktop node, the child nodes of the desktop node may include a desktop launcher node, and the child nodes of the desktop launcher node may include a first node corresponding to the desktop application layer.
[0182] For example, see Fig.12 , Fig.12 This is a schematic diagram of a first tree structure provided in an embodiment of the present application. Fig.12 As shown, the root node of the first structure is the area display node DefaultTaskDIsplayArea node, the child nodes of the area display node may include the desktop node Home Root Task node, the child nodes of the desktop node may include the desktop launcher node Launcher Task node, and the child nodes of the desktop launcher node may include the first node UniHomeLauncher node corresponding to the above-mentioned desktop application layer.
[0183] In another possible implementation, the method of the embodiment of the present application may further include:
[0184] In response to the finger touching the screen, the electronic device 100 creates an approach preparation node and a first transition node in the first tree structure to generate a second tree structure;
[0185] In response to the finger leaving the screen, the electronic device 100 creates a first exit node and a first entry node in the second tree structure to generate a third tree structure;
[0186] In response to the completion of drawing the startup window, the electronic device 100 creates a second transition node in the third tree structure to generate a fourth tree structure or a fifth tree structure.
[0187] In response to different operations of the user, or in response to the completion status of different processes of the electronic device 100, the electronic device 100 can ensure that the startup animation can be played correctly and completely by adjusting the relationship between each node in the first tree structure.
[0188] Specifically, in the second tree structure, the child nodes of the desktop node may include an entry preparation node and a first transition node, and the child nodes of the entry preparation node may include a second node corresponding to the startup layer.
[0189] For example, see Fig.13 , Fig.13 A schematic diagram of a second tree structure provided in an embodiment of the present application. Fig.13As shown, in response to the user's finger touching the screen (which can be understood as the user touching the screen area corresponding to the target application icon), the electronic device 100 needs to draw the startup layer of the target application, so as to prepare for the subsequent synthesis and playback of the first startup animation. Therefore, the first electronic device 100 needs to create a node for mounting the startup layer on the basis of the first tree structure, and create a node for subsequently mounting the first startup animation related layer, so as to obtain a second tree structure. Among them, the root node of the second tree structure is the area display node DefaultTaskDIsplayArea node, the child node of the area display node may include the desktop node Home Root Task node, the child node of the desktop node may include the desktop launcher node Launcher Task node, the entry preparation node Opening leash node and the first transition node Transitionroot node. Among them, the child node of the desktop launcher node may include the first node UniHomeLauncher node corresponding to the above-mentioned desktop application layer, and the child node of the entry preparation node may include the second node Starting surface node corresponding to the startup layer.
[0190] Further, in the third tree structure, the child nodes of the desktop node may include a first transition node, the child nodes of the first transition node may include a first exit node and a first entry node; the child nodes of the first exit node may include a desktop launcher node; the child nodes of the first entry node may include an entry preparation node.
[0191] For example, see Fig.14 , Fig.14 This is a schematic diagram of a third tree structure provided in an embodiment of the present application. Fig.14As shown, in response to the user's finger leaving the screen (which can be understood as the user completing the startup operation for the target application, or the user completing the action of clicking the target application icon), the electronic device 100 needs to synthesize and play the first startup animation based on the desktop application layer and the startup layer. In order to ensure that the first startup animation can be played smoothly and correctly, the electronic device 100 needs to adjust the mounting relationship of the relevant nodes in the second tree structure to obtain the third tree structure. Among them, the root node of the third tree structure is the area display node DefaultTaskDIsplayArea node, the child node of the area display node may include the desktop node Home Root Task node, and the child node of the desktop node may include the first transition node Transitionroot node. Further, the electronic device 100 creates two child nodes under the first transition node, and the two child nodes are the first exit node Closing root leash node and the first entry node Opening root leash node. Further, the child node of the first exit node may include the desktop launcher node Launcher Task node, and the child node of the desktop launcher node may include the above-mentioned first node UniHomeLauncher node. Further, the child nodes of the first approach node may include an approach preparation node Opening leash node, and the child nodes of the approach preparation node may include a second node Starting surface node corresponding to the startup layer. It can be seen that by adopting the layer mounting relationship corresponding to the third tree structure, the electronic device 100 can correctly play the first startup animation.
[0192] Further, in the fourth tree structure, the child nodes of the display area node may include a second transition node, and the child nodes of the second transition node may include a second exit node and a second entry node; the child nodes of the second exit node may include a desktop node, and the child nodes of the desktop node may include a desktop launcher node; the child nodes of the second entry node may include a first entry node and an application node; and the child nodes of the application node may include a third node corresponding to the startup window.
[0193] For example, see Fig.15 , Fig.15 This is a schematic diagram of a fourth tree structure provided in an embodiment of the present application. Fig.15As shown, in response to the completion of drawing the startup window corresponding to the target application, the electronic device 100 needs to synthesize and play the second startup animation based on the playback progress of the first startup animation, the desktop application layer and the startup window. It should be noted that in order to ensure that the startup animation can be correctly presented to the user, the electronic device 100 needs to merge or transition the first startup animation and the second startup animation. In a possible implementation, the electronic device 100 can choose to stop playing the first startup animation, and play the second startup animation based on the playback progress of the first startup animation, so as to achieve the fusion or transition of the first startup animation and the second startup animation without the user's perception.
[0194] Therefore, the electronic device 100 needs to adjust the mounting relationship of each node in the third tree structure (such as deleting the first transition node and the first exit node), and create a node for mounting the second startup animation related layer (such as Fig.15 The second transition node, the second exit node, and the second entry node in the game also need to create a node for mounting the startup window (such as Fig.15 In particular, the root node of the fourth tree structure is the area display node DefaultTaskDIsplayArea node, the child nodes of the area display node may include the second transition node Pre Transition root node, and the child nodes of the second transition node include the second exit node Pre Closing root leash node and the second entry node Pre Opening root leash node.
[0195] Among them, the child node of the second exit node is the desktop node Home Root Task node, the child node of the desktop node may include the desktop launcher node Launcher Task node, and the child node of the desktop launcher node may include the above-mentioned first node UniHomeLauncher node. Further, the child node of the second entry node includes the above-mentioned first entry node Opening root leash node and the application node App Task node. Among them, the child node of the first entry node Opening rootleash node may include the entry preparation node Opening leash node, and the child node of the entry preparation node may include the above-mentioned second node Starting surface node; the child node of the application node may include the third node Pre Starting Surface node corresponding to the startup window. It should be noted that the display level of the layer corresponding to the first entry node is lower than the display level of the layer corresponding to the application node. It can be seen that by adopting the layer mounting relationship corresponding to the fourth tree structure, the electronic device 100 can correctly play the second startup animation.
[0196] Further, in the fifth tree structure, the child nodes of the display area node may include a second transition node, the child nodes of the second transition node may include a second exit node; the child nodes of the second exit node may include a desktop node; the child nodes of the first exit node may include a desktop launcher node; the child nodes of the first entry node may include an application node; the child nodes of the application node may include a third node corresponding to the startup window.
[0197] For example, see Fig.16 , Fig.16 This is a schematic diagram of a fifth tree structure provided in an embodiment of the present application. Fig.16 As shown, in response to the completion of drawing the startup window corresponding to the target application, the electronic device 100 needs to synthesize and play the second startup animation based on the playback progress of the first startup animation, the desktop application layer and the startup window. It should be noted that in order to ensure that the startup animation can be correctly presented to the user, the electronic device 100 needs to merge or transition the first startup animation and the second startup animation. In another possible implementation, the electronic device 100 can choose to play the first startup animation and the second startup animation at the same time based on the playback progress of the first startup animation, so as to achieve the fusion or transition of the first startup animation and the second startup animation without the user's perception.
[0198] Therefore, the electronic device 100 needs to create a node for mounting the second startup animation related layer in the third tree structure (such as Fig.16The second transition node, the second exit node, and the second entry node in the game also need to create a node for mounting the startup window (such as Fig.16 In particular, the root node of the fifth tree structure is the area display node DefaultTaskDIsplayArea node, the child nodes of the area display node may include the second transition node Pre Transition root node, and the child nodes of the second transition node include the second exit node Pre Closing root leash node.
[0199] Among them, the child node of the second exit node is the desktop node Home Root Task node, the child node of the desktop node may include the first transition node Transition root node, and the child node of the first transition node includes the first exit node Closing root leash node and the first entry node Opening root leash node. Further, the child node of the first exit node may include the desktop launcher node Launcher Task node, and the child node of the desktop launcher node may include the above-mentioned first node UniHomeLauncher node. Further, the child node of the first entry node may include the entry preparation node Opening leash node and the application node App Task node. Among them, the child node of the entry preparation node may include the above-mentioned second node Starting surface node; the child node of the application node may include the above-mentioned third node Pre Starting Surface node. It can be seen that by adopting the layer mounting relationship corresponding to the fifth tree structure, the electronic device 100 can also correctly play the second startup animation.
[0200] It should be noted that after the second startup animation is played, the second transition node, the second exit node, the second entry node, the entry preparation node and the second node need to be destroyed, and only the area display node, the desktop launcher node, the first node, the application node and the third node mentioned above are retained. Among them, the mounting relationship between the retained nodes is: the root node is the area display node DefaultTaskDIsplayArea node, and the child nodes of the area display node include the desktop node Home Root Task node and the application node App Task node. Furthermore, the child nodes of the desktop node include the desktop launcher node Launcher Task node, and the child nodes of the desktop launcher node may include the first node UniHomeLauncher node mentioned above. Furthermore, the child nodes of the application node may include the third node Pre StartingSurface node mentioned above.
[0201] It should be noted that in Figures 12 to 16 In the display priority table, different nodes may correspond to different display priorities. Specifically, the display priority of the entry preparation node, the second node corresponding to the startup layer, and the third node corresponding to the startup window may be the first display priority; the display priority of the first transition node, the first exit node, the first entry node, the second transition node, the second exit node, the second entry node, and the first node corresponding to the desktop application layer may be the second display priority; the display priority of the desktop node, the desktop launcher node, and the application node may be the third display priority. Among them, the third display priority is higher than the second display priority, and the second display priority is higher than the first display priority.
[0202] Furthermore, the desktop node can be a root task node Root Task node, the desktop launcher node and the application node can be task nodes Task nodes; the first transition node, the first exit node, the first entry node, the second transition node, the second exit node and the second entry node can be belt nodes Leash nodes, and the desktop application layer node can be an activity image node ActivityRecord node; the entry preparation node can be a container layer node Container Layer node, and the second node corresponding to the startup layer and the third node corresponding to the startup window can be buffer layer nodes BufferLayer nodes.
[0203] Combined with the above Figures 3 to 14 And its related embodiment content, this application will further combine Fig.17 and Fig.18 Explain the specific content of the method of the embodiment of this application. Please refer to Fig.17 , Fig.17 A schematic diagram of a process for synthesizing and playing a first startup animation provided in an embodiment of the present application.
[0204] like Fig.17 As shown, there are a system user interface (System UI), a desktop launcher Launcher, a layer delivery device Surfaceflinger, an input port Input, an activity management service component (Activity Manager Service AMS), a system service manager SystemServer and a display driver in the electronic device 100. Among them, Surfaceflinger, Input, AMS and SystemServer are all components or ports of the Framework layer.
[0205] Among them, the input port Input can receive the user touching the screen (or it can be understood as the user touching the corresponding area of the target application icon on the screen), and send a touch event down event to the Launcher. Further, in response to the down event, the Launcher can use the startup type acquisition function getPreStartingSurfaceType() to obtain the startup type corresponding to the target application from the SystemServer (such as cold start, hot start), wherein the Launcher will use getPreStartingSurfaceType() to pass the package name Package Name of the target application to the SystemServer. Further, in response to the Launcher's acquisition instruction (which can be understood as the Launcher using the startup type acquisition function to obtain the startup type corresponding to the target application), the SystemServer can obtain the startup data packet corresponding to the target application from the resource library specific to the electronic device 100 based on the package name of the target application, and determine the startup type of the target application based on the startup data packet. For example, if the startup type of the target application is cold start, SystemServer can feedback parameter 1 to Launcher; if the startup type of the target application is hot start, SystemServer can feedback parameter 2 to Launcher; if SystemServer does not find the startup data packet corresponding to the target application in the resource library, it can feedback parameter 0 to Launcher.
[0206] Furthermore, when the parameter fed back by SystemServer to Launcher is not 0, SystemServer can send the first startup animation preparation instruction OnTransactionReady to SystemUI and start drawing the startup layer. At the same time, SystemServer also needs to adjust the above first tree structure to the second tree structure, such as creating the first transition node and the entry preparation node under the desktop node, and creating the second node corresponding to the startup layer under the entry preparation node.
[0207] Furthermore, in response to the first startup animation preparation instruction, SystemUI can issue the first synthesis animation instruction startAnimation instruction to Launcher. Furthermore, in response to the first synthesis animation instruction, Launcher can prepare for synthesizing the first startup animation. Specifically, Launcher can also adjust the second tree structure to the third tree structure, such as creating the first entry node and the first exit node under the first transition node. For specific adjustments, see Fig.14 , I will not go into details here.
[0208] Furthermore, in response to the user's finger leaving the screen (which can be understood as the user completing the startup operation for the target application, or the user has completed the action of clicking the target application icon), Input can send a hand-off event up event to Launcher. Further, in response to the up event, Launcher can send a new activity instruction startActivity instruction to AMS. At the same time, Launcher can create a first animation object Animation object based on the layer display parameters required for each frame of the first startup animation, and send the first animation object to Surfaceflinger through the sinking animation function applySinkActivity(). Further, after receiving the first animation object passed by applySinkActivity(), Surfaceflinger can synthesize the first startup animation based on the first animation object, the desktop application layer and the startup layer, and use the display function presentAndGetFrameFences() to transmit the first startup animation to the display driver, thereby completing the synthesis and playback process of the first startup animation.
[0209] For further information, see Fig.18 , Fig.18 A schematic diagram of a process of synthesizing and playing a second startup animation provided in an embodiment of the present application. Fig.18 As shown, in response to the user's finger leaving the screen (which can be understood as the user completing the startup operation for the target application, or the user has completed the action of clicking the target application icon), SystemServer can start drawing the startup window of the target application. Further, in response to the completion of the startup window drawing, SystemServer can send the second startup animation preparation instruction OnTransactionReady to SystemUI, which is helpful for the subsequent notification of Launcher to merge or transition the first startup animation with the second startup animation. Specifically, in response to the second startup animation preparation instruction, SystemUI sends the fusion instruction mergeAnimation to Launcher.
[0210] Further, in response to the fusion instruction, Launcher needs to stop playing the first startup animation. Specifically, Launcher can generate a cancel animation instruction onAnimationCancelled and send the cancel animation instruction to SystemUI. Further, SystemUI can send a stop animation instruction onAnimationFinished to SystemServer based on the cancel animation instruction to stop playing the first startup animation.
[0211] Further, in response to the instruction to stop playing the animation, SystemServer can adjust the third tree structure to obtain the node mounting relationship of the fourth tree structure, such as releasing the first transition node and the first exit node in the second tree structure. The specific process of generating the fourth tree structure can be referred to Fig.15 The contents of the related embodiments will not be elaborated here.
[0212] Furthermore, in response to the fusion instruction, the Launcher also needs to adjust the third tree structure to obtain the node mounting relationship of the fourth tree structure to ensure that the second startup animation can be correctly synthesized and played without being perceived by the user. Specifically, the Launcher can create a second exit node and a second entry node on the third tree structure, remount the desktop launcher node to the desktop node, and mount the first entry node to the second entry node. The specific process of generating the fourth tree structure can be referred to. Fig.15 The contents of the related embodiments will not be elaborated here.
[0213] Furthermore, at the same time, Launcher can create a second animation object Animation object based on the layer display parameters required for each frame of the second startup animation, and send the second animation object to Surfaceflinger through the sinking animation function applySinkActivity(). Further, after receiving the second animation object passed by applySinkActivity(), Surfaceflinger can synthesize the second startup animation based on the second animation object, the desktop application layer and the startup window, and use the display function presentAndGetFrameFences() to transmit the second startup animation to the display driver, thus completing the synthesis and playback process of the second startup animation.
[0214] It can be seen that by implementing the method of the embodiment of the present application, the electronic device can start drawing the startup layer corresponding to the target application immediately after the user touches the screen (or touches the icon corresponding to the target application), which helps to quickly synthesize and play the startup animation after the user's finger leaves the screen (which can be understood as after the user completes the action of clicking the icon of the target application), thereby presenting the user with a faster and smoother target application startup effect, thereby improving the user's experience.
[0215] See also Fig.19 , Fig.19 The following is a schematic diagram of the composition of an electronic device provided in an embodiment of the present application. Fig.19 As shown, the electronic device 100 may include: a screen 910 and a processor 101;
[0216] Screen 910 may be used to display a desktop window, which may include a desktop application layer and a desktop background layer;
[0217] The screen 910 may also be used to receive a user's start-up operation for a target application, and the start-up operation may include the user's finger touching the screen 910 and the finger leaving the screen 910;
[0218] The processor 101 may be configured to obtain a startup data packet of a target application based on a package name of the target application in response to a finger touching the screen 910;
[0219] The processor 101 may also be used to draw a startup layer corresponding to the target application based on the startup data packet;
[0220] The processor 101 may also be configured to synthesize and play a first startup animation based on the desktop application layer and the startup layer in response to the finger leaving the screen 910 .
[0221] In another possible implementation, the electronic device may further include:
[0222] The processor 101 may also be configured to draw a startup window corresponding to the target application in response to the finger leaving the screen 910 , where the startup window may include a startup layer and an application interface layer;
[0223] The processor 101 may also be used to synthesize and control the playing of a second startup animation based on the desktop application layer and the startup window;
[0224] Screen 910 may also be used to present a second startup animation.
[0225] In another possible implementation, the electronic device may further include:
[0226] The processor 101 may also be configured to stop playing the first startup animation in response to the completion of drawing the startup window, and record the playing progress corresponding to the first startup animation;
[0227] The processor 101 may also be configured to synthesize and play a second startup animation based on the playback progress of the first startup animation, the desktop application layer, and the startup window.
[0228] In another possible implementation, the electronic device may further include:
[0229] The processor 101 may also be configured to record the playback progress corresponding to the first startup animation in response to the completion of drawing the startup window;
[0230] The processor 101 may also be configured to synthesize and play a second startup animation based on the playback progress of the first startup animation, the desktop application layer, and the startup window.
[0231] In another possible implementation, the electronic device may further include:
[0232] Processor 101 can also be used to store the layer hierarchy relationship corresponding to the desktop window in a first tree structure, the root node of the first tree structure is the display area node, the child nodes of the display area node may include a desktop node, the child nodes of the desktop node may include a desktop launcher node, and the child nodes of the desktop launcher node may include a first node corresponding to the desktop application layer.
[0233] In another possible implementation, the electronic device may further include:
[0234] The processor 101 may also be configured to, in response to a finger touching the screen 910, create an approach preparation node and a first transition node in the first tree structure to generate a second tree structure;
[0235] The processor 101 may also be configured to, in response to the finger leaving the screen 910, create a first exit node and a first entry node in the second tree structure to generate a third tree structure;
[0236] The processor 101 may also be configured to create a second transition node in the third tree structure in response to completion of drawing the startup window, and generate a fourth tree structure or a fifth tree structure.
[0237] In another possible implementation, in the second tree structure, the child nodes of the desktop node may include an approach preparation node and a first transition node, and the child nodes of the approach preparation node may include a second node corresponding to the startup layer.
[0238] In another possible implementation, in the third tree structure, the child nodes of the desktop node may include a first transition node, and the child nodes of the first transition node may include a first exit node and a first entry node;
[0239] The child nodes of the first exit node may include a desktop launcher node;
[0240] The child nodes of the first approach node may include an approach preparation node.
[0241] In another possible implementation, in the fourth tree structure, the child nodes of the display area node may include a second transition node, and the child nodes of the second transition node may include a second exit node and a second entry node;
[0242] The child nodes of the second exit node may include a desktop node, and the child nodes of the desktop node may include a desktop launcher node;
[0243] The sub-nodes of the second approach node may include the first approach node and an application node;
[0244] The child nodes of the application node may include a third node corresponding to the startup window.
[0245] In another possible implementation, in the fifth tree structure, the child node of the display area node may include a second transition node, and the child node of the second transition node may include a second exit node;
[0246] The child nodes of the second exit node may include a desktop node;
[0247] The child nodes of the first exit node may include a desktop launcher node;
[0248] The child nodes of the first approach node may include an application node;
[0249] The child nodes of the application node may include a third node corresponding to the startup window.
[0250] In another possible implementation, the electronic device 100 may further include:
[0251] The processor 101 may also be configured to synthesize and control the playing of the first startup animation based on the third tree structure.
[0252] In another possible implementation, the electronic device 100 may further include:
[0253] The processor 101 may also be configured to synthesize and control the playing of the second startup animation based on the fourth tree structure, or synthesize and control the playing of the second startup animation based on the fifth tree structure.
[0254] For further information, see Fig. 20 , Fig. 20 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application.
[0255] The electronic device 100 may include a processor 101, a memory 102, a wireless communication module 103, a mobile communication module 104, an antenna 103A, an antenna 104A, a power switch 105, a sensor module 106, a display screen 109, etc. Among them, the sensor module 106 may include a gyroscope sensor 106A, an acceleration sensor 106B, an ambient light sensor 106C, an image sensor 106D, a distance sensor 106E, etc. Among them, the wireless communication module 103 may include a WLAN communication module, a Bluetooth communication module, etc. The above multiple parts can transmit data through a bus.
[0256] The processor 101 may include one or more processing units, for example, the processor 101 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0257] The memory 102 may be used to store computer executable program codes, and the executable program codes may include instructions. The processor 101 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the memory 102. The memory 102 may include a program storage area and a data storage area. In a specific implementation, the memory 102 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more disk storage devices, flash memory devices, or other non-volatile solid-state storage devices.
[0258] The wireless communication function of the electronic device 100 can be implemented through the antenna 103A, the antenna 104A, the mobile communication module 104, the wireless communication module 103, the modem processor and the baseband processor.
[0259] Antenna 103A and antenna 104A can be used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas.
[0260] The mobile communication module 104 can provide wireless communication solutions including 2G / 3G / 4G / 5G etc. applied on the electronic device 100 .
[0261] The wireless communication module 103 can provide wireless communication solutions including wireless local area networks (WLAN), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. for application in the electronic device 100.
[0262] The gyro sensor 106A may be used to determine the motion posture of the electronic device 100 .
[0263] The acceleration sensor 106B can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes).
[0264] The electronic device 100 can realize the shooting function through the ISP, the camera 108, the video codec, the GPU, the display screen 109 and the application processor.
[0265] The electronic device 100 can realize the display function through a GPU, a display screen 109, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 109 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 101 may include one or more GPUs, which execute program instructions to generate or change display information.
[0266] The display screen 109 is used to display images, videos, etc. The display screen 109 includes a display panel. In some embodiments, the electronic device 100 may include 1 or N display screens 109, where N is a positive integer greater than 1.
[0267] The structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0268] In the embodiments of the present application:
[0269] Any one or more of the wireless communication module 103 , the mobile communication module 104 , the sensor module 106 , the focus motor 107 , the camera 108 , etc. may be used to detect the current environmental characteristics of the electronic device 100 .
[0270] The display screen 109 is used to display the user interface provided by the electronic device 100, such as a shooting interface or an album interface. The user interface displayed by the display screen 109 can refer to the UI embodiment described above.
[0271] For details of the operations performed by the various components in the electronic device 100, please refer to the relevant description of the above method embodiments.
[0272] The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. The present application embodiment takes a mobile operating system with a layered architecture as an example to exemplify the software structure of the electronic device 100.
[0273] For further information, see Fig.21 , Fig.21 This is a software structure diagram provided by the embodiment of the present application. Fig.21 The layered architecture shown divides the software into several layers. Each layer has a clear role and division of labor, and the layers can communicate through software interfaces.
[0274] In some embodiments, the system of the electronic device 100 can be divided into five layers, from top to bottom, namely, the application layer, the application framework layer, the system runtime layer, the hardware abstraction layer (HAL) and the kernel layer. The description of each of the above layers is as follows:
[0275] The application layer may include a series of application packages. For example, the application packages of the application layer may include applications such as camera, gallery, calendar, call, map, navigation, browser, video, music, and short message.
[0276] The application framework layer can provide an application programming interface (API) and a programming framework for applications in the application layer. The application framework layer can include some predefined functions.
[0277] Exemplarily, the application framework layer may include an activity manager, a window manager, a content provider, a view system, a telephony manager, a resource manager, a notification manager, and an accelerated graphics port (AGP), etc. Among them:
[0278] The activity manager can be used to manage the individual application lifecycles as well as general navigation back functionality.
[0279] The window manager can be used to manage window programs. For example, the window manager can obtain the display screen size of the electronic device 100, lock the screen, capture the screen, and determine whether there is a status bar.
[0280] Content providers can be used to store and retrieve data and make the data accessible to applications so that different applications can access or share data. For example, the data may include videos, images, audio, calls made and received, browsing history and bookmarks, and phone books.
[0281] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
[0282] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including answering a call, hanging up a call, etc.).
[0283] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, etc.
[0284] The notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager can be used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the display screen in the form of a dialog window. For example, a text message is prompted in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.
[0285] AGP in the application framework layer can be used to improve the rendering performance of the graphics card, such as providing the graphics card with more cache capacity to achieve faster image processing speed.
[0286] The system runtime layer can include system libraries and Android runtime. Among them:
[0287] The Android runtime includes a core library and a virtual machine. The Android runtime is responsible for scheduling and management of the Android system. The core library consists of two parts: one is the function that the Java language needs to call, and the other is the Android core library. The application layer and the application framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0288] The system library can be understood as the support of the application framework, and is an important link between the application framework layer and the kernel layer. The system layer can include multiple functional modules, such as surface managers, media libraries, 3D graphics processing libraries (such as OpenGL ES), 2D graphics engines (such as SGL), etc. Among them:
[0289] The surface manager can be used to manage the display subsystem, for example, when the electronic device 100 executes multiple applications, it is responsible for managing the interaction between display and access operations. The surface manager can also be used to provide fusion of two-dimensional and three-dimensional layers for multiple applications.
[0290] The media library can support playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0291] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing.
[0292] A two-dimensional graphics engine can be understood as a drawing engine for two-dimensional drawing.
[0293] The hardware abstraction layer provides standard interfaces, such as the HAL interface definition language (HIDL) interface or the Android interface definition language (AIDL) interface.
[0294] The kernel layer can be understood as an abstract layer between hardware and software. The kernel layer may include system services such as security, memory management, process management, power management, network protocol management, and driver management. Among them, the kernel layer may include drivers. Exemplarily, the drivers may include display drivers, camera drivers, audio drivers, and sensor drivers. Optionally, the kernel layer may also be called an Android kernel or kernel program. Exemplarily, the hardware layer of the electronic device 100 may include a touch panel (TP), a liquid crystal display (LCD), and the like.
[0295] In some embodiments, the kernel layer can be understood as kernel state, and the other four layers (ie, application layer, application framework layer, system runtime layer, and HAL) can be understood as user state.
[0296] It is understandable that multiple applications that may exist in the application layer have video recording and / or playback functions. For example, if a camera has a video recording function, applications such as gallery, navigation, and browser may have a video playback function. Furthermore, based on the length, resolution, and shooting parameters of the video, the recording and / or playback of the video may be affected. The shooting parameters may include aperture value, shutter speed, sensitivity, exposure, focal length, depth of field, and the like.
[0297] For example, the video recording and / or playback related parameters supported by various applications can be stored in a sensor binary file (sensor bin), and the sensor bin file can be stored in an external memory, such as a disk or a hard disk. When a user uses a specific application to record and / or play a video, the application can read the video recording and / or playback related parameters into the memory so that the user can use the application normally and ensure the user experience.
[0298] It should be understood that each step in the above method embodiment can be completed by an integrated logic circuit of hardware in a processor or by instructions in the form of software. The method steps disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware processor, or by a combination of hardware and software modules in a processor.
[0299] The present application also provides an electronic device, which may include: a memory and a processor. The memory may be used to store a computer program; the processor may be used to call the computer program in the memory so that the electronic device executes the method executed by the electronic device side in any of the above embodiments.
[0300] The present application also provides a chip system, which includes at least one processor for implementing the functions involved in the electronic device side in any of the above embodiments.
[0301] In some possible designs, the chip system also includes a memory, which is used to store program instructions and data, and the memory is located inside or outside the processor.
[0302] The chip system may be composed of the chip, or may include the chip and other discrete devices.
[0303] Optionally, the processor in the chip system may be one or more. The processor may be implemented by hardware or by software. When implemented by hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented by software, the processor may be a general-purpose processor implemented by reading software code stored in a memory.
[0304] Optionally, the memory in the chip system may also be one or more. The memory may be integrated with the processor or may be separately arranged with the processor, which is not limited in the embodiments of the present application. Exemplarily, the memory may be a non-transient processor, such as a read-only memory ROM, which may be integrated with the processor on the same chip or may be arranged on different chips respectively. The embodiments of the present application do not specifically limit the type of memory and the arrangement of the memory and the processor.
[0305] Exemplarily, the chip system may be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD), or other integrated chips.
[0306] The present application also provides a computer program product, which includes: a computer program (also referred to as code, or instruction), which, when executed, enables a computer to execute the method executed by the electronic device side in any of the above embodiments.
[0307] The present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program (also referred to as code or instruction). When the computer program is executed, the computer executes the method executed by the electronic device side in any of the above embodiments.
[0308] As used in the above embodiments, the term "when..." may be interpreted to mean "if..." or "after..." or "in response to determining..." or "in response to detecting...", depending on the context. Similarly, the phrases "upon determining..." or "if (the stated condition or event) is detected" may be interpreted to mean "if determining..." or "in response to determining..." or "upon detecting (the stated condition or event)" or "in response to detecting (the stated condition or event)", depending on the context.
[0309] The various implementation modes of the present application can be combined arbitrarily to achieve different technical effects.
[0310] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state disk (SSD)), etc.
[0311] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.
[0312] In short, the above description is only an embodiment of the technical solution of this application, and is not intended to limit the protection scope of this application. Any modification, equivalent replacement, improvement, etc. made according to the disclosure of this application shall be included in the protection scope of this application.
Claims
1. A method for playing an application startup animation, characterized in that: Applied to an electronic device, the electronic device comprises a screen, the screen displays a desktop window, the desktop window comprises a desktop application layer and a desktop background layer; The method comprises: Receiving a start-up operation of a user for a target application, wherein the start-up operation includes the user's finger touching the screen and the finger leaving the screen; In response to the finger touching the screen, acquiring a startup data packet of the target application based on a package name of the target application; Based on the startup data packet, drawing a startup layer corresponding to the target application; In response to the finger leaving the screen, synthesizing and playing a first startup animation based on the desktop application layer and the startup layer; Before receiving a start operation of the user on the target application, the method further includes: The layer hierarchy relationship corresponding to the desktop window is stored in a first tree structure, wherein the root node of the first tree structure is a display area node, the child nodes of the display area node include a desktop node, the child nodes of the desktop node include a desktop launcher node, and the child nodes of the desktop launcher node include a first node corresponding to the desktop application layer; the method further includes: In response to the finger touching the screen, creating an approach preparation node and a first transition node in the first tree structure to generate a second tree structure; In response to the finger leaving the screen, creating a first exit node and a first entry node in the second tree structure to generate a third tree structure; In response to the completion of drawing the start window corresponding to the target application, creating a second transition node in the third tree structure to generate a fourth tree structure; The method further comprises: The root node of the fourth tree structure is a display area node, the child nodes of the display area node include the second transition node, and the child nodes of the second transition node include a second exit node and a second entry node; The child nodes of the second exit node include a desktop node, and the child nodes of the desktop node include the desktop launcher node; The sub-nodes of the second approach node include the first approach node and an application node; The child nodes of the application node include a third node corresponding to the startup window.
2. The method according to claim 1, characterized in that The method further comprises: In response to the finger leaving the screen, drawing the startup window, wherein the startup window includes the startup layer and the application interface layer; Based on the desktop application layer and the startup window, a second startup animation is synthesized and played.
3. The method according to claim 2, characterized in that The synthesizing and playing the second startup animation based on the desktop application layer and the startup window includes: In response to the completion of drawing the startup window, stop playing the first startup animation, and record the playing progress corresponding to the first startup animation; Based on the play progress of the first startup animation, the desktop application layer and the startup window, the second startup animation is synthesized and played.
4. The method according to claim 2, characterized in that: The synthesizing and playing the second startup animation based on the desktop application layer and the startup window includes: In response to the completion of drawing the startup window, recording the playback progress corresponding to the first startup animation; Based on the play progress of the first startup animation, the desktop application layer and the startup window, the second startup animation is synthesized and played.
5. The method according to claim 4, characterized in that The method further comprises: In response to the completion of drawing the startup window, a second transition node is created in the third tree structure to generate a fifth tree structure.
6. The method according to claim 5, characterized in that In the second tree structure, the child nodes of the desktop node include the entry preparation node and the first transition node, and the child nodes of the entry preparation node include the second node corresponding to the startup layer.
7. The method according to claim 6, characterized in that In the third tree structure, the child nodes of the desktop node include the first transition node, and the child nodes of the first transition node include the first exit node and the first entry node; The child nodes of the first exit node include the desktop launcher node; The child nodes of the first approach node include the approach preparation node.
8. The method according to claim 7, characterized in that The synthesizing and playing the first startup animation includes: The first startup animation is synthesized and played based on the third tree structure.
9. The method according to claim 8, characterized in that The synthesizing and playing the second startup animation includes: The second startup animation is synthesized and played based on the fourth tree structure.
10. The method according to claim 9, characterized in that In the fifth tree structure, the child nodes of the display area node include the second transition node, and the child nodes of the second transition node include the second exit node; The child nodes of the second exit node include the desktop node; The child nodes of the first exit node include the desktop launcher node; The child nodes of the first approach node include application nodes; The child nodes of the application node include a third node corresponding to the startup window.
11. The method according to claim 10, characterized in that The synthesizing and playing the second startup animation includes: The second startup animation is synthesized and played based on the fifth tree structure.
12. An electronic device, characterized in that: The electronic device comprises a screen and a processor; The screen is used to display a desktop window, wherein the desktop window includes a desktop application layer and a desktop background layer; The screen is also used to receive a user's start-up operation for a target application, wherein the start-up operation includes the user's finger touching the screen and the finger leaving the screen; The processor is configured to obtain a startup data packet of the target application based on a package name of the target application in response to the user touching a target area in response to the finger touching the screen, wherein the target area is an operation area corresponding to starting the target application; The processor is further configured to draw a startup layer corresponding to the target application based on the startup data packet; The processor is further configured to, in response to the user's finger leaving the screen, synthesize and play a first startup animation based on the desktop application layer and the startup layer in response to the finger leaving the screen when it is determined that the user's operation gesture on the screen is clicking the target area; The processor is further configured to store the layer hierarchy relationship corresponding to the desktop window in a first tree structure, wherein the root node of the first tree structure is a display area node, the child nodes of the display area node include a desktop node, the child nodes of the desktop node include a desktop launcher node, and the child nodes of the desktop launcher node include a first node corresponding to the desktop application layer; The processor is further configured to create an approach preparation node and a first transition node in the first tree structure in response to the finger touching the screen, so as to generate a second tree structure; The processor is further configured to create a first exit node and a first entry node in the second tree structure in response to the finger leaving the screen, so as to generate a third tree structure; The processor is further configured to, in response to completion of drawing the startup window, create a second transition node in the third tree structure to generate a fourth tree structure; The root node of the fourth tree structure is a display area node, the child nodes of the display area node include the second transition node, and the child nodes of the second transition node include a second exit node and a second entry node; The child nodes of the second exit node include a desktop node, and the child nodes of the desktop node include a desktop launcher node; The sub-nodes of the second approach node include the first approach node and an application node; The child nodes of the application node include a third node corresponding to the startup window.
13. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory is used to store a computer program, the computer program comprises program instructions, and the processor is configured to call the program instructions so that the method according to any one of claims 1 to 11 is executed.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions. When the program instructions are executed by a processor, the method according to any one of claims 1 to 11 is executed.
Citation Information
Patent Citations
Application starting method and device, electronic equipment and storage medium
CN110162343A
Application program starting method and device, electronic equipment and storage medium
CN117112045A
Window management method and electronic equipment
CN118363691A