Application starting method and electronic equipment
By matching the display mode of the application in electronic devices, the problem of large contrast between the color of the startup window and the application interface during temperature startup is solved, and the user experience and display effect are improved.
Patent Information
- Application Number
- CN202411628311.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-11-14
AI Technical Summary
When existing electronic devices start applications in temperature, the color contrast between the startup window and the application interface is large, resulting in poor user experience and strong flickering, which affects the user experience.
By introducing an application startup method in the electronic device, using the operation input by the user to trigger temperature startup, matching the color mode of the display startup window and the interface according to the display pattern of the first application, ensuring the color consistency between the startup window and the application interface. This reduces color contrast and improves the display effect.
It effectively avoids the color contrast between the startup window and the application interface, improves the display effect and user experience of temperature startup, and ensures the consistency of the display style.
Smart Images

Figure CN119127342A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal technology, and in particular to an application startup method and an electronic device. Background Art
[0002] Most electronic devices have different types of applications (APPs) installed. Applications (referred to as applications) are usually started in cold and hot ways, but some applications (such as social applications) are also started in warm ways. For example, when an application needs to be started, if the electronic device has a process of the application but no activity of the application, the electronic device performs a warm start.
[0003] When warm starting an application, the electronic device may first display a gradually larger startup window. After the warm start is completed, indicating that the activity of the application has been created, that is, the interface of the application has been drawn, the electronic device may stop displaying the startup window and start displaying the interface of the application. However, the display effect of warm start may not be good, resulting in a poor user experience. Summary of the invention
[0004] The embodiments of the present application provide an application startup method and an electronic device, which are used to avoid the flickering caused by the large color contrast between the startup window displayed by the warm startup and the interface of the application, and improve the display effect of the warm startup.
[0005] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions: In a first aspect, a method for starting an application is provided, which is applied to an electronic device, wherein the display mode of the electronic device is a first color mode. The electronic device receives a first operation input by a user, wherein the first operation is used to trigger the start of a first application, and the display mode of the first application is a second color mode, which is different from the first color mode.
[0006] In response to the first operation, when there is a process of the first application and no activity of the first application, the electronic device starts a warm start and displays a start window in a first color matching the second color mode.
[0007] In response to the startup window ceasing to be displayed, the electronic device displays the first interface of the first application in a second color matching the second color pattern.
[0008] In the present application, when the electronic device needs to start the first application while the display mode is the first color mode, if there is no activity of the first application at present, but there is a process of the first application, then the electronic device performs a warm start, first displays the start window in the first color matching the second color mode, and the display mode of the first application is the second color mode. After the warm start is completed, the electronic device stops displaying the start window, and continues to display the interface of the first application in the second color matching the second color mode, ensuring the consistency of the color mode, that is, the display mode, of the start window and the interface of the first application displayed successively, thereby avoiding the flickering caused by the large color contrast between the start window displayed by the warm start and the interface of the application. And ensure the consistency of the display style, improve the display effect of the warm start, and improve the user experience.
[0009] The startup window is added by the electronic device and does not belong to the first application. The first color and the second color can be the same color, such as black, or different colors, but both match the second color mode.
[0010] Optionally, the first color mode may be a dark color mode or a light color mode. The first color mode is different from the second color mode, and the second color mode may be a light color mode or a dark color mode.
[0011] In a possible design, the display mode of the first application may be determined by the interface of the first application. Before receiving the first operation, that is, before warm starting the first application, the electronic device may run the first application in the foreground and display the second interface of the first application. The electronic device may determine the display mode of the first application based on the interface state when displaying the second interface.
[0012] Based on this, after determining the display mode of the first application, the electronic device can display the startup window in a color matching the determined display mode of the first application during the next warm startup.
[0013] In a possible design, the process of determining the display mode of the first application based on the interface state when the second interface is displayed may include: the electronic device may take a screenshot of the second interface based on the interface state when the second interface is displayed to obtain a screenshot result of the second interface; wherein the screenshot result of the second interface includes the background of the second interface. Afterwards, the electronic device may determine the display mode of the first application based on the background color value of the screenshot result.
[0014] Based on this, the electronic device identifies the background color of the screenshot result of the second interface based on the interface state of the second interface, and obtains the background color value of the second interface, so that the electronic device can use the background color value to determine the display mode of the first application, thereby accurately determining the display mode of the first application.
[0015] In a possible design, the interface state includes: whether the electronic device displays a status bar when the second interface is displayed. When the interface state is that the status bar is displayed, the screenshot result of the second interface includes all layers of the second interface. When the interface state is that the status bar is not displayed, the screenshot result of the second interface includes the background layer of the second interface.
[0016] Based on this, when the interface state is to display the status bar, the second interface displayed by the electronic device includes the actual background of the second interface. Therefore, the electronic device can directly take a screenshot of the entire second interface to determine the background color value of the second interface using the screenshot.
[0017] When the interface status is that the status bar is not displayed, the actual background of the second interface may be covered by the content displayed on the second interface. Therefore, the electronic device needs to determine the background layer in the second interface that includes the actual background of the second interface, so as to use the screenshot of the background layer to determine the background color value of the second interface, thereby accurately determining the background color value of the second interface.
[0018] In a possible design, when the second interface includes a surfaceview layer, the background layer includes layers other than the surfaceview layer in the second interface. When the second interface does not include a surfaceview layer, the background layer includes layers other than the topmost layer in the second interface. Based on this, based on the specific type of the second interface, the background layer of the second interface is determined to achieve accurate determination of the background layer.
[0019] In a possible design, the display mode of the first application can be set to the first color mode or the second color mode. The above-mentioned determining the display mode of the first application based on the background color value of the screenshot result includes: When the background color value matches the first color mode, the electronic device can determine that the display mode of the first application is the first color mode. When the background color value matches the second color mode, the electronic device can determine that the display mode of the first application is the second color mode.
[0020] Based on this, the electronic device determines whether the background color value is close to the first color mode to determine whether the display mode of the first application is the first color mode, thereby achieving accurate determination of the color mode of the first application.
[0021] In one possible design, the background color value matches the first color mode including that the difference between the background color value and the color threshold corresponding to the first color mode falls within the difference range corresponding to the first color mode, the difference between the background color value and the color threshold corresponding to the second color mode does not fall within the difference range corresponding to the second color mode, the background color value falls within the color value range corresponding to the first color mode, or the background color value does not fall within the color value range corresponding to the second color mode.
[0022] In a possible design, the display mode of the first application, that is, the color mode, can be determined when the first application retreats to the background. That is, the electronic device receives a second operation; wherein the second operation is used to trigger the first application to run in the background. In response to the second operation, the electronic device runs the first application in the background, and determines the display mode of the first application based on the interface state when the second interface is displayed.
[0023] Based on this, during the use of the first application, the user may modify the display mode of the first application. Therefore, the electronic device can determine the display mode of the first application when the first application retreats to the background, thereby accurately determining the latest display mode of the first application.
[0024] In a possible design, after determining that the display mode of the first application is the second color mode, the electronic device may set the background color of the startup window to the first color, or set the display mode of the startup window to the second color mode.
[0025] Correspondingly, displaying the startup window in the first color means that the background color of the startup window is the first color. Similarly, displaying the first interface in the second color means that the background color of the first interface is the second color.
[0026] Based on this, since the startup window is added by the electronic device, the electronic device can directly modify the background color or display mode of the startup window so that when the first application is warm-started, the startup window can be displayed in a color matching the second color mode, thereby ensuring the consistency of the display style of the startup window due to the first application.
[0027] In one possible design, after running the first application in the background, if the first application meets the conditions for stopping background running, the electronic device can delete the activity of the first application and retain the process of the first application. Therefore, when the first application is started again, there is no need to create the process of the first application, thereby shortening the startup time of the first application.
[0028] In a second aspect, the present application provides an electronic device, comprising a display screen, a memory and one or more processors; the display screen, the memory and the processor are coupled; the camera is used to capture images, the display screen is used to display images generated by the processor, and the memory is used to store computer program codes, wherein the computer program codes include computer instructions; when the processor executes the computer instructions, the electronic device executes the method for starting the application as described above.
[0029] In a third aspect, the present application provides a chip, the chip comprising a communication interface and at least one processor: The communication interface is used to input and / or output signaling or data; The at least one processor is used to execute a computer program to implement the method for starting the application as described above.
[0030] In a fourth aspect, the present application provides a computer-readable storage medium, comprising computer instructions, which, when executed on an electronic device, enable the electronic device to execute the method for starting an application as described above.
[0031] In a fifth aspect, the present application provides a computer program product, which, when executed on an electronic device, enables the electronic device to execute the method for starting an application as described above.
[0032] It can be understood that the beneficial effects that can be achieved by the electronic device described in the second aspect, the chip described in the third aspect, the computer-readable storage medium described in the fourth aspect, and the computer program product described in the fifth aspect provided above can be referred to the beneficial effects in the first aspect and any possible design method thereof, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 A schematic diagram of a startup scenario provided in an embodiment of the present application Figure 1 ; Figure 2 A schematic diagram of a returning to desktop scene provided in an embodiment of the present application; Figure 3 A schematic diagram of a backstage scenario provided in an embodiment of the present application; Figure 4 A schematic diagram of a startup scenario provided in an embodiment of the present application Figure 2 ; Figure 5 A schematic diagram of a startup scenario provided in an embodiment of the present application Figure 3 ; Figure 6 A schematic diagram of a stop-run application scenario provided in an embodiment of the present application; Figure 7 A schematic diagram of a color mode setting provided in an embodiment of the present application Figure 1 ; Figure 8 A schematic diagram of a dark mode scenario provided in an embodiment of the present application; Fig. 9 A schematic diagram of a color mode setting provided in an embodiment of the present application Figure 2 ; Fig.10 A schematic diagram of a non-immersive interface provided in an embodiment of the present application; Fig.11 A schematic diagram of a startup scenario provided in an embodiment of the present application Figure 4 ; Fig.12 A schematic diagram of a startup scenario provided in an embodiment of the present application Figure 5 ; Fig.13 A schematic diagram of a startup scenario provided in an embodiment of the present application Figure 6 ; Fig.14 A schematic diagram of a startup scenario provided in an embodiment of the present application Figure 7 ; Fig.15 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application Figure 1 ; Fig.16 A schematic diagram of a software structure of an electronic device provided in an embodiment of the present application; Fig.17 A schematic diagram of a warm start method provided in an embodiment of the present application Figure 1 ; Fig.18 A schematic diagram of an immersive interface provided in an embodiment of the present application Figure 1 ; Fig.19 A schematic diagram of an immersive interface provided in an embodiment of the present application Figure 2 ; Fig. 20 A schematic diagram of a warm start method provided in an embodiment of the present application Figure 2 ; Fig.21 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application Figure 2 ; Fig. 22 A schematic diagram of the structure of a chip system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0034] In order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or design solutions. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way. In the embodiments of the present application, "at least one" refers to one or more, and "multiple" refers to two or more. "And / or" describes the association relationship of the associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple. In the embodiments of the present application, "first", "second", "1", "2" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of this embodiment, unless otherwise specified, "multiple" means two or more.
[0035] In order to facilitate the understanding of the technical solution of the present application, the terms involved in the present application are first introduced below.
[0036] There are three ways to start an application: cold start, hot start, and warm start.
[0037] Cold start refers to the process of starting an application from scratch. Before the application is started, the electronic device does not have the process of the application. During the application startup, the electronic device creates the process of the application and also creates the activity of the application. For example, when the application is started for the first time after the electronic device is turned on, or when the application process is cleaned up and then started again, it can be called a cold start.
[0038] Hot start refers to the startup method in which both the process and activity of the application exist. After the application is switched from the foreground to the background, the electronic device restarts the application. When restarting the application, since the process and activity of the application exist, the electronic device does not need to create the process and activity of the application. For example, when the application is in the background, in response to the user clicking the card of the application displayed in the background, the electronic device restarts the application, which can be called a hot start.
[0039] A warm start refers to a startup method in which the application process exists but the application activity does not exist. After the application switches from the foreground to the background, the electronic device stops running the application in the background and clears the card of the application in the background, but the process of the application may still be retained. When restarting the application, the electronic device does not need to create the process of the application, but needs to create the activity of the application. In addition, it is understandable that for some applications, when the electronic device stops running the application in the background, the electronic device will no longer have the process and activity of the application, that is, there is no warm start for these applications.
[0040] It should be noted that the activity of an application is used to implement the interface of the application, the activity of an application may belong to the process of the application, and the activity of an application may run in the process of the application.
[0041] The following uses social applications as an example to introduce the above three startup methods. Figure 1 As shown, after booting up, the mobile phone displays a desktop 10. The desktop 10 includes an icon 11 of a social application. In response to a user clicking on the icon 11 of the social application, the mobile phone starts the social application, displays the startup content 12 of the social application, and creates the process and activity of the social application. After the startup is completed, the mobile phone displays the interface 13 of the social application. This startup mode is a cold startup.
[0042] Afterwards, if Figure 2 As shown in FIG. 1 , during the period when the mobile phone displays the interface 13 of the social application, the user slides upward from the bottom of the mobile phone display screen. In response to the user's upward sliding operation, the mobile phone no longer displays the interface 13 of the social application, but displays the mobile phone desktop 14, and the social application switches from the foreground application to the background application. Figure 3 As shown, in response to the upward sliding operation input by the user on the desktop 14, the mobile phone displays the card (or called interface, window) of the APP running in the background. The card of the APP includes a card 15 of a social application.
[0043] In one example, Figure 4 As shown, in response to the user clicking on the card 15 of the social application, the mobile phone starts the social application, displays the interface 16 of the social application, switches the social application from a background application to a foreground application, and does not need to recreate the process and activity of the social application. This startup mode is a hot start.
[0044] In another example, Figure 5As shown, in response to the user's upward sliding operation on the social application card 15, the mobile phone stops running the social application in the background and deletes the social application card 15. Since there are no other background applications, the mobile phone can display the desktop 17. Although the mobile phone stops running the social application in the background, since the social application is a high-frequency application, in order to shorten the startup time of the social application and ensure the user experience, the mobile phone can still retain the process of the social application when stopping the social application in the background, but delete the activity of the social application.
[0045] Afterwards, continue as Figure 5 As shown, in response to a user clicking on an icon 18 of a social application on a mobile phone desktop 17, the mobile phone starts the social application, displays a gradually enlarging startup window 19, creates an activity of the social application, and draws the interface of the social application. After the startup is completed, the mobile phone displays the interface 20 of the social application. This startup mode is a warm startup.
[0046] It is understandable that if the user wants to end the process of the social application, he can use the controls provided by the mobile phone (see Figure 6 The forced stop control 21 shown in the figure is used to trigger the mobile phone to end the process of the social application. Of course, in other cases, the mobile phone can also end the process of the social application, and this application does not limit it.
[0047] In addition, the display of the above startup window is to ensure the smoothness of warm startup and avoid giving users the feeling of startup lag. When warm starting a social application, since it takes a certain amount of time to create the activity of the social application, if the interface of the social application is displayed only after the user clicks the icon of the social application and waits for the activity of the social application to be created, the user may think that the startup is stuck. Therefore, in order to ensure the smoothness of the startup of the social application, a startup window is added so that the mobile phone can create the activity of the social application while displaying the startup window. In short, the startup window here is equivalent to a startup animation.
[0048] Color mode refers to the background color of the interface displayed by the electronic device. Color modes include dark mode and light mode. Dark mode means that the background color of the interface displayed by the electronic device is black, such as black, gray and other dark colors. Light mode means that the background color of the interface displayed by the electronic device is light, such as white and other light colors.
[0049] Some electronic devices provide a color mode (or system color mode) setting function, such as Figure 7 When the system color mode is dark mode, the background color of the system interface of the electronic device (including the interface of the system application) is dark, such as Figure 8The color of the desktop 30 shown is dark. When the system color mode is light color mode, the background color of the system interface of the electronic device is light color, as described above. Figure 1 The color of the desktop in 10 is light.
[0050] In addition, third-party applications of electronic devices may also provide a color mode setting function. The color mode set by the third-party application may be consistent with the system color mode, or it may not be consistent. For example, the color mode of the third-party application may follow the system color mode, or it may not follow the system color mode. Fig. 9 As shown, the social application provides a follow system switch 31. When the follow system switch is turned on, the color mode of the social application is consistent with the system color mode. If the system color mode is a dark mode, then the color mode of the social application is also a dark mode. Specifically, Figure 8 The color of the desktop 30 shown is dark. Fig.10 The background color of the interface of the social application shown is also dark.
[0051] When the follow system switch is turned off, the color mode of the third-party application can be inconsistent with the system color mode. For example, after setting the color mode of the social application to dark mode, the background color of the social application will be dark regardless of whether the system color mode is dark mode or light mode. After setting the color mode of the social application to dark mode, the background color of the social application will be light regardless of whether the system color mode is dark mode or light mode. Fig. 9 As shown, the social application provides a dark mode control 32 and a normal mode control 33. The dark mode control 32 is used to set the color mode of the social application to the dark mode, and the normal mode control 33 is used to set the color mode of the social application to the light mode.
[0052] The above introduces the terms involved in this application, and the following will continue to introduce the technical solutions provided by this application.
[0053] From the above content, it can be seen that when the third-party APP is warm-started, the electronic device will first display the startup window. Since the startup window is added by the electronic device, it belongs to the system interface and does not belong to the third-party application. Therefore, the background color of the startup window follows the system color mode. When the system color mode is inconsistent with the color mode of the third-party APP, the color of the startup window displayed by the electronic device is inconsistent with the background color of the third-party APP window displayed by the electronic device after the warm start is completed, resulting in a large difference in color between the startup window and the third-party APP window, causing flickering problems, reducing the user experience, and may cause users to mistakenly believe that there is an abnormality with the mobile phone.
[0054] Take the mobile phone as an example, Fig.11As shown, the mobile phone displays a desktop 40 with a light background color. In response to a click operation on the icon 41 of the social application on the desktop 40, since the mobile phone has a process of the social application but no activity of the social application, the mobile phone performs a warm start on the social application. During the warm start, the mobile phone displays a startup window 42 with a light background color. After the warm start is completed, the mobile phone displays an interface 43 of the social application with a dark background color. From the perspective of user perception, since the color difference between the startup window 42 and the interface 43 of the social application is large, when the startup window 42 switches to the interface 43 of the social application, a flickering white screen is caused.
[0055] Similarly, if Fig.12 As shown, the mobile phone displays a desktop 50 with a dark background color. In response to a click operation on an icon 51 of a social application on the desktop 50, the mobile phone performs a warm start on the social application. During the warm start, the mobile phone displays a startup window 52 with a dark background color. After the warm start is completed, the mobile phone displays an interface 53 of the social application with a light background color. From the user's perception perspective, due to the large color difference between the startup window 52 and the interface 53 of the social application, when the startup window 42 switches to the interface 43 of the social application, a flickering black screen is caused.
[0056] Therefore, in response to the above problems, the present application provides a warm start method for a third-party application to solve the flickering problem that occurs when an electronic device warm starts a third-party application when the color mode of the third-party application is inconsistent with the system color mode. Considering the system limitations, the electronic device cannot directly know the setting of the color mode of the third-party application, that is, it cannot know whether the color mode of the third-party application is a dark mode or a light mode. Therefore, in order for the electronic device to determine the color mode setting of the third-party application, when displaying the interface of the third-party application, the electronic device can take a screenshot of the interface of the third-party application. Afterwards, the electronic device analyzes the screenshot to determine the background color of the third-party application, thereby determining the color mode of the third-party application (i.e., the color mode of the third-party application) based on the background color of the third-party application, and realizing accurate determination of the color mode of the third-party application. Since the electronic device can directly obtain the setting information of the system color mode, the electronic device can determine whether the current system color mode is consistent with the color mode of the third-party application.
[0057] In the case of inconsistency, the color mode of the startup window corresponding to the third-party application is set to the color mode of the third-party application. During warm startup, the electronic device displays a startup window with a color mode consistent with the color mode of the third-party application, so that the color difference between the startup window and the interface of the third-party application displayed after the startup is completed is small, avoiding a large color difference between the startup window and the interface of the third-party application, thereby avoiding a sense of flicker. In addition, the display style consistency is ensured, the display effect of warm startup is improved, and the user experience is guaranteed.
[0058] For example, the system color mode of the mobile phone is light mode, and the color mode of the third-party application is dark mode. Fig.13 As shown, the mobile phone displays a desktop 60 with a light background color. In response to a click operation on an icon 61 of a social application on the desktop 60, the mobile phone performs a warm start on the social application. During the warm start, the mobile phone displays a start window 62 with a dark background color. After the warm start is completed, the mobile phone displays an interface 63 of the social application with a dark background color to avoid flickering white screen.
[0059] Similarly, the system color mode of the mobile phone is dark mode, and the color mode of third-party applications is light mode. Fig.14 As shown, the mobile phone displays a desktop 70 with a dark background color. In response to a click operation on an icon 71 of a social application on the desktop 70, the mobile phone performs a warm start on the social application. During the warm start, the mobile phone displays a start window 72 with a light background color. After the warm start is completed, the mobile phone displays an interface 73 of the social application with a light background color to avoid flickering black screen.
[0060] It is understandable that after the color mode of the startup window is consistent with the color mode of the window of the third-party application, although the color mode of the startup window is inconsistent with the color mode of the mobile phone desktop, the user may think that the startup window is the startup content of the third-party application, and the background color of the startup window itself is inconsistent with the background color of the mobile phone desktop, which will not cause a sense of flickering to the user.
[0061] In addition, when the electronic device is in a certain system color mode, although the color modes of different system interfaces of the electronic device are all the same color mode, the specific background colors can be the same or different. For example, although the background color of the startup window and the background color of the desktop are both dark, they can be different, such as the background color of the startup window is black and the background color of the desktop is gray, etc. This application does not limit the specific background color.
[0062] Exemplarily, the electronic device in the embodiments of the present application may be a mobile phone, a tablet computer, a desktop, a laptop, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, as well as a wearable device, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, and other devices that can install an APP. The embodiments of the present application do not impose any special restrictions on the specific form of the electronic device.
[0063] For example, Fig.15 FIG. 2 shows a schematic diagram of the structure of the electronic device 200. Fig.15 As shown, the electronic device 200 may include a processor 210, an external memory interface 220, an internal memory 221, a universal serial bus (USB) interface 230, a charging management module 211, a power management module 212, a battery 213, an antenna 1, an antenna 2, a mobile communication module 240, a wireless communication module 250, an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, an earphone interface 270D, a sensor module 280, a button 290, a motor 291, an indicator 292, a camera 293, a display screen 294, and a subscriber identification module (SIM) card interface 295, etc.
[0064] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 200. In other embodiments of the present application, the electronic device 200 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.
[0065] The processor 210 may include one or more processing units, for example, the processor 210 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0066] The controller may be the nerve center and command center of the electronic device 200. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0067] The processor 210 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 210 is a cache memory. The memory may store instructions or data that the processor 210 has just used or cyclically used. If the processor 210 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 210, and thus improves the efficiency of the system.
[0068] The wireless communication function of the electronic device 200 can be implemented through the antenna 1, the antenna 2, the mobile communication module 240, the wireless communication module 250, the modem processor and the baseband processor.
[0069] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 200 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. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0070] The mobile communication module 240 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 200. The mobile communication module 240 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 240 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 240 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 240 can be set in the processor 210. In some embodiments, at least some of the functional modules of the mobile communication module 240 can be set in the same device as at least some of the modules of the processor 210.
[0071] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 270A, a receiver 270B, etc.), or displays an image or video through a display screen 294. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 210 and be set in the same device as the mobile communication module 240 or other functional modules.
[0072] The wireless communication module 250 can provide wireless communication solutions including wireless local area networks (WLAN) (such as Wi-Fi (wireless fidelity)), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 200. The wireless communication module 250 can be one or more devices integrating at least one communication processing module. The wireless communication module 250 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and filters it, and sends the processed signal to the processor 210. The wireless communication module 250 can also receive the signal to be sent from the processor 210, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0073] The electronic device 200 implements the display function through a GPU, a display screen 294, and an application processor.
[0074] The display screen (or screen) 294 is used to display images, videos, etc. In some embodiments, the electronic device 200 may include 1 or N display screens 294 , where N is a positive integer greater than 1.
[0075] The electronic device 200 can realize the shooting function through ISP, camera 293, video codec, GPU, display screen 294 and application processor.
[0076] The external memory interface 220 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 200.
[0077] The internal memory 221 can be used to store computer executable program codes, which include instructions. The processor 210 executes various functional applications and data processing of the electronic device 200 by running the instructions stored in the internal memory 221. The internal memory 221 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 200 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 221 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0078] The electronic device 200 can implement audio functions such as music playing and recording through the audio module 270, the speaker 270A, the receiver 270B, the microphone 270C, the headphone jack 270D, and the application processor.
[0079] The buttons 290 include a power button, a volume button, etc. The indicator 292 may be an indicator light.
[0080] The sensor module 280 may include a pressure sensor, a gyro sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, and the like.
[0081] The software system of the electronic device 200 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The present application embodiment takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device 200.
[0082] Fig.16 It is a software structure block diagram of the electronic device 200 according to an embodiment of the present invention.
[0083] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.
[0084] The application layer can include a series of application packages.
[0085] like Fig.16As shown, the application package may include gallery, social, recent task (recent) module, desktop launcher (launcher), Bluetooth, music, video, short message and other applications.
[0086] Among them, the recent task module is used to manage applications running in the background, such as stopping background applications.
[0087] The desktop launcher is used to launch applications on the electronic device 200, such as social applications, based on user operations.
[0088] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0089] like Fig.16 As shown, the application framework layer may include a window manager service (WMS), a surface flinger, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.
[0090] The window manager is used to manage window programs. The window manager can obtain the size of the display screen, determine whether there is a status bar, etc. Among them, the window manager can determine the type of the currently displayed interface based on whether there is a status bar. The types of interfaces include non-immersive interfaces and immersive interfaces. Optionally, the immersive interface can include an immersive interface of the surface view (surfaceview) type and an immersive interface of the non-surfaceview type. The window manager can determine the specific type of the immersive interface based on whether the immersive interface has a surfaceview component.
[0091] In addition, the window manager can also obtain the current color mode (or system color mode) of the electronic device 200, adjust the color mode of the startup window of the application, and so on.
[0092] SurfaceFlinger is used to determine the background layer in the immersive interface so as to take a screenshot of the background layer in the immersive interface.
[0093] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0094] 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. The display interface can be composed of one or more views.
[0095] The phone manager is used to provide the communication function of the electronic device 200. The resource manager provides various resources and the like for the application program.
[0096] The notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages and disappear automatically after a short stay without user interaction.
[0097] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.
[0098] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.
[0099] The application layer and the application framework layer run in a 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 functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0100] The system library can include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc. The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.
[0101] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing, etc. The 2D graphics engine is a drawing engine for 2D drawing.
[0102] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
[0103] It is understandable that the above Fig.16 The structure shown is only an example, and the electronic device can divide the software layer according to the needs. For example, the electronic device can include not only the above software layer, but also other software layers. Alternatively, the electronic device can include one or more of the above software layers. Similarly, the content included in each software layer is also only an example, and this application does not limit it.
[0104] The present application provides a warm start method. When the application exits the foreground, the electronic device can determine the type of the currently displayed interface (that is, the interface state when the interface is displayed), and the types of the interface include non-immersive interfaces and immersive interfaces. A non-immersive interface means that when the electronic device displays the interface, a status bar is displayed, and the background currently displayed by the interface is the actual background of the interface, so that the electronic device can directly determine the background color value of the interface based on the background of the interface. An immersive interface means that the electronic device displays the interface in full screen without displaying the status bar. The background currently displayed by the interface may not be the actual background of the interface, and the actual background of the interface has been covered by the displayed content. Therefore, the electronic device needs to determine the background color value of the interface based on the background layer of the interface, and the background layer includes the actual background of the interface.
[0105] Afterwards, the electronic device determines the color mode of the application based on the background color value of the interface. When the color mode of the application is inconsistent with the system color mode, the electronic device sets the startup window of the application to the color mode of the application. Afterwards, when the application is warm-started, the startup window of the color mode is displayed. After the warm start is completed, the electronic device continues to display the interface of the color mode to ensure the consistency of the color mode of the startup window and the interface of the application, avoid flickering due to the large color contrast between the two, and avoid users thinking that the mobile phone is abnormal, thereby improving the display effect of the warm start.
[0106] The following will take the above electronic device as a mobile phone, the system color mode of the electronic device (or the display mode of the electronic device) as a dark mode, and the application as a social application as an example to introduce the implementation process of the warm start method provided by the present application. Fig.17 As shown, the warm start method may include the following steps: S301. The mobile phone displays an interface 1 of a social application.
[0107] S302: In response to a swipe-up operation by the user, the mobile phone switches the social application to the background.
[0108] In an embodiment of the present application, while a social application (which can be used as an example of a first application) is running in the foreground, when the user wants the mobile phone to stop running the social application in the foreground, the user can input a swipe-up operation, and the mobile phone stops running the social application in the foreground and moves the social application to the background. It should be understood that the swipe-up operation is only an example of a home operation, and the home operation can also be other operations. For example, it is an operation of the home button displayed on the mobile phone. In addition, it should be understood that the home operation is also an example operation of triggering the switching of a social application to the background. In general, the present application does not limit the operation (or second operation) that triggers the mobile phone to switch the social application to the background.
[0109] S303. The mobile phone determines that the current system color mode is a light color mode.
[0110] S304: The mobile phone determines whether the interface 1 is a non-immersive interface.
[0111] As can be seen from the above content, when interface 1 (or the second interface) is a non-immersive interface, it means that when the mobile phone displays interface 1, the mobile phone also displays a status bar, and the content of interface 1 is not displayed in full screen. Therefore, the background displayed by interface 1 is the actual background of interface 1, and is not covered by the content of interface 1. In this way, the mobile phone can directly determine the background color of interface 1 according to the color of interface 1, and the mobile phone can execute S305.
[0112] When interface 1 is an immersive interface, it indicates that the status bar is hidden, the content of interface 1 is displayed in full screen, and the content displayed in interface 1 has covered the actual background of interface 1, that is, the background color displayed in interface 1 may not be the actual background color of interface 1. Therefore, the mobile phone cannot directly determine the background color of interface 1 according to the display status of interface 1, and the mobile phone can execute S307 or S308.
[0113] S305. The mobile phone takes a screenshot of interface 1.
[0114] For example, interface 1 is the above Fig.10 In the interface of the social application shown, the mobile phone displays a status bar 34 while displaying the interface. The mobile phone can determine that interface 1 is a non-immersive interface, and the background in interface 1 is not completely covered by the display content in interface 1. Therefore, the mobile phone can take a screenshot of the entire interface 1 to determine the background color value of interface 1 through the background in the screenshot, and the background color value of interface 1 represents the determination of the background color value of the social application.
[0115] S306. The mobile phone determines the background color value of the screenshot and obtains the background color value of interface 1.
[0116] For example, the mobile phone can select multiple feature points (or pixel points) from the screenshot, and determine the background color value of the screenshot based on the color values (or pixel values) of the multiple feature points. Generally speaking, the background area of the interface (such as the above screenshot) is the top and bottom of the interface, so the mobile phone can select multiple feature points from the top or bottom. For example, interface 1 is Fig.10 In the interface of the social application shown, the mobile phone can randomly select multiple pixels from the vicinity of the status bar 34. Alternatively, when the interface is in a certain color mode, the overall color of the interface is the color corresponding to the color mode. Therefore, the mobile phone can also randomly select multiple feature points from the interface 1 (such as the screenshot of the interface 1) to determine the background color value of the interface 1.
[0117] Optionally, the process of determining the background color value of the screenshot based on the color values of multiple feature points may include: based on the color value of each feature point in the multiple feature points, the mobile phone determines the number of feature points corresponding to each color value. Afterwards, the mobile phone may use the color value of the feature point with the largest number as the background color value of the screenshot. Alternatively, the mobile phone calculates the average of the color values of the multiple feature points to obtain the background color value of the screenshot. Of course, the background color value of the screenshot may also be determined by other methods, which are not limited by the present application.
[0118] Among them, the number of selected feature points can be set according to needs, and this application does not limit it.
[0119] The above describes the process of determining the background color value directly through the entire screenshot of interface 1 when interface 1 is a non-immersive interface. Of course, there is also the possibility that interface 1 is an immersive interface. When interface 1 is an immersive interface, it indicates that interface 1 is displayed in full screen, and the content currently displayed by interface 1 may have covered the actual background of interface 1. Therefore, the mobile phone needs to determine the background layer of interface 1, which includes the actual background of interface 1. Afterwards, the mobile phone can identify the color of the background layer, such as taking a screenshot of the background layer, determining the background color value of the screenshot, and thus obtaining the background color value of interface 1. The background layer of interface 1 can be a layer below the topmost layer, and the topmost layer refers to the layer where the displayed content is located.
[0120] Optionally, in order to improve the accuracy of determining the background layer, the background layer of the immersive interface can be determined based on the specific type of the immersive interface, so as to use the background layer to determine the background color value of the immersive interface. The following will continue to introduce the process of determining the background color value of interface 1 when interface 1 is an immersive interface.
[0121] S307 . When the interface 1 is an immersive interface of the surface view type, the mobile phone uses the layers in the interface 1 except the surface view layer as the background layer of the interface 1 .
[0122] S308 . When the interface 1 is an immersive interface of a non-surface view type, the mobile phone uses the layers in the interface 1 except the topmost layer as the background layers of the interface 1 .
[0123] In the embodiment of the present application, an interface may be composed of one or more layers, but generally speaking, the interface is composed of multiple superimposed layers. That is to say, the immersive interface is composed of multiple superimposed layers. The types of immersive interfaces may include SurfaceView type and non-SurfaceView type. Since SurfaceView is generally used for video playback, when Interface 1 is an immersive interface of the SurfaceView type (that is, Interface 1 includes a SurfaceView layer), it indicates that before the social application retreats to the background, the mobile phone plays the video in full screen, and the SurfaceView layer where the video is located covers the actual background of Interface 1. Therefore, the mobile phone can use the layers in Interface 1 except the SurfaceView layer as the background layer of Interface 1. In other words, the specific display content of the background layer refers to the content displayed on Interface 1 after the SurfaceView layer is removed.
[0124] In the case where the above-mentioned interface 1 is an immersive interface of a non-surfaceview type (i.e., interface 1 does not include a surfaceview layer), before the social application retreats to the background, the mobile phone displays content in full screen, such as a full screen picture, and the displayed content has covered the actual background of interface 1, and the displayed content is generally located on one layer. Therefore, the mobile phone can use the layers in interface 1 except the top layer as the background layer of interface 1. In other words, the specific display content of the background layer refers to the content displayed on interface 1 after removing the top layer.
[0125] For example, if Fig.18 As shown, the user clicks on the video 81 in the chat interface 80, and the mobile phone displays the interface 82, and the video 81 is played in full screen on the interface 82. The background 83 displayed on the interface 82 is not actually the actual background of the interface 82, that is, the color of the background 83 (i.e., black) is not the actual background color of the interface 82. Therefore, if the entire interface 82 is screenshoted, and the background color of the screenshot is used as the actual background color of the interface 82, the background color of the interface 82 will be mistakenly determined as black. In this way, in order to accurately determine the background color, the mobile phone needs to determine the layer of the interface 82, and determine the background layer from the layer of the interface 82, so as to determine the actual background color of the interface 82 based on the color of the background layer. The background layer can be a layer in the layer of the interface 82 except the surfaceview layer. The interface 82 described here can refer to the above-mentioned interface 1.
[0126] Similarly, if Fig.19As shown, the user clicks on the picture 85 in the chat interface 84, and the mobile phone displays the interface 86, and the picture 85 is displayed in full screen on the interface 86. The background 87 displayed on the interface 86 is not actually the actual background of the interface 86. In other words, the color of the background 87 (i.e., black) is not the actual background color of the interface 86. Therefore, if the entire interface 86 is screenshoted, and the background color of the screenshot is used as the actual background color of the interface 86, the actual background color of the interface 86 will be mistakenly determined as black. In this way, in order to accurately determine the background color, the mobile phone needs to determine the layer of the interface 86, and determine the background layer from the layer of the interface 86, so as to determine the actual background color of the interface 86 based on the color of the background layer. The background layer can be a layer other than the top layer in the layer of the interface 86. The interface 86 described here can refer to the above-mentioned interface 1.
[0127] S309 , the mobile phone takes a screenshot of the background layer, and determines the color value of the screenshot to obtain the background color value of interface 1 .
[0128] In the embodiment of the present application, the mobile phone takes a screenshot of the background layer, which is equivalent to taking a screenshot of the specific display of the background layer to obtain a screenshot of the background layer. Afterwards, the mobile phone can select one or more feature points from the background layer to use the color values of the selected feature points to determine the color value of the screenshot of the background layer, and use the color value of the screenshot as the background color value of interface 1.
[0129] Among them, the process of determining the color value of the screenshot of the background layer using the color value of the selected feature point can refer to the implementation process of determining the background color value of the screenshot of interface 1 based on the color values of multiple feature points introduced above, which will not be repeated here.
[0130] It should be noted that, when interface 1 is an immersive interface of the surfaceview type, interface 1 without the surfaceview layer may still display other content, but it is generally not displayed in full screen. In other words, the background layer may display other content, but the other content will not completely cover the actual background of interface 1. In other words, the background layer can display the actual background of interface 1, so that the actual background color of interface 1 can be determined based on the background layer.
[0131] Similarly, when interface 1 is an immersive interface of a non-surfaceview type, interface 1 without the top layer may still display other content, but it is generally not displayed in full screen. In other words, the background layer may display other content, but the other content will not completely cover the actual background of interface 1. In other words, the background layer can display the actual background of interface 1, so that the actual background color of interface 1 can be determined based on the background layer.
[0132] The above describes the implementation process of determining the background color value of interface 1. After determining the background color value of interface 1, the mobile phone can determine the color mode of interface 1 based on the background color value of interface 1 to obtain the color mode of the social application. The following will continue to describe the process of determining the color mode of the social application based on the background color value of interface 1.
[0133] S310. The mobile phone calculates a difference 1 between the background color value of the interface 1 and the color threshold corresponding to the dark mode.
[0134] S311. The mobile phone determines whether the difference 1 belongs to the difference range 1 corresponding to the dark mode.
[0135] When the difference 1 belongs to the difference range 1 corresponding to the dark mode, it indicates that the background color value of interface 1 is close to the dark value, that is, the background color of interface 1 is dark, that is, the color mode of interface 1 is the dark mode, and the mobile phone can execute S312.
[0136] When the difference 1 does not belong to the difference range 1 corresponding to the dark mode, it indicates that the background color value of the interface 1 is not close to the dark value, that is, the background color of the interface 1 is not dark. In other words, the background color of the interface 1 is light, that is, the color mode of the interface 1 is light mode, and the mobile phone can execute S314.
[0137] It should be noted that the mobile phone can not only calculate the difference 1 between the background color value of the interface 1 and the color threshold corresponding to the dark mode, but also calculate the difference 2 between the background color value and the color threshold corresponding to the light mode to determine whether the background color value is close to the light value by using the difference 2, thereby determining whether the color mode of the interface 1 is the light mode or the dark mode. In other words, the mobile phone can calculate the difference between the background color value of the interface 1 and the color threshold corresponding to the preset color mode to determine whether the background color value is close to the color value corresponding to the preset color mode by using the difference, thereby determining whether the color mode of the interface 1 is the preset color mode.
[0138] In addition, the mobile phone can also directly determine whether the background color value of interface 1 belongs to the color value range corresponding to the preset color mode. If it does, the mobile phone can determine that the color mode of interface 1 is the preset color mode. If it does not, the mobile phone can determine that the color mode of interface 1 is not the preset color mode. In general, when the background color value matches the preset color mode, the mobile phone determines that the display mode of the social application is the preset color mode. When the background color does not match the preset color mode, the mobile phone determines that the display mode of the social application is not the preset color mode. Among them, the above-mentioned preset color mode can be a dark mode or a light mode.
[0139] S312. The mobile phone determines that the color mode of the social application is a dark mode.
[0140] S313. The mobile phone changes the color mode of the startup window of the social application to a dark mode.
[0141] In the embodiment of the present application, since the color mode of the social application is dark mode, and the system color mode is light mode, that is, the color mode of the startup window is also light mode. In order to avoid the screen flashing problem caused by the inconsistency between the color mode of the startup window and the color mode of the social application, the mobile phone can also set the color mode of the startup window to dark mode, so that the color mode of the startup window is consistent with the color mode of the social application.
[0142] Exemplarily, the attribute information of the startup window may include attribute information of the color mode, and the mobile phone may modify the attribute information of the color mode in the relevant code corresponding to the startup window, thereby modifying the attribute information to the dark mode information. Alternatively, the attribute information of the startup window may include attribute information of the background color (or alternatively described as a color), and the mobile phone may modify the background color to a color matching the dark mode, that is, a dark color, such as black.
[0143] S314. The mobile phone determines that the color mode of the social application is the light color mode.
[0144] S315. The mobile phone does not modify the color mode of the startup window of the social application.
[0145] In the embodiment of the present application, since the color mode of the social application is consistent with the color mode of the startup window, the mobile phone will not cause a screen flashing problem when warm starting the social application. Therefore, the mobile phone does not need to modify the color mode of the startup window.
[0146] In some embodiments, some applications only have cold start and hot start as startup methods, but no warm start. If there is no warm start for the application, there is no flickering problem caused by the inconsistency between the background color of the startup window and the application interface. Therefore, when the social application retreats to the background, the mobile phone can determine whether the startup method of the social application includes a warm start. If a warm start is not included, the mobile phone does not need to determine the color mode of the social application, let alone modify the color mode of the startup window. If a warm start is included, the mobile phone can determine the color mode of the social application normally, and determine whether to modify the color mode of the startup window based on the color mode of the social application and the system color mode.
[0147] When the mobile phone warm-starts an application, it can record that the startup mode of the application includes warm startup. However, for an application that has not been warm-started by the mobile phone, the mobile phone cannot determine whether the startup mode of the application includes warm startup.
[0148] In the embodiment of the present application, considering that the user may modify the color mode of the social application during the use of the social application, when the social application is retreated to the background, the mobile phone can determine how to determine the screenshot including the actual background of the interface 1 based on the type of the interface 1 displayed by the social application, so as to use the screenshot to determine the color mode of the social application, thereby achieving accurate determination of the color mode of the social application and ensuring the consistency of the determined color mode of the social application with the color mode currently in which the social application is located. In addition, when the social application is retreated to the background, it indicates that there is a possibility of subsequent warm start of the social application, so the mobile phone determines the color mode of the social application, which can avoid unnecessary determination of the color mode of the social application to a certain extent.
[0149] Of course, the above-mentioned determination of the color mode of the social application when the social application retreats to the background is only an example, and the mobile phone can also determine the color mode of the social application at other times. For example, the mobile phone can directly determine the color mode of the social application during the operation of the social application, or determine the color mode of the social application when the social application is started. However, compared with determining the color mode of the social application at other times, determining the color mode of the social application when the social application retreats to the background can improve the accuracy of the color mode determination.
[0150] In addition, the modification of the color mode of the startup window introduced in S313 can be performed by the mobile phone after determining that the color mode of the social application is inconsistent with the system color mode, or can be performed when the social application is warm-started. This application does not limit the timing of modifying the color mode of the startup window.
[0151] S316: When the social application meets the background clearing condition, the mobile phone clears the social application card displayed in the background, deletes the social application activity, and retains the social application process.
[0152] The background clearing condition (or the condition for stopping background operation) indicates the condition for triggering the mobile phone to clear the social application running in the background. The background clearing condition may include receiving an operation of clearing the card of the social application input by the user, and / or the duration of the social application running in the background exceeds a preset duration.
[0153] Exemplarily, the operation of clearing the social application card may include sliding up the social application card displayed in the background (as described above). Figure 5 The user slides up the social application card 15 as shown). Or, the user clicks on the delete control displayed on the background of the mobile phone.
[0154] S317: In response to the start-up operation of the social application, the mobile phone displays a start-up window in a dark color.
[0155] Among them, the start operation can also be used as the first operation.
[0156] S318: After the startup is completed, the mobile phone displays interface 2, wherein the background color of interface 2 is dark.
[0157] For example, in response to the user clicking the icon of the social application on the desktop, it indicates that the mobile phone needs to start the social application. Since the process of the social application still exists on the mobile phone, but there is no activity of the social application, the start of the social application is a warm start, and only the activity of the social application needs to be created to draw the interface 2 (or the first interface) of the social application. In order to ensure the continuity of the start, the mobile phone displays a blank start window, and the color of the start window (i.e., the background color) is dark (which can be used as an example of the first color). In short, the mobile phone displays a pure dark start window.
[0158] After the warm start is completed, the activity of the social application is created, and the mobile phone no longer displays the startup window, but displays interface 2 of the social application. The background color of interface 2 is dark (which can be used as an example of the second color) to avoid the flickering caused by the large color contrast between the startup window and interface 2.
[0159] Among them, optionally, the above interface 2 can be the first interface of the social application by default. Of course, the interface 2 can also be other interfaces instead of the first interface, for example, the interface 2 is the same as the above interface 1.
[0160] It is understood that the blank startup window is only an example. Figure 5 The startup window 19 shown, Fig.12 The launch window 52 shown is only an example. The launch window may also include content, such as an icon of a social application.
[0161] In some embodiments, the warm start process of the social application may include steps such as displaying a startup window, creating an activity of the social application (or alternatively describing drawing interface 2), but does not include displaying interface 2. Displaying interface 2 is a step that can be performed after the warm start is completed.
[0162] In some embodiments, when the social application retreats to the background again, the mobile phone can still re-determine the latest color mode of the social application to ensure that the background color of the startup window displayed during the next warm startup matches the latest color mode.
[0163] It should be noted that the numbering of the above steps does not represent the actual execution order of the steps. For example, the determination of the system color mode of the mobile phone described in S303 above can be determined when the social application retreats to the background, or it can be determined at other times, such as when the social application is warm-started. This application does not limit the execution order of the above steps.
[0164] In some embodiments, when the social application retreats to the background, the desktop launcher in the mobile phone can trigger the window manager to read the current system color mode information from the setting database and determine the color mode of the social application. When the color mode of the social application is inconsistent with the system color mode, the window manager can modify the background color of the startup window, so that the startup window displayed when the social application is warm-started is consistent with the background color of the interface of the social application to avoid flickering. Fig.16 The software structure shown in the figure introduces the process, that is, introduces Fig.17 A possible implementation process of the corresponding embodiment. Fig. 20 As shown, the process is as follows: S1. Social application display interface 1.
[0165] S2. The desktop launcher receives a swipe-up operation on the social application.
[0166] S3. The desktop launcher responds to the upward sliding operation, returns to the desktop through the window manager, and runs the social application in the background.
[0167] Among them, S1-S3 introduces the process of social application retreating to the background, and the process can refer to the relevant introduction of S301-S302 above.
[0168] S4. The window manager reads information about the current system color mode of the mobile phone from the setting database, wherein the system color mode is a light color mode.
[0169] The setting database stores information about the color mode (i.e., the system color mode) that the mobile phone is currently in. When the color mode of the mobile phone changes, the information about the color mode stored in the setting database will also be updated synchronously. In addition, the process of determining the system color mode of the mobile phone described in S4 can refer to the relevant description of the above S303.
[0170] S5. The window manager determines the type of interface 1. The type of interface 1 is a non-immersive interface, a non-surface view type immersive interface, or a surface view type immersive interface.
[0171] S6. The window manager sends the type of interface 1 to the layer compositor.
[0172] The type of interface 1 may also be referred to as the state of interface 1. When the social application retreats to the background, the window manager may determine the state of interface 1 displayed by the social application, and send the state of interface 1 to surfaceflinger, so that surfaceflinger may determine a screenshot result including the actual background of interface 1 by using the state of interface 1.
[0173] S7. When the type of interface 1 is a non-immersive interface, the layer compositor takes a screenshot of interface 1 to obtain a screenshot result.
[0174] In an embodiment of the present application, when the type of interface 1 is a non-immersive interface, it indicates that the background displayed by interface 1 is the actual background of interface 1 and is not completely covered by the displayed content. Therefore, surfaceflinger can directly take a screenshot of interface 1 and use the screenshot as a screenshot result for identifying the color mode of interface 1 using the screenshot result.
[0175] S8. When the type of interface 1 is an immersive interface of a surface view type, the layer synthesizer analyzes the layers of interface 1 and uses the layers of interface 1 except the surface view layer as the background layers of interface 1.
[0176] S9. The layer synthesizer takes a screenshot of the background layer of interface 1 to obtain a screenshot result.
[0177] S10. When the type of interface 1 is an immersive interface of a non-surface view type, the layer synthesizer analyzes the layers of interface 1 and uses the layers of interface 1 except the topmost layer as the background layers of interface 1.
[0178] S11. The layer synthesizer takes a screenshot of the background layer of interface 1 to obtain a screenshot result.
[0179] S7-S11 above introduce the process of determining the screenshot result of interface 1. The following will continue to introduce the process of determining the background color value of interface 1 based on the screenshot result.
[0180] S12. After obtaining the screenshot result, the layer compositor sends the screenshot result to the window manager.
[0181] S13. The window manager determines the background color value of the screenshot result to obtain the background color value of interface 1.
[0182] The process of determining the type of interface 1 and taking a screenshot based on the type of interface 1 introduced in S5-S13, so as to determine the background color value of interface 1 by using the screenshot, can refer to the relevant contents of S304-S311 above.
[0183] S14: The window manager determines a color mode of the social application based on the background color value of the interface 1. The color mode of the social application is a dark color mode.
[0184] S15. The window manager sets the background color of the startup window to a color corresponding to the dark mode.
[0185] Exemplarily, the window manager determines that the color mode of the social application is inconsistent with the system color mode, and modifies the background color of the launch window to set the background color of the launch window to the color corresponding to the color mode of the social application. For example, if the color mode of the social application is a dark mode, and the color corresponding to the dark mode is black, the window manager can set the background color of the launch window to black.
[0186] Among them, the specific implementation process of S14-S15 can refer to the relevant content of the above S312-S313, which will not be repeated here.
[0187] S16. In response to the user's operation of clearing the social application card displayed in the background, the recent task module deletes the social application card and the social application activity, but does not delete the social application process.
[0188] The implementation process of S16 may refer to the relevant content of S316 above.
[0189] S17. In response to a user clicking operation on the icon of the social application, the desktop launcher launches the social application through the window manager.
[0190] S18. When there is a process of the social application but no activity of the social application, the window manager displays a startup window with a background color corresponding to the dark mode.
[0191] In an embodiment of the present application, the window manager draws a startup window whose background color is the color corresponding to the dark mode, and displays the startup window through the social application. The startup window is not provided by the social application.
[0192] S19: The window manager creates an activity of the social application to draw interface 2. The background color of interface 2 is a color corresponding to the dark mode.
[0193] In the embodiment of the present application, during the display of the startup window, the window manager can draw the interface 2 based on the recreated activity.
[0194] S20. After the startup is completed, the social application displays interface 2.
[0195] Among them, interface 2 is an interface provided by the social application. After interface 2 is drawn, the social application can display interface 2. In addition, the warm start process introduced in S17-S20 can refer to the relevant content of S317-S318 above, which will not be repeated here.
[0196] It should be noted that the above is an example of how to modify the background color of the startup window when the color mode of the application is inconsistent with the system color mode, using the color mode of the social application as a dark mode and the system color mode as a light mode. Of course, the inconsistency may also be that the color mode of the social application is a light mode and the system color mode is a dark mode. However, the process of modifying the background color of the startup window in any inconsistency is similar to the process of modifying the background color of the startup window described above. That is to say, the above-mentioned system color mode can be called the first color mode, and the color mode of the social application can be called the second color mode. The first color mode can be a dark mode or a light mode, and the second color mode can also be a light mode or a dark mode. When the first color mode is different from the second color mode, the background color of the above-mentioned startup window is modified.
[0197] In addition, dark mode and light mode are only examples of display modes, and the display mode may include not only dark mode and light mode, but also other color modes. Of course, the display mode may also be other modes, but include multiple color modes. And the above social application is only an example, and other applications may also involve warm start. Therefore, this application does not limit the application (or referred to as the first application).
[0198] It should be noted that the operations performed by the software modules in the above mobile phone (such as the above desktop launcher, recent task module, window manager, surfaceflinger, etc.) can also be operations performed by other software modules, and this application does not limit the software modules that perform the above steps. In addition, the operations performed by the software modules are actually performed by the mobile phone, that is, the executor of the technical solution introduced in this application is the mobile phone.
[0199] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. It is understandable that in order to realize the above functions, the electronic device includes a hardware structure and / or software module corresponding to each function. In combination with the units and algorithm steps of each example described in the embodiment disclosed in this application, the embodiment of the present application can be implemented in the form of hardware or a combination of hardware and computer software.
[0200] Whether a function is executed in hardware or in a computer-driven hardware manner depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the technical solution of the embodiment of the present application.
[0201] The present application is an embodiment that can divide the functional modules of the electronic device according to the above method example. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of units in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0202] like Fig.21 1 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 1000 can be used to implement the methods performed by the electronic devices described in the above method embodiments. For example, the electronic device 1000 may include a processing unit 1001, a communication unit 1002, and a display unit 1003. The processing unit 1001 is used to support the electronic device 1000 to perform Figures 1 to 20 The processing function of any of the electronic devices described above, the communication unit 1002 is used to support the communication function of the electronic device 1000. The display unit 1003 is used to support the display function of the electronic device 1000.
[0203] Optional, Fig.21 The electronic device 1000 shown may also include a storage unit ( Fig.21 ), the storage unit stores a program or instruction. When the processing unit 1001 executes the program or instruction, Fig.21 The electronic device 1000 shown can execute the method described in the above method embodiment.
[0204] Fig.21 The technical effects of the electronic device 1000 shown can refer to the technical effects described in the above method embodiment, and will not be repeated here. Fig.21 The processing unit 1001 involved in the electronic device 1000 shown can be implemented by a processor or a processor-related circuit component, which can be a processor or a processing module. The communication unit 1002 can be implemented by a transceiver or a transceiver-related circuit component, which can be a transceiver or a transceiver module. The display unit 1003 can be implemented by display screen-related components.
[0205] The present application also provides a chip system, such as Fig. 22As shown, the chip system includes at least one processor 1101 and at least one interface circuit 1102. The processor 1101 and the interface circuit 1102 can be interconnected through lines. For example, the interface circuit 1102 can be used to receive signals from other devices. For another example, the interface circuit 1102 can be used to send signals to other devices (such as processor 1101). Exemplarily, the interface circuit 1102 can read instructions stored in the memory and send the instructions to the processor 1101. When the instructions are executed by the processor 1101, the electronic device can execute the various steps performed by the electronic device in the above embodiment. Of course, the chip system can also include other discrete devices, which are not specifically limited in the embodiments of the present application.
[0206] 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.
[0207] Optionally, the memory in the chip system may be one or more. The memory may be integrated with the processor or may be separately provided with the processor, which is not limited in 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 provided on different chips. The present application does not specifically limit the type of memory and the arrangement of the memory and the processor.
[0208] Exemplarily, the chip system can 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.
[0209] 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.
[0210] An embodiment of the present application also provides a computer storage medium, which stores computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the warm start method described in the above method embodiment, that is, the application start method.
[0211] An embodiment of the present application provides a computer program product, which includes: a computer program or instructions, when the computer program or instructions are executed on an electronic device, the electronic device executes the warm start method described in the above method embodiment.
[0212] In addition, the embodiment of the present application also provides a device, which can be a chip, component or module, and the device may include a connected processor and memory; wherein the memory is used to store computer-executable instructions, and when the device is running, the processor can execute the computer-executable instructions stored in the memory, so that the device executes the warm start method in the above-mentioned method embodiments. Among them, the electronic device, computer storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding method provided above, so the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be repeated here.
[0213] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0214] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The various embodiments can be combined with each other or referenced to each other without conflict. The device embodiments described above are merely schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0215] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0216] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0217] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0218] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for starting an application, characterized in that: Applied to an electronic device, the display mode of the electronic device is a first color mode, and the method includes: Receive a first operation; wherein the first operation is used to trigger the start of a first application, the display mode of the first application is a second color mode, and the second color mode is different from the first color mode; In response to the first operation, when there is a process of the first application and there is no activity of the first application, displaying a startup window in a first color, wherein the first color matches the second color mode; In response to the startup window ceasing to be displayed, the first interface of the first application is displayed in a second color, where the second color matches the second color mode.
2. The method according to claim 1, characterized in that Before receiving the first operation, the method further includes: Displaying a second interface of the first application; Determining a display mode of the first application based on an interface state when the second interface is displayed; The step of displaying the startup window in the first color includes: The startup window is displayed in a color that matches the determined display mode of the first application.
3. The method according to claim 2, characterized in that The determining the display mode of the first application based on the interface state when the second interface is displayed includes: Based on the interface state when the second interface is displayed, taking a screenshot of the second interface to obtain a screenshot result of the second interface; wherein the screenshot result of the second interface includes a background of the second interface; Based on the background color value of the screenshot result, a display mode of the first application is determined.
4. The method according to claim 3, characterized in that The interface state when displaying the second interface includes: whether the electronic device displays a status bar when displaying the second interface; When the interface state is that the status bar is displayed, the screenshot result of the second interface includes all layers of the second interface; When the interface status is that the status bar is not displayed, the screenshot result of the second interface includes the background layer of the second interface.
5. The method according to claim 4, characterized in that In the case where the second interface includes a surface view surfaceview layer, the background layer includes layers other than the surfaceview layer in the second interface; When the second interface does not include a surfaceview layer, the background layer includes layers other than the topmost layer in the second interface.
6. The method according to any one of claims 3 to 5, characterized in that The display mode of the first application can be set to the first color mode or the second color mode; The determining the display mode of the first application based on the background color value of the screenshot result includes: In a case where the background color value matches the first color mode, determining that the display mode of the first application is the first color mode; When the background color value matches the second color mode, it is determined that the display mode of the first application is the second color mode.
7. The method according to claim 6, characterized in that The background color value matches the first color mode including that the difference between the background color value and the color threshold corresponding to the first color mode falls within the difference range corresponding to the first color mode, the difference between the background color value and the color threshold corresponding to the second color mode does not fall within the difference range corresponding to the second color mode, the background color value falls within the color value range corresponding to the first color mode, or the background color value does not fall within the color value range corresponding to the second color mode.
8. The method according to any one of claims 2 to 5, characterized in that The determining the display mode of the first application based on the interface state when the second interface is displayed includes: Receiving a second operation; wherein the second operation is used to trigger the first application to run in the background; In response to the second operation, a display mode of the first application is determined based on an interface state when the second interface is displayed.
9. An electronic device, characterized in that: The electronic device includes a display screen, a memory and one or more processors; the display screen, the memory and the processor are coupled; the display screen is used to display an image generated by the processor, and the memory is used to store computer program code, and the computer program code includes computer instructions; when the processor executes the computer instructions, the electronic device executes the startup method of the application described in any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that: The invention comprises computer instructions, and when the computer instructions are executed on an electronic device, the electronic device executes the method for starting the application according to any one of claims 1 to 8.
11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for starting the application according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Application launching method and terminal
CN105630550A
Display mode adjustment method and device
CN106610808A
Application startup optimization method and apparatus, storage medium and intelligent terminal
CN107748686A
Display mode switching method and device, electronic equipment and medium
CN115484345A
Mode switching method and device, electronic equipment and computer readable storage medium
CN115866114A
