CN117707715A - Application management method and electronic device - Google Patents

Application management method and electronic device Download PDF

Info

Publication number
CN117707715A
CN117707715A CN202310610213.5A CN202310610213A CN117707715A CN 117707715 A CN117707715 A CN 117707715A CN 202310610213 A CN202310610213 A CN 202310610213A CN 117707715 A CN117707715 A CN 117707715A
Authority
CN
China
Prior art keywords
application program
application
electronic device
state
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310610213.5A
Other languages
Chinese (zh)
Inventor
吕阳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202310610213.5A priority Critical patent/CN117707715A/en
Publication of CN117707715A publication Critical patent/CN117707715A/en
Pending legal-status Critical Current

Links

Landscapes

  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the application is applicable to the technical field of data processing, and provides a management method of an application program and electronic equipment, wherein the method comprises the following steps: determining whether the first application program creates a virtual screen, if the first application program creates the virtual screen, stopping performing layer composition processing on an image of the virtual screen when the electronic device is in a first state, and then performing first processing on the first application program, wherein the first state refers to that the electronic device stops outputting first information through the first application program, the first processing refers to that the process of the first application program is interrupted, and when the electronic device stops outputting the first information through the first application program, the electronic device is equivalent to a state that the first application program is not perceived by a user, the electronic device stops performing layer composition processing on the image of the virtual screen, and then interrupts the process of the first application program, so that the problem that the electronic device is black screen or restarted due to the problem of a system process can be avoided.

Description

Application management method and electronic device
Technical Field
The present application relates to the field of data processing, and more particularly, to a management method of an application program and an electronic device.
Background
At present, most Application programs (apps) support the functions of virtual screens. Wherein, the virtual screen refers to a virtual interface created and destroyed by the application. Wherein the interface of the virtual screen is typically not a display interface that is actually displayed by the electronic device.
It should be understood that, before each frame of image is sent and displayed by the electronic device in the process of displaying the display interface of the application program, image synthesis is required to be performed on the data to be displayed by a layer synthesis (surface eflinger) module, so as to obtain a synthesized image, and then the synthesized image is sent to the display screen to be displayed. If the application program creates the virtual screen, the surfeflinger module also needs to perform image layer combination processing on the data to be displayed corresponding to the virtual screen to obtain a synthesized image, then the synthesized image is sent to the application program, and the application program determines the purpose of the synthesized image. For example, the application may send the synthesized image to the projection device to cause the projection device to display the synthesized image. Alternatively, the application may encode the synthesized image, generate a file in video format, and store the file. However, when an application program that creates a virtual screen is turned into background operation, the electronic device typically performs interrupt processing on a thread corresponding to the application program to reduce the CPU load. In this case, since the application program creates the virtual screen, the system process in the electronic device still needs to interact with the application program frequently, which may cause a problem in the system process, and further cause a problem in that the electronic device is turned on or turned off.
Based on this, how to avoid the problem of black screen or restarting of the electronic device when the application program that creates the virtual screen is turned into the background running becomes a problem to be solved.
Disclosure of Invention
The application program management method can avoid the problem of black screen or restarting of the electronic equipment when the application program creating the virtual screen is converted into background operation.
In a first aspect, a method for managing an application program is provided, where the method is applied to an electronic device, and the electronic device includes a first application program, and includes:
determining whether the first application program creates a virtual screen;
if the first application program creates the virtual screen, stopping performing image layer composition processing on the image of the virtual screen when the electronic equipment is in a first state, wherein the first state refers to that the electronic equipment stops outputting first information through the first application program, and the type of the first information comprises audio, pictures, video and/or vibration;
a first process is performed on the first application, the first process being a process of interrupting a process of the first application.
The application program management method is applied to electronic equipment and comprises the steps of determining whether a first application program creates a virtual screen or not, stopping image layer synthesis processing on an image of the virtual screen when the electronic equipment is in a first state if the first application program creates the virtual screen, and then performing first processing on the first application program, wherein the first state refers to the fact that the electronic equipment stops outputting first information through the first application program, the type of the first information comprises audio, pictures, videos and/or vibration, the first processing refers to the process of interrupting the process of the first application program, when the electronic equipment stops outputting information of the audio type, the picture type, the video type and/or the vibration type through the first application program, the electronic equipment is equivalent to a state that the first application program is not perceived by a user, in this case, the electronic equipment stops performing image layer synthesis processing on the image of the virtual screen first application program first time, and then interrupts the process of the first application program, so that the problem that the system frequently interacts with the first application program due to the fact that the image layer synthesis processing is performed on the image of the virtual screen is frequently performed on the first application program is solved, and the problem that the system frequently interacts with the first application program is frequently interacted with the first application program is avoided, and the problem that the system frequently interacts with the first application program is avoided due to the fact that the system is restarted is solved, and the system is prevented from the problem is caused by the system is further caused to the system is frequently restart.
With reference to the first aspect, in some embodiments of the first aspect, the method further includes: when the electronic equipment is converted from the first state to the second state, the image of the virtual screen is restored to be subjected to image layer combination processing, and the second state refers to that the electronic equipment restores to output first information through the first application program; and performing second processing on the first application program, wherein the second processing refers to processing for recovering the process of the first application program.
The application program management method is applied to electronic equipment and comprises the steps of determining whether a first application program creates a virtual screen, stopping performing layer combination processing on an image of the virtual screen when the electronic equipment is in a first state, and then performing first processing on the first application program, wherein the first state refers to the fact that the electronic equipment stops outputting first information through the first application program, the type of the first information comprises audio, pictures, videos and/or vibration, the first processing refers to the process of interrupting the first application program, when the electronic equipment is converted from the first state to the second state, the image of the virtual screen is restored to be subjected to layer combination processing, then the first application program is subjected to second processing, the second processing refers to the process of restoring the first application program, the second state refers to the process of restoring the first application program, namely, the process of restoring the first application program, the first application program in the electronic equipment is stopped outputting first information, the first information is not perceived by the first application program, the first state (namely, when the first application program is converted from the first state to the first state, the first application program is not defrosted, the image is restored to the first application program, and the image is prevented from being defrosted before the first application program is subjected to the first state, and the image is restored to the virtual screen, and the image is not defrosted.
With reference to the first aspect, in some embodiments of the first aspect, the electronic device further includes a second application, and the second state includes a state in which the second application requests communication with the first application.
With reference to the first aspect, in some embodiments of the first aspect, the second state includes a state in which the first application transitions from a background run to a foreground run.
With reference to the first aspect, in some embodiments of the first aspect, the second state includes a state in which the electronic device transitions from off-screen to on-screen.
With reference to the first aspect, in some embodiments of the first aspect, the electronic device further includes a third application and an image synthesis surface efliger module, where the third application is configured to manage the first application, and the image synthesis module is configured to perform layer synthesis processing, stop performing layer synthesis processing on an image of the virtual screen when the electronic device is in the first state, and include: when the electronic equipment is in a first state, the third application program sends a first instruction to the surface eFlinger module, wherein the first instruction is used for instructing the surface eFlinger module to stop performing layer composition processing on the image of the virtual screen; the SurfaceFlinger module stops performing layer composition processing on the image of the virtual screen in response to the first instruction.
With reference to the first aspect, in some embodiments of the first aspect, performing a first process on the first application includes: the third application program sends a second instruction to the first application program, wherein the second instruction is used for indicating to interrupt the process of the first application program; the first application program responds to the second instruction and interrupts the process of the first application program.
With reference to the first aspect, in some embodiments of the first aspect, the electronic device includes a third application and an image synthesis surfeflinger module, where the third application is configured to manage the first application, the image synthesis module is configured to perform layer synthesis processing, and when the electronic device transitions from the first state to the second state, resume performing layer synthesis processing on an image of the virtual screen, and the method includes:
when the electronic equipment is converted from the first state to the second state, the third application program sends a third instruction to the SurfaceFlinger module, wherein the third instruction is used for instructing the SurfaceFlinger module to resume the image layer composition processing of the image of the virtual screen; and responding to the third instruction, and recovering the image of the virtual screen to perform layer composition processing by the surface eFinger module.
The method comprises the steps that the display manager determines whether the first application program creates a virtual screen or not, the window manager determines whether the electronic device is in a first state or not under the condition that the first application program creates the virtual screen, and then when the electronic device is in the first state, a first instruction for indicating stopping of layer composition processing on an image of the virtual screen is sent to the surface eFinger module through the power saving agent, then a second instruction for indicating interruption of the process of the first application program is sent to the first application program through the power saving agent, and after the process of the first application program is interrupted, image composition processing on the virtual screen is stopped, the window manager determines whether the electronic device is in the first state or not, and further when the electronic device is in the first state, the first instruction for indicating stopping of layer composition processing on the image of the virtual screen is sent to the surface eFinger module through the power saving agent, and then the second instruction for indicating interruption of the process of the first application program is sent to the first application program through the power saving agent.
With reference to the first aspect, in some embodiments of the first aspect, performing a second process on the first application includes: the third application program sends a fourth instruction to the first application program, wherein the fourth instruction is used for indicating a process for recovering the first application program; and the first application program responds to the fourth instruction, and the process of the first application program is restored.
The application program management method provided by the embodiment of the application program is applied to electronic equipment, the electronic equipment comprises a first application program, a second application program, an application program electricity-saving eidolon, an image synthesis SurfaceFlinger module, a display manager and a window manager, in the process of thawing the first application program, the window manager determines that the first application program is changed from background operation to front operation, or the window manager determines that the electronic equipment is changed from off screen to on screen operation, or when the second application program requests to establish communication connection with the first application program, the electricity-saving eidolon firstly sends an instruction for instructing the SurfaceFlinger module to carry out image layer composition processing on the image of the virtual screen, and then sends an instruction for recovering the progress of the first application program to the first application program, so that before thawing the first application program, the image of the virtual screen is subjected to image layer composition processing, namely, when the first application program is thawed, the electronic equipment can acquire the image of the virtual screen, or the electronic equipment can acquire the image of the virtual screen, and the real-time problem of the virtual screen can not be avoided when the first application program is thawed.
In a second aspect, there is provided an application management apparatus comprising means for performing any of the methods of the first aspect. The device can be a server, terminal equipment or a chip in the terminal equipment. The apparatus may include an input unit and a processing unit.
When the apparatus is a terminal device, the processing unit may be a processor, and the input unit may be a communication interface; the terminal device may further comprise a memory for storing computer program code which, when executed by the processor, causes the terminal device to perform any of the methods of the first aspect.
When the device is a chip in the terminal device, the processing unit may be a processing unit inside the chip, and the input unit may be an output interface, a pin, a circuit, or the like; the chip may also include memory, which may be memory within the chip (e.g., registers, caches, etc.), or memory external to the chip (e.g., read-only memory, random access memory, etc.); the memory is for storing computer program code which, when executed by the processor, causes the chip to perform any of the methods of the first aspect.
In one possible implementation, the memory is used to store computer program code; a processor executing the computer program code stored in the memory, the processor, when executed, configured to perform:
in a third aspect, there is provided a computer-readable storage medium storing computer program code which, when executed by a management apparatus of an application program, causes the management apparatus of the application program to execute the management method of any one of the application programs of the first aspect.
In a fourth aspect, there is provided a computer program product comprising: computer program code which, when run by the management apparatus of the application, causes the management apparatus of the application to perform any of the apparatus methods of the first aspect.
The application program management method is applied to electronic equipment and comprises the steps of determining whether a first application program creates a virtual screen or not, stopping image layer synthesis processing on an image of the virtual screen when the electronic equipment is in a first state if the first application program creates the virtual screen, and then performing first processing on the first application program, wherein the first state refers to the fact that the electronic equipment stops outputting first information through the first application program, the type of the first information comprises audio, pictures, videos and/or vibration, the first processing refers to the process of interrupting the process of the first application program, when the electronic equipment stops outputting information of the audio type, the picture type, the video type and/or the vibration type through the first application program, the electronic equipment is equivalent to a state that the first application program is not perceived by a user, in this case, the electronic equipment stops performing image layer synthesis processing on the image of the virtual screen first application program first time, and then interrupts the process of the first application program, so that the problem that the system frequently interacts with the first application program due to the fact that the image layer synthesis processing is performed on the image of the virtual screen is frequently performed on the first application program is solved, and the problem that the system frequently interacts with the first application program is frequently interacted with the first application program is avoided, and the problem that the system frequently interacts with the first application program is avoided due to the fact that the system is restarted is solved, and the system is prevented from the problem is caused by the system is further caused to the system is frequently restart.
Drawings
FIG. 1 is a schematic diagram of a hardware system suitable for use with the electronic device of the present application;
FIG. 2 is a schematic diagram of a software system suitable for use with the electronic device of the present application;
fig. 3 is a schematic diagram of an application scenario provided in an embodiment of the present application;
fig. 4 is a flowchart of a method for managing an application according to an embodiment of the present application;
fig. 5 is a flowchart of a method for managing an application according to an embodiment of the present application;
FIG. 6 is a flowchart illustrating a method for managing an application according to an embodiment of the present application;
fig. 7 is a flowchart of a method for managing an application according to an embodiment of the present application;
FIG. 8 is a schematic diagram of an application management device provided herein;
fig. 9 is a schematic diagram of an electronic device for managing an application provided herein.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. Wherein, in the description of the embodiments of the present application, "/" means or is meant unless otherwise indicated, for example, a/B may represent a or B; "and/or" herein is merely an association relationship describing an association object, and means that three relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist together, and B exists alone. In addition, in the description of the embodiments of the present application, "plurality" means two or more than two.
The terms "first," "second," "third," and the like, are used below for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first", "a second", or a third "may explicitly or implicitly include one or more such feature.
For ease of understanding, the description of the concepts related to the embodiments of the present application is given in part by way of example for reference.
1. Virtual screen
A virtual screen may refer to a virtually displayed interface that is created and destroyed by an application in an electronic device. The virtual screen may be the same as or different from the interface content displayed by the electronic device, which is not limited in the embodiments of the present application.
It should be appreciated that prior to displaying the interface on the display screen, the electronic device typically performs a layer composition process on the content to be displayed through a layer composition (surfeflinger) module, and then sends the composite image to the display screen for display. Similarly, after the application program creates the virtual screen, the image layer of the virtual screen is also subjected to image layer combination processing, so as to obtain a combined image, namely an interface of the virtual screen. However, the interface of the virtual screen is not usually displayed, and the application program may store the interface of the virtual screen as a video file or an image file, or may send the interface of the virtual screen to the screen-throwing device, so that the screen-throwing device displays the interface of the virtual screen.
The screen recording program for recording the screen can create a virtual screen based on the currently displayed interface, copy the currently displayed interface to obtain the interface of the virtual screen, and store the interface of the virtual screen as a video file to realize the recording function of the current interface.
2. Application freezing
In order to reduce the load of the central processing unit (central processing unit, CPU), the electronic device may interrupt the process of the application program when the application program is in a state not perceived by the user, so as to reduce the load of the CPU and further reduce the power consumption of the electronic device. The state in which the electronic device interrupts the progress of an application while the application is not perceived by the user is referred to as freezing of the application. Wherein, the application program not being perceived by the user may mean that the application program does not output information outwards, so that the user cannot perceive that the application program is in a working state, and specifically may include: the application does not output an audio signal, a video signal, or the application does not control the electronic device to vibrate, or the application does not download data, or the application does not output navigation information to the user.
At present, an application program acquires related data of a frame image to be displayed, and the related data of the frame image to be displayed is processed according to a fixed flow and is sent to a display screen for display. The fixed flow mainly comprises a drawing and rendering flow, a diagram layer synthesizing flow and a sending and displaying flow. That is, for a certain frame of image, the electronic device needs to sequentially execute a drawing rendering process, a diagram layer synthesizing process and a sending process before displaying the image on the display screen. The layer composition process may be implemented by a layer composition (surfeflinger) module.
It should be understood that in the case where the application program creates a virtual screen, a drawing rendering flow, a diagram layer composition flow, and a send-display flow are performed once for the relevant data displayed on the display screen. For the related data of the virtual screen, a drawing rendering flow and a diagram synthesizing flow are executed, the synthesized image is not executed to be sent to the displaying flow, and the application program generally determines the purpose of the synthesized image.
For example, the application may send the synthesized image to the projection device to cause the projection device to display the synthesized image. Alternatively, the application may encode the synthesized image, generate a file in video format, and store the file. However, when the application program with the virtual screen created is in a state not perceived by the user (for example, the application program is turned into background running), the electronic device generally performs interrupt processing on a thread corresponding to the application program, so as to reduce the load of the CPU, and further reduce the power consumption of the electronic device. In this case, since the application program creates the virtual screen, the system process in the electronic device still needs to interact with the application program frequently, which may cause a problem in the system process, and thus cause a problem in the electronic device of blacking out or restarting.
In view of this, the embodiment of the application provides a management method of an application program, which is applied to an electronic device, and includes determining whether a first application program creates a virtual screen, if the first application program creates the virtual screen, stopping performing layer composition processing on an image of the virtual screen when the electronic device is in a first state, and then performing first processing on the first application program, where the first state refers to that the electronic device stops outputting first information through the first application program, the type of the first information includes audio, picture, video and/or vibration, the first processing refers to a process of interrupting a process of the first application program, when the electronic device stops outputting information of an audio type, a picture type, a video type and/or vibration type through the first application program, which is equivalent to a state that the first application program is not perceived by a user, in this case, the electronic device stops performing layer composition processing on the image of the virtual screen first application program, and then interrupts the process of the first application program, so that after the process of the first application program is interrupted, a problem that a system frequently interacts with the first application program due to the layer composition processing on the image of the virtual screen is also performed, and a system frequently interacts with the first application program is avoided, and a problem that the system frequently interacts with the first application program is frequently caused by restarting the system, and the system is avoided.
The application program management method provided by the embodiment of the application program can be applied to electronic equipment. Optionally, the electronic device includes a terminal device, which may also be referred to as a terminal (terminal), a User Equipment (UE), a Mobile Station (MS), a Mobile Terminal (MT), and so on. The terminal device may be a mobile phone, a smart television, a wearable device, a tablet (Pad), a computer with wireless transceiving function, a Virtual Reality (VR) terminal device, an augmented reality (augmented reality, AR) terminal device, a wireless terminal in industrial control (industrial control), a wireless terminal in unmanned driving (self-driving), a wireless terminal in teleoperation (remote medical surgery), a wireless terminal in smart grid (smart grid), a wireless terminal in transportation safety (transportation safety), a wireless terminal in smart city (smart city), a wireless terminal in smart home (smart home), or the like. The embodiment of the application does not limit the specific technology and the specific equipment form adopted by the terminal equipment.
By way of example, fig. 1 shows a schematic diagram of an electronic device 100. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, keys 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identity module (subscriber identification module, SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It is to be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, electronic device 100 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller may be a neural hub and a command center of the electronic device 100, among others. The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface, among others.
It should be understood that the interfacing relationship between the modules illustrated in the embodiments of the present application is only illustrative, and does not limit the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also use different interfacing manners, or a combination of multiple interfacing manners in the foregoing embodiments.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The electronic device 100 implements display functions through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The display screen 194 is used to display images, videos, and the like. The display 194 includes a display panel. The display panel may employ a liquid crystal display (liquid crystal display, LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED) or an active-matrix organic light-emitting diode (matrix organic light emitting diode), a flexible light-emitting diode (flex), a mini, a Micro led, a Micro-OLED, a quantum dot light-emitting diode (quantum dot light emitting diodes, QLED), or the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, N being a positive integer greater than 1.
The electronic device 100 may implement photographing functions through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
The electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playing, recording, etc.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration alerting as well as for touch vibration feedback. For example, touch operations acting on different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 191 may also correspond to different vibration feedback effects by touching different areas of the display screen 194. Different application scenarios (such as time reminding, receiving information, alarm clock, game, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
It should be noted that any of the electronic devices mentioned in the embodiments of the present application may include more or fewer modules in the electronic device 100.
The software system of the electronic device 100 may employ a layered architecture, an event driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. In this embodiment, taking an Android system with a layered architecture as an example, a software structure of the electronic device 100 is illustrated.
Fig. 2 is a software configuration block diagram of the electronic device 100 according to the embodiment of the present application.
The layered architecture of the electronic device 100 divides the software into several layers, each with a distinct role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, from top to bottom, an application layer, an application framework layer, an Zhuoyun row (Android run) and system libraries, and a kernel layer, respectively.
The application layer may include a series of application packages.
As shown in fig. 2, the application package may include applications for cameras, gallery, calendar, phone calls, maps, navigation, WLAN, bluetooth, music, video, short messages, power saving demons, etc.
Wherein the power saving puck may be used to manage individual applications.
For example, when the "map" application is shifted to background operation, the power saving puck may interrupt the process of the "map" application to reduce the load of the CPU and thus reduce the power consumption of the electronic device. When the map application program is changed from the background operation to the foreground operation, the power saving eidolon can restore the process of the map application program so that the map application program can normally operate.
The application framework layer provides an application programming interface (application programming interface, API) and programming framework for application programs of the application layer. The application framework layer includes a number of predefined functions.
As shown in FIG. 2, the application framework layer may include a window Manager, a content provider, a view system, a phone Manager, a resource Manager, a notification Manager, a Display Manager, a layer composition SurfaceFlinger module, and so on.
The window manager is used for managing window programs. The window manager can acquire the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
The window manager may also determine whether the application is in a state that is not perceived by the user based on the change in the display screen.
The display manager may be used to determine whether the application program created a virtual screen.
The SurfaceFlinger module is configured to execute a layer composition flow upon receiving a layer composition trigger signal.
For example, the surfeflinger module may execute a layer composition flow upon receiving a layer composition trigger signal, generating an image of an interface displayed on a physical screen.
For another example, the surfeflinger module may execute a layer composition flow upon receiving a layer composition trigger signal to generate an image at an interface of the virtual screen.
The content provider is used to store and retrieve data and make such data accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebooks, etc.
The view system includes visual controls, such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, a display interface including a text message notification icon may include a view displaying text and a view displaying a picture.
The telephony manager is used to provide the communication functions of the electronic device 100. Such as the management of call status (including on, hung-up, etc.).
The resource manager provides various resources for the application program, such as localization strings, icons, pictures, layout files, video files, and the like.
The notification manager allows the application to display notification information in a status bar, can be used to communicate notification type messages, can automatically disappear after a short dwell, and does not require user interaction. Such as notification manager is used to inform that the download is complete, message alerts, etc. The notification manager may also be a notification in the form of a chart or scroll bar text that appears on the system top status bar, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, a text message is prompted in a status bar, a prompt tone is emitted, the electronic device vibrates, and an indicator light blinks, etc.
Android run time includes a core library and virtual machines. Android run time is responsible for scheduling and management of the Android system.
The core library consists of two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. The virtual machine executes java files of the application program layer and the application program framework layer as binary files. The virtual machine is used for executing the functions of object life cycle management, stack management, thread management, security and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface manager (surface manager), media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., openGL ES), 2D graphics engines (e.g., SGL), etc.
The surface manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
Media libraries support a variety of commonly used audio, video format playback and recording, still image files, and the like. The media library may support a variety of audio video encoding formats, such as: MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, etc.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
The 2D graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The kernel layer at least comprises a display driver, a camera driver, an audio driver, a sensor driver, a Wi-Fi driver and the like.
It should be noted that, the electronic device according to the embodiment of the present application may include more or fewer modules in the electronic device.
The application scenario provided by the embodiment of the application is described below with reference to the accompanying drawings.
Fig. 3 is an application scenario schematic diagram of a method for managing an application program according to an embodiment of the present application. As shown in fig. 3 (a), the user clicks on the application program "screen recording" 10, and the application program that the mobile phone starts to run is "screen recording". In order to allow a user to more intuitively view the recorded interface, a "screen recording" typically creates a virtual screen so that the user can observe the recorded content. The user then slides up as shown in fig. 3 (b). Responding to the sliding operation of the user, the mobile phone displays a display interface of the application program 'video playing', and starts recording the current interface through 'screen recording'. At this time, the interface being displayed is the interface of "video play", but it corresponds to the virtual screen created by "screen recording", and "screen recording" goes into background operation, as shown in (c) of fig. 3. Wherein, compared with the interface of video playing, the control 20 and the control 30 for indicating that the screen is being recorded are added on the display interface of the virtual screen created by the screen recording. In this case, since the "screen recording" creates the virtual screen, when the "screen recording" is shifted to the background operation, the system process in the electronic device may then frequently perform data interaction with the virtual screen, which may cause the electronic device to be in a black screen or dead state, as shown in (d) of fig. 3. The application program management method provided by the embodiment of the application program can avoid the situation.
It should be understood that the foregoing is illustrative of an application scenario, and is not intended to limit the application scenario of the present application in any way.
The following describes in detail the management method of the application program provided in the embodiment of the present application with reference to fig. 4 to 7.
Fig. 4 is a flowchart of a method for managing an application program according to an embodiment of the present application, as shown in fig. 4, where the method includes:
s101, determining whether a first application program creates a virtual screen.
The first application may be an application in the electronic device capable of creating a virtual screen. For example, the first application may be "screen recording" or "haro bicycle TM ", can also be" glory VR TM By way of example, the present application is not limited in this regard.
If the first application creates a virtual screen, S102 is performed.
S102, stopping performing layer combination processing on the image of the virtual screen when the electronic equipment is in the first state.
The first state refers to that the electronic device stops outputting first information through the first application program, and the type of the first information comprises audio, pictures, video and/or vibration. Since the electronic device stops outputting the audio, picture, video and/or vibration type information through the first application, the user cannot perceive the first application. That is, the first application cannot be perceived by the user while the electronic device is in the first state.
For example, when the electronic device is in the off-screen state, the first application cannot output audio, picture, video, and/or vibration type information, and thus the first application cannot be perceived by the user. That is, the electronic device being in the first state may mean that the electronic device is in a state of off-screen.
For another example, a first application in the electronic device transitions to background operation, and the first application cannot output audio, picture, video, and/or vibration type information, and thus the first application cannot be perceived by the user. That is, the electronic device being in the first state may refer to a state in which a first application in the electronic device is running in the background.
When the electronic device is in the first state, the electronic device may interrupt a process of performing layer composition processing on the image of the virtual screen, so that the electronic device stops performing layer composition processing on the image of the virtual screen. Because the electronic device interrupts the process of performing the layer composition processing on the image of the virtual screen, the system process of the electronic device does not perform frequent data interaction between the process of the virtual screen and the first application program.
S103, performing first processing on the first application program.
Wherein the first process refers to a process of interrupting a process of the first application program.
It should be appreciated that interrupting the process of the first application corresponds to freezing the first application. According to the application program management method provided by the embodiment of the application program, when the first application program in the electronic device is not perceived by a user, the electronic device stops performing layer combination processing on the image of the virtual screen created by the first application program, and then freezes the first application program.
The application program management method is applied to electronic equipment and comprises the steps of determining whether a first application program creates a virtual screen or not, stopping image layer synthesis processing on an image of the virtual screen when the electronic equipment is in a first state if the first application program creates the virtual screen, and then performing first processing on the first application program, wherein the first state refers to the fact that the electronic equipment stops outputting first information through the first application program, the type of the first information comprises audio, pictures, videos and/or vibration, the first processing refers to the process of interrupting the process of the first application program, when the electronic equipment stops outputting information of the audio type, the picture type, the video type and/or the vibration type through the first application program, the electronic equipment is equivalent to a state that the first application program is not perceived by a user, in this case, the electronic equipment stops performing image layer synthesis processing on the image of the virtual screen first application program first time, and then interrupts the process of the first application program, so that the problem that the system frequently interacts with the first application program due to the fact that the image layer synthesis processing is performed on the image of the virtual screen is frequently performed on the first application program is solved, and the problem that the system frequently interacts with the first application program is frequently interacted with the first application program is avoided, and the problem that the system frequently interacts with the first application program is avoided due to the fact that the system is restarted is solved, and the system is prevented from the problem is caused by the system is further caused to the system is frequently restart.
In one possible scenario, when the first application program is converted from a state that is not perceived by the user to a state that is perceived by the user, that is, when the first application program is converted from the first state to the second state, the electronic device resumes the process of the first application program after performing the layer composition processing on the image of the virtual screen. The second state may be a state in which the second application requests communication with the first application, may be a state in which the first application is changed from background operation to foreground operation, or may be a state in which the electronic device is changed from off-screen to on-screen. This is explained in detail below by way of the embodiment shown in fig. 5.
Fig. 5 is a flowchart of a method for managing an application program according to another embodiment provided in the present application, as shown in fig. 5, where the method includes:
s201, determining whether a virtual screen is created by the first application program.
If the first application creates a virtual screen, S102 is performed.
And S202, stopping performing layer combination processing on the image of the virtual screen when the electronic equipment is in the first state.
The first state refers to that the electronic device stops outputting first information through the first application program, and the type of the first information comprises audio, pictures, video and/or vibration.
S203, performing first processing on the first application program, wherein the first processing refers to processing of interrupting the process of the first application program.
S204, when the electronic equipment is converted from the first state to the second state, the image layer combination processing is carried out on the image of the virtual screen.
The second state refers to a state that the electronic device resumes outputting the first information through the first application program. It should be appreciated that the type of first information may include audio, picture, video, and/or vibration, and when the electronic device resumes outputting the audio, picture, video, and/or vibration type of information through the first application, the user may perceive the information output by the first application, i.e., the first application may be perceived by the user. When the first application program is converted from a state (first state) which is not perceived by the user to a state (second state) which can be perceived by the user, the electronic device can perform layer composition processing on the image of the virtual screen, namely, a process of recovering the virtual screen.
Optionally, the second state includes a state in which the second application requests communication with the first application.
It should be understood that the second application may refer to other applications in the electronic device than the first application. When a second application requests communication to be established with a first application, it is often necessary to wake up the first application from a frozen state, i.e. to resume the process of the first application. According to the application program management method, before the first application program is awakened, image layer combination processing is conducted on the images of the virtual screen.
Optionally, the second state includes a state in which the first application transitions from background running to foreground running.
When the first application program runs in the background, the first application program usually does not output information and is in a state of being not perceived by a user; when the first application program runs in the foreground, the first application program starts to output information and is in a state of being perceived by a user. Therefore, when the first application program is changed from the background running to the foreground running, the first application program needs to be awakened from the frozen state to the normal state, that is, the process of the first application program needs to be restored. According to the application program management method, before the first application program is awakened, image layer combination processing is conducted on the images of the virtual screen.
Optionally, the second state includes a state in which the electronic device transitions from off-screen to on-screen.
Typically, when the electronic device is off-screen, the first application program will not normally output information, and is in a state of being not perceived by the user; when the electronic equipment is changed from off screen to on screen, the first application program starts to output information and is in a state perceived by a user. Therefore, when the electronic device changes from the off-screen state to the on-screen state, the first application program is usually required to be awakened from the frozen state to the normal state, that is, the process of the first application program needs to be restored. According to the application program management method, before the first application program is awakened, image layer combination processing is conducted on the images of the virtual screen.
S205, performing a second process on the first application program, where the second process is a process for recovering the process of the first application program.
It should be appreciated that restoring the process of the first application corresponds to thawing the first application. According to the application program management method provided by the embodiment of the application program, when the first application program in the electronic equipment is converted from a state not perceived by a user to a state perceived by the user, the electronic equipment firstly resumes the image of the virtual screen created by the first application program to carry out image layer combination processing, and then unfreezes the first application program.
The application program management method is applied to electronic equipment and comprises the steps of determining whether a first application program creates a virtual screen, stopping performing layer combination processing on an image of the virtual screen when the electronic equipment is in a first state, and then performing first processing on the first application program, wherein the first state refers to the fact that the electronic equipment stops outputting first information through the first application program, the type of the first information comprises audio, pictures, videos and/or vibration, the first processing refers to the process of interrupting the first application program, when the electronic equipment is converted from the first state to the second state, the image of the virtual screen is restored to be subjected to layer combination processing, then the first application program is subjected to second processing, the second processing refers to the process of restoring the first application program, the second state refers to the process of restoring the first application program, namely, the process of restoring the first application program, the first application program in the electronic equipment is stopped outputting first information, the first information is not perceived by the first application program, the first state (namely, when the first application program is converted from the first state to the first state, the first application program is not defrosted, the image is restored to the first application program, and the image is prevented from being defrosted before the first application program is subjected to the first state, and the image is restored to the virtual screen, and the image is not defrosted.
In one possible scenario, the electronic device includes an application program (corresponding to a third application program) of a "power saving eidolon", where the "power saving eidolon" can interrupt the process of other application programs (e.g., the first application program) when the other application programs are transferred to the background running, so as to reduce the power consumption of the electronic device. It should be understood that, in an electronic device to which the application program management method provided in the embodiment of the present application is applied, a software framework of the electronic device may be shown in fig. 2, where the software framework includes a first application program, a second application program, an application program "power saving eidolon", an image synthesis SurfaceFlinger module, a display manager, and a window manager. This is explained in detail below with reference to fig. 6 and 7.
Fig. 6 is a flowchart of a method for managing an application program, where the method is applied to an electronic device, and the electronic device includes a first application program, a second application program, an application program "power saving eidolon", an image synthesis SurfaceFlinger module, a display manager, and a window manager, as shown in fig. 6, and the method includes:
s301, the display manager determines whether the first application program creates a virtual screen.
If the first application creates a virtual screen, S302 is performed.
It should be appreciated that the Display Manager may be used to determine whether the application created a virtual screen. For example. The displaymanager may confirm whether the first application created the virtual screen based on whether the first application invoked the "create Virtual Display" function. If the Display Manager determines that the first application program calls the create Virtual Display function, the first application program creates a virtual screen; if the Display Manager determines that the first application does not call the "create Virtual Display" function, the first application does not create a virtual screen.
S302, the window manager determines whether the electronic device is in a first state.
The first state refers to that the electronic device stops outputting first information through the first application program, and the type of the first information comprises audio, pictures, video and/or vibration. Since the electronic device stops outputting the audio, picture, video and/or vibration type information through the first application, the user cannot perceive the first application. That is, the first application cannot be perceived by the user while the electronic device is in the first state.
If the electronic device is in the first state, S303 is executed.
It should be appreciated that when the window manager determines that the electronic device is in the first state, the window manager may send information to the "power saving puck" indicating that the electronic device is in the first state, such that the "power saving puck" performs the corresponding method steps based on the state of the electronic device.
S303, sending a first instruction to a SurfaceFlinger module by the power saving eidolon.
The first instruction may be an instruction instructing the surfeflinger module to stop performing layer composition processing on the image of the virtual screen.
"Power saving puck" may refer to an application in an electronic device for managing an application, i.e., a third application. The power saving eidolon can interrupt a process related to the first application program when the first application program is in a frozen state, so that the load of a processor of the electronic device is reduced, and the power consumption of the electronic device is further reduced. The "power saving sprite" may also resume processes associated with the first application when the first application is awakened from a frozen state, so that the first application may function properly.
It should be appreciated that when the window manager determines that the electronic device is in the first state, the window manager may send information to the "power saving puck" indicating that the electronic device is in the first state, and after the "power saving puck" receives the information, send a first instruction to the SurfaceFlinger module.
S304, responding to the first instruction by the SurfaceFlinger module, and stopping performing layer composition processing on the image of the virtual screen.
It should be appreciated that the SurfaceFlinger module stops the layer composition process on the image of the virtual screen in response to the first instruction, which is equivalent to the SurfaceFlinger module interrupting the progress of the layer composition process on the image of the virtual screen.
S305, "power saving puck" sends a second instruction to the first application.
Wherein the second instruction is for indicating a process of interrupting the first application.
After the "power saving puck" sends the first instruction to the SurfaceFlinger module, the "power saving puck" sends a second instruction to the first application indicating to interrupt the process of the first application. That is, the "power saving puck" may first send a first instruction that instructs the surfeflinger module to stop layer composition processing of the image of the virtual screen, and then send a second instruction that instructs to interrupt the process of the first application.
S306, the first application program responds to the second instruction, and the process of the first application program is interrupted.
The method comprises the steps that whether the first application program creates a virtual screen or not is determined by a Display Manager, the window Manager determines whether the electronic device is in a first state or not under the condition that the first application program creates the virtual screen, and further when the electronic device is in the first state, a first instruction for indicating stopping image layer composition processing of an image of the virtual screen is sent to the Surfacefringer module through the power saving agent, then a second instruction for indicating interrupting the process of the first application program is sent to the first application program through the power saving agent, and as the image layer composition processing of the virtual screen is stopped before interrupting the process of the first application program, the problem that the system frequently interacts with the first application program due to the fact that the first application program continues image layer composition processing of the virtual screen is carried out on the first application program is avoided, and the problem that the system frequently interacts with the first application program due to the fact that the system frequently interacts with the first application program is frequently restarted is avoided.
S307, the window manager determines whether the first application program is changed from the background operation to the foreground operation.
It should be appreciated that a window manager may be used to manage a window program. The window manager may obtain the size of the display screen, determine whether there is a status bar, lock the screen, intercept the screen, etc., to determine whether the first application is to be run from the background to the foreground according to the display content on the current display interface. Typically, the first application begins to be perceived by the user when the first application transitions from background running to foreground running.
If the first application program is changed from the background operation to the foreground operation, S311 is executed.
It should be appreciated that when the window manager determines that the first application is going from background to foreground, the window manager may send a message to the "power saving puck" indicating that the electronic device is going from off-screen to on-screen, so that the "power saving puck" performs the method steps of S311.
S308, the window manager determines whether a first operation of the user is detected.
The first operation may refer to an operation of switching the electronic device from off-screen to on-screen.
It should be appreciated that a window manager may be used to manage a window program. The window manager may obtain the size of the display screen, determine whether there is a status bar, lock the screen, intercept the screen, etc., to determine whether the electronic device transitions from off-screen to on-screen according to the display content on the current display interface. Typically, when an electronic device transitions from off-screen to on-screen, a first application running in the foreground in the electronic device begins to be perceived by the user.
If the first operation of the user is detected, S311 is performed.
It should be appreciated that when the window manager determines that the electronic device transitions from off-screen to on-screen, the window manager may send information to the "power saving puck" indicating that the electronic device transitions from off-screen to on-screen, to cause the "power saving puck" to perform the method steps of S311.
S309, the second application program sends a first request to the "power saving puck".
Wherein the first request is for indicating that the second application requests to establish communication with the first application.
It should be understood that the second application may refer to other applications in the electronic device than the first application. When the first application program is in a frozen state, the second application program needs to communicate with the first application program, and a first request for indicating the second application program to request to establish communication with the first application program needs to be sent to the power-saving eidolon.
S310, a "power saving puck" performs S311 in response to the first request.
S311, the "power saving eidolon" sends a third instruction to the SurfaceFlinger module.
The third instruction is used for indicating the SurfaceFlinger module to resume the image composition processing of the virtual screen.
S312, responding to the third instruction by the SurfaceFlinger module, and recovering to perform layer composition processing on the image of the virtual screen.
Since the SurfaceFlinger module stops the layer composition process on the image of the virtual screen when the first application is in the frozen state. Therefore, when the power-saving eidolon sends a third instruction to the surfeflinger module, the surfeflinger module resumes the graphics layer composition processing of the image of the virtual screen.
It should be understood that, the "power saving eidolon" sends the third instruction to the surfacef linger module is sent when the window manager determines that the first application program is changed from the background operation to the foreground operation, or the window manager determines that the first operation of the user is detected, or the second application program sends the first request to the "power saving eidolon", which corresponds to that when the window manager determines that the first application program is changed from the background operation to the foreground operation, the surfacef linger module resumes the image layer composition processing of the image of the virtual screen, or when the window manager determines that the first operation of the user is detected, the surfacef linger module resumes the image layer composition processing of the virtual screen, or when the second application program sends the first request to the "power saving eidolon", the surfacef linger module resumes the image layer composition processing of the image of the virtual screen.
S313, "power saving puck" sends a fourth instruction to the first application.
The fourth instruction is used for indicating a process for recovering the first application program.
S314, the first application program responds to the fourth instruction, and the process of the first application program is restored.
It should be appreciated that restoring the process of the first application corresponds to thawing the first application. According to the application program management method provided by the embodiment of the application program, when the first application program in the electronic equipment is converted from a state not perceived by a user to a state perceived by the user, the surfeflinger module resumes image layer combination processing on the image of the virtual screen, and then resumes the progress of the first application program.
For example, when the window manager determines that the first application is changed from the background operation to the foreground operation, the SurfaceFlinger module resumes the image composition processing on the image of the virtual screen, and then resumes the process of the first application.
For another example, the window manager determines that when the first operation of switching the electronic device from off-screen to on-screen is detected by the user, the surfeflinger module resumes performing layer composition processing on the image of the virtual screen, and then resumes the process of the first application.
For another example, when the second application sends a first request to the "power saving wizard" to request communication with the first application, the SurfaceFlinger module resumes the graphics layer processing of the image of the virtual screen, and then resumes the process of the first application.
The application program management method provided by the embodiment of the application program is applied to electronic equipment, the electronic equipment comprises a first application program, a second application program, an application program electricity-saving eidolon, an image synthesis SurfaceFlinger module, a display manager and a window manager, in the process of thawing the first application program, the window manager determines that the first application program is changed from background operation to front operation, or the window manager determines that the electronic equipment is changed from off screen to on screen operation, or the second application program requests to establish communication connection with the first application program, the electricity-saving eidolon sends an instruction for instructing the SurfaceFlinger module to resume image layer composition processing of the virtual screen to the first application program, and then sends an instruction for resuming the process of the first application program to the first application program, so that before thawing the first application program, the image of the virtual screen is subjected to image layer composition processing, namely, when the first application program is thawed, the electronic equipment can acquire the image of the virtual screen, or the second application program requests to establish communication connection with the first application program, and the problem of real-time image thawing of the virtual screen is avoided.
In one possible scenario, where the first application does not create a virtual screen, the "power saving puck" may directly freeze the first application without the first application being perceived by the user, reducing power consumption of the electronic device, as described in detail below with respect to FIG. 7.
Fig. 7 is a flowchart of a method for managing an application program, where the method is applied to an electronic device, and the electronic device includes a first application program, a second application program, an application program "power saving eidolon", an image synthesis SurfaceFlinger module, a display manager, and a window manager, as shown in fig. 7, and the method includes:
s401, the display manager determines whether the first application program creates a virtual screen.
If the first application creates a virtual screen, S402 is performed.
If the first application does not create a virtual screen, S414 is performed.
S402, the window manager determines whether the electronic device is in a first state.
The first state refers to that the electronic device stops outputting first information through the first application program, and the type of the first information comprises audio, pictures, video and/or vibration. Since the electronic device stops outputting the audio, picture, video and/or vibration type information through the first application, the user cannot perceive the first application. That is, the first application cannot be perceived by the user while the electronic device is in the first state.
If the electronic device is in the first state, S403 is executed.
S403, sending a first instruction to the SurfaceFlinger module by the power saving eidolon.
The first instruction is used for instructing the SurfaceFlinger module to stop performing layer composition processing on the image of the virtual screen.
S404, responding to the first instruction, the SurfaceFlinger module stops performing layer composition processing on the image of the virtual screen.
S405, the "power saving puck" sends a second instruction to the first application.
Wherein the second instruction is for indicating a process of interrupting the first application.
S406, the first application program responds to the second instruction and interrupts the process of the first application program.
S407, the window manager determines whether the first application program is changed from the background operation to the foreground operation.
If the first application is changed from the background operation to the foreground operation, S411 is executed.
It should be appreciated that when the window manager determines that the first application is going from background to foreground, the window manager may send a message to the "power saving puck" indicating that the electronic device is going from off-screen to on-screen, so that the "power saving puck" performs the method steps of S411.
S408, the window manager determines whether the first operation of the user is detected.
The first operation may refer to an operation of switching the electronic device from off-screen to on-screen.
S409, the second application sends a first request to the "power saving puck".
Wherein the first request is for indicating that the second application requests to establish communication with the first application.
It should be understood that the second application may refer to other applications in the electronic device than the first application. When the first application program is in a frozen state, the second application program needs to communicate with the first application program, and a first request for indicating the second application program to request to establish communication with the first application program needs to be sent to the power-saving eidolon.
S410, a "power saving puck" performs S411 in response to the first request.
S411, the "power saving eidolon" sends a third instruction to the SurfaceFlinger module.
The third instruction is used for indicating the SurfaceFlinger module to resume the image composition processing of the virtual screen.
And S412, responding to the third instruction by the SurfaceFlinger module, and recovering to perform layer composition processing on the image of the virtual screen.
S413, the 'power saving eidolon' sends a fourth instruction to the first application program, wherein the fourth instruction is used for indicating the process of recovering the first application program;
S414, the first application program responds to the fourth instruction, and the process of the first application program is restored.
S415, the window manager determines whether the electronic device is in the first state.
The first state refers to that the electronic device stops outputting first information through the first application program, and the type of the first information comprises audio, pictures, video and/or vibration. Since the electronic device stops outputting the audio, picture, video and/or vibration type information through the first application, the user cannot perceive the first application. That is, the first application cannot be perceived by the user while the electronic device is in the first state.
If the electronic device is in the first state, S416 is performed.
S416, the "power saving puck" sends a fifth instruction to the first application.
Wherein the fifth instruction is for indicating a process of interrupting the first application.
S417, the first application program responds to the fifth instruction to interrupt the process of the first application program.
S418, the second application sends a second request to the "power saving puck".
Wherein the second request is for indicating that the second application requests to establish communication with the first application.
S419, "power saving puck" performs S421 in response to the second request.
S420, the window manager determines whether the electronic device is in the second state.
The electronic device being in the second state may include a transition of the first application from a background operation to a foreground operation, or a transition of the electronic device from off-screen to on-screen.
If the window manager determines that the electronic device is in the second state, S421 is performed.
S421, the "power saving puck" sends a sixth instruction to the first application.
The sixth instruction is used for indicating a process of recovering the first application program.
S422, the first application program responds to the sixth instruction, and the process of the first application program is restored.
According to the application program management method, a third application program ('electricity-saving eidolon') can not only stop image layer combination processing on an image of a virtual screen under the condition that the virtual screen is created by a first application program, but also interrupt the process of the first application program so as to avoid the problem of system breakdown caused by frequent interaction between the system process and the first application program when the first application program is in a frozen state; and under the condition that the first application program does not create the virtual screen, the process of the first application program is directly interrupted, so that the power consumption of the electronic equipment is reduced.
It should be understood that, although the steps in the flowcharts in the above embodiments are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least a portion of the steps in the flowcharts may include a plurality of sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, the order in which the sub-steps or stages are performed is not necessarily sequential, and may be performed in turn or alternately with at least a portion of the sub-steps or stages of other steps or other steps.
It will be appreciated that in order to achieve the above-described functionality, the electronic device comprises corresponding hardware and/or software modules that perform the respective functionality. The steps of an algorithm for each example described in connection with the embodiments disclosed herein may be embodied in hardware or a combination of hardware and computer software. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Those skilled in the art may implement the described functionality using different approaches for each particular application in conjunction with the embodiments, but such implementation is not to be considered as outside the scope of this application.
The embodiment of the application may divide the functional modules of the electronic device according to the above method example, for example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one module. It should be noted that, in the embodiment of the present application, the division of the modules is schematic, which is merely a logic function division, and other division manners may be implemented in actual implementation. It should be noted that, in the embodiment of the present application, the names of the modules are schematic, and the names of the modules are not limited in actual implementation.
Fig. 8 is a schematic structural diagram of an application management device according to an embodiment of the present application.
It should be understood that the management apparatus 600 of the application program may perform the management methods of the application program shown in fig. 4 to 7; the application management apparatus 600 includes: an acquisition unit 610 and a processing unit 620.
The processing unit 620 is configured to determine whether the first application program creates a virtual screen; if the first application program creates the virtual screen, stopping performing image layer composition processing on the image of the virtual screen when the electronic equipment is in a first state, wherein the first state refers to that the electronic equipment stops outputting first information through the first application program, and the type of the first information comprises audio, pictures, video and/or vibration; a first process is performed on the first application, the first process being a process of interrupting a process of the first application.
In one embodiment, the processing unit 620 is further configured to resume performing layer composition processing on the image of the virtual screen when the electronic device transitions from the first state to a second state, where the second state is that the electronic device resumes outputting the first information through the first application; and performing second processing on the first application program, wherein the second processing refers to processing for recovering the process of the first application program.
In one embodiment, the electronic device further comprises a second application, the second state comprising a state in which the second application requests communication with the first application.
In one embodiment, the second state includes a state in which the first application transitions from background running to foreground running.
In one embodiment, the second state includes a state in which the electronic device transitions from off-screen to on-screen.
The application program management device provided in this embodiment is used to execute the application program management method in the foregoing embodiment, and the technical principles and technical effects are similar and are not repeated herein.
The management device 600 for application program is embodied in the form of a functional unit. The term "unit" herein may be implemented in software and/or hardware, without specific limitation.
For example, a "unit" may be a software program, a hardware circuit or a combination of both that implements the functions described above. The hardware circuitry may include application specific integrated circuits (application specific integrated circuit, ASICs), electronic circuits, processors (e.g., shared, proprietary, or group processors, etc.) and memory for executing one or more software or firmware programs, merged logic circuits, and/or other suitable components that support the described functions.
Thus, the elements of the examples described in the embodiments of the present application can be implemented in electronic hardware, or in a combination of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
Fig. 9 shows a schematic structural diagram of an electronic device provided in the present application. The dashed line in fig. 9 indicates that the unit or the module is optional. The electronic device 700 may be used to implement the method of managing applications described in the method embodiments above.
The electronic device 700 includes one or more processors 701, which one or more processors 701 may support the electronic device 700 to implement the methods of managing applications in the method embodiments. The processor 701 may be a general-purpose processor or a special-purpose processor. For example, the processor 701 may be a central processing unit (central processing unit, CPU), digital signal processor (digital signal processor, DSP), application specific integrated circuit (application specific integrated circuit, ASIC), field programmable gate array (field programmable gate array, FPGA), or other programmable logic device such as discrete gates, transistor logic, or discrete hardware components.
The processor 701 may be used to control the electronic device 700, execute a software program, and process data of the software program. The electronic device 700 may further comprise a communication unit 705 for enabling input (reception) and output (transmission) of signals.
For example, the electronic device 700 may be a chip, the communication unit 705 may be an input and/or output circuit of the chip, or the communication unit 705 may be a communication interface of the chip, which may be an integral part of a terminal device or other electronic device.
For another example, the electronic device 700 may be a terminal device, the communication unit 705 may be a transceiver of the terminal device, or the communication unit 705 may be a transceiver circuit of the terminal device.
The electronic device 700 may include one or more memories 702 having a program 704 stored thereon, the program 704 being executable by the processor 701 to generate instructions 703 such that the processor 701 performs the impedance matching method described in the above method embodiments according to the instructions 703.
Optionally, the memory 702 may also have data stored therein. Alternatively, processor 701 may also read data stored in memory 702, which may be stored at the same memory address as program 704, or which may be stored at a different memory address than program 704.
The processor 701 and the memory 702 may be provided separately or may be integrated together; for example, integrated on a System On Chip (SOC) of the terminal device.
Illustratively, the memory 702 may be used to store a related program 704 of the management method of the application provided in the embodiments of the present application, and the processor 701 may be used to invoke the related program 704 of the management method of the application stored in the memory 702 when performing management of the application, to execute the management method of the application of the embodiments of the present application; comprising the following steps: determining whether the first application program creates a virtual screen; if the first application program creates the virtual screen, stopping performing image layer composition processing on the image of the virtual screen when the electronic equipment is in a first state, wherein the first state refers to that the electronic equipment stops outputting first information through the first application program, and the type of the first information comprises audio, pictures, video and/or vibration; a first process is performed on the first application, the first process being a process of interrupting a process of the first application.
The present application also provides a computer program product which, when executed by the processor 701, implements the method of managing an application program according to any of the method embodiments of the present application.
The computer program product may be stored in the memory 702, for example, the program 704, and the program 704 is finally converted into an executable object file capable of being executed by the processor 701 through preprocessing, compiling, assembling, and linking.
The present application also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a computer, implements the method for managing an application program according to any of the method embodiments of the present application. The computer program may be a high-level language program or an executable object program.
Such as memory 702. The memory 702 may be volatile memory or nonvolatile memory, or the memory 702 may include both volatile and nonvolatile memory. The nonvolatile memory may be a read-only memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an electrically Erasable EPROM (EEPROM), or a flash memory. The volatile memory may be random access memory (random access memory, RAM) which acts as an external cache. By way of example, and not limitation, many forms of RAM are available, such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous DRAM (SLDRAM), and direct memory bus RAM (DR RAM).
In the present application, "at least one" means one or more, and "a plurality" means two or more. "at least one of" or the like means any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one (one) of a, b, or c may represent: a, b, c, a-b, a-c, b-c, or a-b-c, wherein a, b, c may be single or plural.
It should be understood that, in various embodiments of the present application, the sequence numbers of the foregoing processes do not mean the order of execution, and the order of execution of the processes should be determined by the functions and internal logic thereof, and should not constitute any limitation on the implementation process of the embodiments of the present application.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the device embodiments described above are merely illustrative; for example, the division of the units is only one logic function division, and other division modes can be adopted in actual implementation; for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The foregoing is merely specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the present application, and the changes and substitutions are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (13)

1. A method of managing applications, the method being applied to an electronic device, the electronic device including a first application, comprising:
determining whether the first application program creates a virtual screen;
if the first application program creates the virtual screen, stopping performing image layer combination processing on the image of the virtual screen when the electronic equipment is in a first state, wherein the first state refers to that the electronic equipment stops outputting first information through the first application program, and the type of the first information comprises audio, pictures, video and/or vibration;
And performing first processing on the first application program, wherein the first processing refers to processing for interrupting the process of the first application program.
2. The method according to claim 1, wherein the method further comprises:
restoring to perform layer combination processing on the image of the virtual screen when the electronic equipment is converted from the first state to a second state, wherein the second state refers to that the electronic equipment resumes outputting the first information through the first application program;
and performing second processing on the first application program, wherein the second processing refers to processing for recovering the process of the first application program.
3. The method of claim 2, wherein the electronic device further comprises a second application, the second state comprising a state in which the second application requests communication with the first application.
4. The method of claim 2, wherein the second state comprises a state in which the first application transitions from background running to foreground running.
5. The method of claim 2, wherein the second state comprises a state in which the electronic device transitions from off-screen to on-screen.
6. The method of any of claims 1 to 5, wherein the electronic device further comprises a third application for managing the first application and an image composition surfacing module for performing the layer composition process, and wherein stopping the layer composition process on the image of the virtual screen when the electronic device is in the first state comprises:
when the electronic equipment is in the first state, the third application program sends a first instruction to the SurfaceFlinger module, wherein the first instruction is used for instructing the SurfaceFlinger module to stop performing layer composition processing on the image of the virtual screen;
and the SurfaceFlinger module responds to the first instruction and stops performing layer composition processing on the image of the virtual screen.
7. The method of claim 6, wherein the first processing the first application comprises:
the third application program sends a second instruction to the first application program, wherein the second instruction is used for indicating to interrupt the process of the first application program;
The first application program responds to the second instruction and interrupts the process of the first application program.
8. The method according to any one of claims 2 to 5, wherein the electronic device includes a third application for managing the first application and an image composition surfinger module for performing the layer composition process, and wherein resuming the layer composition process on the image of the virtual screen when the electronic device transitions from the first state to the second state includes:
when the electronic equipment is converted from the first state to the second state, the third application program sends a third instruction to the SurfaceFlinger module, wherein the third instruction is used for indicating the SurfaceFlinger module to resume performing layer composition processing on the image of the virtual screen;
and the SurfaceFlinger module responds to the third instruction to resume the image composition processing of the image of the virtual screen.
9. The method of claim 8, wherein said performing a second process on said first application comprises:
the third application program sends a fourth instruction to the first application program, wherein the fourth instruction is used for indicating a process for recovering the first application program;
And responding to the fourth instruction by the first application program, and restoring the process of the first application program.
10. An electronic device, characterized in that the electronic device comprises means for executing the method of managing an application according to any of claims 1 to 9.
11. An electronic device, comprising:
one or more processors;
a memory;
and one or more computer programs, wherein the one or more computer programs are stored on the memory, which when executed by the one or more processors, cause the electronic device to perform the method of any of claims 1-9.
12. A chip system, characterized in that the chip system comprises a processor for calling and running a computer program from a memory, so that an electronic device on which the chip system is mounted performs the method according to any of claims 1 to 9.
13. A computer readable storage medium comprising a computer program, characterized in that the computer program, when run on an electronic device, causes the electronic device to perform the method of any one of claims 1 to 9.
CN202310610213.5A 2023-05-25 2023-05-25 Application management method and electronic device Pending CN117707715A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310610213.5A CN117707715A (en) 2023-05-25 2023-05-25 Application management method and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310610213.5A CN117707715A (en) 2023-05-25 2023-05-25 Application management method and electronic device

Publications (1)

Publication Number Publication Date
CN117707715A true CN117707715A (en) 2024-03-15

Family

ID=90157640

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310610213.5A Pending CN117707715A (en) 2023-05-25 2023-05-25 Application management method and electronic device

Country Status (1)

Country Link
CN (1) CN117707715A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112581557A (en) * 2019-09-30 2021-03-30 Oppo广东移动通信有限公司 Layer drawing method and electronic equipment
WO2021213120A1 (en) * 2020-04-23 2021-10-28 华为技术有限公司 Screen projection method and apparatus, and electronic device
CN114385096A (en) * 2020-10-20 2022-04-22 北京字节跳动网络技术有限公司 Display control method, device, terminal and storage medium
CN115113992A (en) * 2021-03-22 2022-09-27 深圳市万普拉斯科技有限公司 Process control method and device, computer equipment and storage medium
CN115237238A (en) * 2021-04-23 2022-10-25 深圳市万普拉斯科技有限公司 Power saving method and device for mobile terminal and mobile terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112581557A (en) * 2019-09-30 2021-03-30 Oppo广东移动通信有限公司 Layer drawing method and electronic equipment
WO2021213120A1 (en) * 2020-04-23 2021-10-28 华为技术有限公司 Screen projection method and apparatus, and electronic device
CN114385096A (en) * 2020-10-20 2022-04-22 北京字节跳动网络技术有限公司 Display control method, device, terminal and storage medium
CN115113992A (en) * 2021-03-22 2022-09-27 深圳市万普拉斯科技有限公司 Process control method and device, computer equipment and storage medium
CN115237238A (en) * 2021-04-23 2022-10-25 深圳市万普拉斯科技有限公司 Power saving method and device for mobile terminal and mobile terminal

Similar Documents

Publication Publication Date Title
EP3971818A1 (en) Picture processing method and apparatus
WO2023001163A1 (en) Screen refreshing method and device capable of improving dynamic effect performance
CN112732434A (en) Application management method and device
CN114489917A (en) Processing method for abnormal exit of application program, electronic equipment and readable storage medium
CN115017534B (en) File processing authority control method, device and storage medium
CN115018692B (en) Image rendering method and electronic equipment
WO2023005751A1 (en) Rendering method and electronic device
CN115033193B (en) Screen turning processing method and device, medium and electronic equipment
CN111381996A (en) Memory exception handling method and device
CN117707715A (en) Application management method and electronic device
CN114780012A (en) Display method and related device for screen locking wallpaper of electronic equipment
CN116737292B (en) Display mode switching method, electronic equipment and readable storage medium
CN116672707B (en) Method and electronic device for generating game prediction frame
CN115017487B (en) Switching method for login account of electronic equipment and electronic equipment
CN116088970B (en) Method for controlling application call and related device
CN116688494B (en) Method and electronic device for generating game prediction frame
CN116048646B (en) Process processing method and electronic equipment
CN116700819B (en) Method and device for starting camera hardware module and storage medium
CN115686338B (en) Screen splitting method and electronic equipment
CN115421599B (en) Input method display control method and related device
CN116365670B (en) Charging control method, device and storage medium
WO2023284625A1 (en) Cross-platform display method for application, and readable medium and electronic device
CN116680133B (en) Black screen detection method and electronic equipment
CN113806727B (en) Switching method for login account of electronic equipment and electronic equipment
CN117094876A (en) Data processing method, electronic device and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination