CN114020528A - Dynamic wallpaper recovery method, terminal and computer-readable storage medium - Google Patents

Dynamic wallpaper recovery method, terminal and computer-readable storage medium Download PDF

Info

Publication number
CN114020528A
CN114020528A CN202111270062.0A CN202111270062A CN114020528A CN 114020528 A CN114020528 A CN 114020528A CN 202111270062 A CN202111270062 A CN 202111270062A CN 114020528 A CN114020528 A CN 114020528A
Authority
CN
China
Prior art keywords
wallpaper
dynamic wallpaper
dynamic
recovery
recovery method
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
CN202111270062.0A
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.)
Nubia Technology Co Ltd
Original Assignee
Nubia Technology 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 Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN202111270062.0A priority Critical patent/CN114020528A/en
Publication of CN114020528A publication Critical patent/CN114020528A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3055Monitoring arrangements for monitoring the status of the computing system or of the computing system component, e.g. monitoring if the computing system is on, off, available, not available

Abstract

The invention discloses a dynamic wallpaper recovery method, a terminal and a computer readable storage medium, wherein the method records the recovery information of the currently used dynamic wallpaper; detecting whether the dynamic wallpaper stops running or not in the process of using the dynamic wallpaper; when the dynamic wallpaper is detected to stop running, the dynamic wallpaper is recovered by the recovery process according to the recorded recovery information, the problem that the dynamic wallpaper is difficult to recover after the dynamic wallpaper stops running is solved, automatic recovery of the dynamic wallpaper is achieved, the dynamic wallpaper can run for a long time and normally, user experience is improved, and the problem that the dynamic wallpaper is difficult to recover after the dynamic wallpaper stops running is solved.

Description

Dynamic wallpaper recovery method, terminal and computer-readable storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a dynamic wallpaper recovery method, a terminal, and a computer-readable storage medium.
Background
At present, a user likes to enable the mobile phone to present a more dazzling wallpaper picture by setting dynamic wallpaper, so that the experience of using the terminal is improved. However, during the use of dynamic wallpaper, especially during the use of dynamic wallpaper of android system, the dynamic wallpaper often stops running, so that the system wallpaper does not play dynamic pictures any more or directly changes back to the default static wallpaper of the system, and is difficult to recover in some cases.
Disclosure of Invention
The invention aims to solve the technical problem that the dynamic wallpaper often stops running and is difficult to recover in the using process of the current dynamic wallpaper, and provides a dynamic wallpaper recovery method, a terminal and a computer-readable storage medium.
In order to solve the technical problem, the invention provides a dynamic wallpaper recovery method, which comprises the following steps:
recording recovery information of the currently used dynamic wallpaper;
detecting whether the dynamic wallpaper stops running or not in the process of using the dynamic wallpaper;
and when the dynamic wallpaper is detected to stop running, the dynamic wallpaper is recovered by a recovery process according to the recorded recovery information.
Optionally, the recovery process includes other resident processes in the system other than the wallpaper process.
Optionally, the other resident processes include system desktop processes.
Optionally, the currently used restoration information of the dynamic wallpaper includes a component name of a wallpaper process of the dynamic wallpaper.
Optionally, the detecting whether the dynamic wallpaper stops running includes:
detecting whether the wallpaper process of the dynamic wallpaper survives;
the dynamic wallpaper stopping comprises the following steps:
the wallpaper process dies;
the restoring, by the restoration process, the dynamic wallpaper according to the recorded restoration information includes:
and according to the component name of the wallpaper process, the recovery process starts the wallpaper process.
Optionally, the detecting whether the wallpaper process of the dynamic wallpaper survives includes:
constructing a binder object of the wallpaper progress and transmitting the binder object to a monitoring progress;
calling a linkToDeath method by the listener process to set a death listener for the binder object;
and when the monitoring process receives the death notice of the wallpaper process, the wallpaper process dies abnormally, otherwise, the wallpaper process survives.
Optionally, the monitoring process is the recovery process.
Optionally, the wallpaper process death includes at least one of the following conditions:
the wallpaper process is closed by a user;
the wallpaper process is closed by the system;
the wallpaper process is closed due to the abnormal crash.
Furthermore, the invention also provides a terminal, which comprises a processor, a memory and a communication bus;
the communication bus is used for realizing connection communication between the processor and the memory;
the processor is configured to execute one or more programs stored in the memory to implement the steps of the dynamic wallpaper recovery method described above.
Further, the present invention also provides a computer-readable storage medium storing one or more programs, which are executable by one or more processors to implement the steps of the above-described dynamic wallpaper recovery method.
Advantageous effects
The invention provides a dynamic wallpaper recovery method, a terminal and a computer readable storage medium, aiming at the defects that the dynamic wallpaper often stops running and is difficult to recover in the using process of the existing dynamic wallpaper, the recovery information of the currently used dynamic wallpaper is recorded; detecting whether the dynamic wallpaper stops running or not in the process of using the dynamic wallpaper; when the dynamic wallpaper is detected to stop running, the recovery process recovers the dynamic wallpaper according to the recorded recovery information, so that the problem that the dynamic wallpaper is difficult to recover after the dynamic wallpaper stops running is solved, the automatic recovery of the dynamic wallpaper is realized, the long-term and normal running of the dynamic wallpaper is ensured, and the user experience is improved.
Drawings
The invention will be further described with reference to the accompanying drawings and examples, in which:
fig. 1 is a schematic diagram of a hardware structure of an optional mobile terminal for implementing various embodiments of the present invention.
FIG. 2 is a diagram of a wireless communication system for the mobile terminal shown in FIG. 1;
FIG. 3 is a basic flowchart of a dynamic wallpaper recovery method according to a first embodiment of the invention;
fig. 4 is a flowchart illustrating a method for detecting whether a wallpaper process of dynamic wallpaper survives according to a first embodiment of the present invention;
FIG. 5 is a flowchart illustrating a detailed method for restoring dynamic wallpaper according to a second embodiment of the present invention;
fig. 6 is a schematic structural diagram of a terminal according to a third embodiment of the present invention.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in itself. Thus, "module", "component" or "unit" may be used mixedly.
The terminal may be implemented in various forms. For example, the terminal described in the present invention may include a mobile terminal such as a mobile phone, a tablet computer, a notebook computer, a palmtop computer, a Personal Digital Assistant (PDA), a Portable Media Player (PMP), a navigation device, a wearable device, a smart band, a pedometer, and the like, and a fixed terminal such as a Digital TV, a desktop computer, and the like.
The following description will be given by way of example of a mobile terminal, and it will be understood by those skilled in the art that the construction according to the embodiment of the present invention can be applied to a fixed type terminal, in addition to elements particularly used for mobile purposes.
Referring to fig. 1, which is a schematic diagram of a hardware structure of a mobile terminal for implementing various embodiments of the present invention, the mobile terminal 100 may include: RF (Radio Frequency) unit 101, WiFi module 102, audio output unit 103, a/V (audio/video) input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, processor 110, and power supply 111. Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 1 is not intended to be limiting of mobile terminals, which may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The following describes each component of the mobile terminal in detail with reference to fig. 1:
the radio frequency unit 101 may be configured to receive and transmit signals during information transmission and reception or during a call, and specifically, receive downlink information of a base station and then process the downlink information to the processor 110; in addition, the uplink data is transmitted to the base station. Typically, radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 can also communicate with a network and other devices through wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System for Mobile communications), GPRS (General Packet Radio Service), CDMA2000(Code Division Multiple Access 2000), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division duplex Long Term Evolution), and TDD-LTE (Time Division duplex Long Term Evolution).
WiFi belongs to short-distance wireless transmission technology, and the mobile terminal can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 102, and provides wireless broadband internet access for the user. Although fig. 1 shows the WiFi module 102, it is understood that it does not belong to the essential constitution of the mobile terminal, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output as sound when the mobile terminal 100 is in a call signal reception mode, a call mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Also, the audio output unit 103 may also provide audio output related to a specific function performed by the mobile terminal 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 103 may include a speaker, a buzzer, and the like.
The a/V input unit 104 is used to receive audio or video signals. The a/V input Unit 104 may include a Graphics Processing Unit (GPU) 1041 and a microphone 1042, the Graphics processor 1041 Processing image data of still pictures or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the graphic processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 may receive sounds (audio data) via the microphone 1042 in a phone call mode, a recording mode, a voice recognition mode, or the like, and may be capable of processing such sounds into audio data. The processed audio (voice) data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 101 in case of a phone call mode. The microphone 1042 may implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the course of receiving and transmitting audio signals.
The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 1061 and/or a backlight when the mobile terminal 100 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing the posture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone, further description is omitted here.
The display unit 106 is used to display information input by a user or information provided to the user. The Display unit 106 may include a Display panel 1061, and the Display panel 1061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 107 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the mobile terminal. Specifically, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also referred to as a touch screen, may collect a touch operation performed by a user on or near the touch panel 1071 (e.g., an operation performed by the user on or near the touch panel 1071 using a finger, a stylus, or any other suitable object or accessory), and drive a corresponding connection device according to a predetermined program. The touch panel 1071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 110, and can receive and execute commands sent by the processor 110. In addition, the touch panel 1071 may be implemented in various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may include other input devices 1072. In particular, other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like, and are not limited to these specific examples.
Further, the touch panel 1071 may cover the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or nearby, the touch panel 1071 transmits the touch operation to the processor 110 to determine the type of the touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of the touch event. Although the touch panel 1071 and the display panel 1061 are shown in fig. 1 as two separate components to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 and the display panel 1061 may be integrated to implement the input and output functions of the mobile terminal, and is not limited herein.
The interface unit 108 serves as an interface through which at least one external device is connected to the mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from external devices and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal 100 and external devices.
The memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 109 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 110 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by operating or executing software programs and/or modules stored in the memory 109 and calling data stored in the memory 109, thereby performing overall monitoring of the mobile terminal. Processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The mobile terminal 100 may further include a power supply 111 (e.g., a battery) for supplying power to various components, and preferably, the power supply 111 may be logically connected to the processor 110 via a power management system, so as to manage charging, discharging, and power consumption management functions via the power management system.
Although not shown in fig. 1, the mobile terminal 100 may further include a bluetooth module or the like, which is not described in detail herein.
In order to facilitate understanding of the embodiments of the present invention, a communication network system on which the mobile terminal of the present invention is based is described below.
Referring to fig. 2, fig. 2 is an architecture diagram of a communication Network system according to an embodiment of the present invention, where the communication Network system is an LTE system of a universal mobile telecommunications technology, and the LTE system includes a UE (User Equipment) 201, an E-UTRAN (Evolved UMTS Terrestrial Radio Access Network) 202, an EPC (Evolved Packet Core) 203, and an IP service 204 of an operator, which are in communication connection in sequence.
Specifically, the UE201 may be the terminal 100 described above, and is not described herein again.
The E-UTRAN202 includes eNodeB2021 and other eNodeBs 2022, among others. Among them, the eNodeB2021 may be connected with other eNodeB2022 through backhaul (e.g., X2 interface), the eNodeB2021 is connected to the EPC203, and the eNodeB2021 may provide the UE201 access to the EPC 203.
The EPC203 may include an MME (Mobility Management Entity) 2031, an HSS (Home Subscriber Server) 2032, other MMEs 2033, an SGW (Serving gateway) 2034, a PGW (PDN gateway) 2035, and a PCRF (Policy and Charging Rules Function) 2036, and the like. The MME2031 is a control node that handles signaling between the UE201 and the EPC203, and provides bearer and connection management. HSS2032 is used to provide registers to manage functions such as home location register (not shown) and holds subscriber specific information about service characteristics, data rates, etc. All user data may be sent through SGW2034, PGW2035 may provide IP address assignment for UE201 and other functions, and PCRF2036 is a policy and charging control policy decision point for traffic data flow and IP bearer resources, which selects and provides available policy and charging control decisions for a policy and charging enforcement function (not shown).
The IP services 204 may include the internet, intranets, IMS (IP Multimedia Subsystem), or other IP services, among others.
Although the LTE system is described as an example, it should be understood by those skilled in the art that the present invention is not limited to the LTE system, but may also be applied to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, and future new network systems.
Based on the above mobile terminal hardware structure and communication network system, the present invention provides various embodiments of the method.
First embodiment
Fig. 3 is a basic flowchart of a dynamic wallpaper recovery method provided in this embodiment, where the dynamic wallpaper recovery method includes:
and S301, recording the recovery information of the currently used dynamic wallpaper.
The recovery information of the dynamic wallpaper recorded in this embodiment is used for recovering the dynamic wallpaper subsequently, and the recovery information may be any information capable of finding the dynamic wallpaper according to the content contained in the recovery information. Therefore, it can be understood that the object pointed by the recovery information of the dynamic wallpaper is not limited to a specific dynamic wallpaper, and may also reflect a process, a program, and the like corresponding to the dynamic wallpaper.
In some specific implementation processes, the dynamic wallpaper can be realized by a wallpaper process, the wallpaper process keeps an operation state in a system, and the wallpaper image is continuously controlled to change and update, so that the effect of the dynamic wallpaper is realized. Certainly, the specific wallpaper resource of the dynamic wallpaper may be stored locally in the terminal, and the process or program selects the specific wallpaper resource stored in the terminal for presentation according to the local configuration information of the terminal, that is, a single wallpaper process or program is not limited to be capable of displaying only one specific dynamic wallpaper. In such a specific implementation process, although a single wallpaper process or program cannot directly correspond to the currently used dynamic wallpaper, the wallpaper process or program is started to restore the dynamic wallpaper due to the corresponding configuration information of the wallpaper process or program. Or put differently, the wallpaper process or program has corresponding configuration information which is also equivalent to a part of recovery information including the currently used dynamic wallpaper, and the information is recorded in a corresponding configuration file and is recorded and read by the corresponding wallpaper process or program; the other part of the recovery information of the dynamic wallpaper, that is, the information corresponding to the wallpaper process or program, is used to determine the wallpaper process or program corresponding to the currently used dynamic wallpaper, and this part of the recovery information may be recorded and read in other forms, which will be described in more detail in the following embodiments. In some implementations, a single wallpaper process or program can also be allowed to be configured to correspond one-to-one with a particular dynamic wallpaper, i.e., a wallpaper process or program can only run one specific dynamic wallpaper.
S302, in the process of using the dynamic wallpaper, detecting whether the dynamic wallpaper stops running or not.
It should be understood that the use of dynamic wallpaper refers to the current system's wallpaper being set as dynamic wallpaper, and is not limited to whether the dynamic wallpaper is displayed at the current interface. When the wallpaper of the system is set to a static wallpaper, then no dynamic wallpaper is used.
And S303, when the dynamic wallpaper is detected to stop running, the recovery process recovers the dynamic wallpaper according to the recorded recovery information.
And recovering the dynamic wallpaper, namely enabling the dynamic wallpaper which stops running to enter a normal running state again. Indeed, in some implementations, the restoration of dynamic wallpaper may be accomplished by restarting a wallpaper process or program. Because the related configuration information of the wallpaper process or program records the currently used dynamic wallpaper or corresponds to the dynamic wallpaper one by one, when the wallpaper process or program is started, the corresponding dynamic wallpaper also starts to run.
In the actual use process of the terminal, the dynamic wallpaper may stop running for various reasons, but it can be understood that the dynamic wallpaper is detected and recovered only in the use process of the dynamic wallpaper, for example, in the case that a user or an application actively replaces the dynamic wallpaper with a static wallpaper, the use of the dynamic wallpaper is stopped, and the dynamic wallpaper also necessarily stops running at this time, but the dynamic wallpaper is not recovered in this case. Therefore, in order to distinguish whether the dynamic wallpaper stops running in a normal use state or stops running due to unnecessary use, extra notification can be performed when the dynamic wallpaper is replaced by the static wallpaper so as to notify the terminal that whether the dynamic wallpaper stops or not is not detected any more, or to notify the terminal that the dynamic wallpaper is not recovered; or in other ways to avoid restoring the dynamic wallpaper when the dynamic wallpaper is not actively needed.
In this embodiment, the dynamic wallpaper is restored by the restoration process, and therefore it can be understood that the restoration process is a process other than the process related to the dynamic wallpaper, that is, the restoration process is not affected by the stop of the dynamic wallpaper, and even in a state where the dynamic wallpaper stops running, the restoration process can normally or completely keep running independently of the dynamic wallpaper. In practical application, the recovery process may be any process other than the process related to the dynamic wallpaper in theory, and directly or indirectly controls the dynamic wallpaper to recover. In order to better ensure the recovery success rate of the dynamic wallpaper, in some embodiments, the recovery process includes other resident processes of the system, in the system, the resident processes need to be kept in a running state all the time theoretically, such resident processes generally belong to important processes of the system or ensure that a user normally uses indispensable processes of the terminal, therefore, the priority of the resident processes in the system is extremely high, the system can preferentially schedule resources for the resident processes to ensure that the resident processes are not killed due to the lack of the application resources, and such resident processes may be killed by the system only in an extreme case or may stop running when an exception is encountered. In fact, it can be understood that, since the user logs out to the wallpaper interface at any time to ensure the normal presentation of the wallpaper, the wallpaper process also generally corresponds to a resident process of the system, and thus the other resident processes referred to in this embodiment refer to other resident processes besides the wallpaper process. The dynamic wallpaper is recovered through the resident process, and the corresponding recovery process can be ensured to exist to recover the dynamic wallpaper to the maximum extent when the dynamic wallpaper stops running, so that the situation that the dynamic wallpaper cannot be effectively recovered due to the fact that no corresponding recovery process is in a running state when the dynamic wallpaper stops running is avoided. As a specific example, other resident processes in this embodiment include a system desktop process, and even if the system desktop process is closed or crashed in each resident process, the system will usually recover the system desktop preferentially, restart the system desktop process, and ensure the system desktop is normal, so that the reliability of recovery of the dynamic wallpaper is ensured by using the high priority of the system desktop process in the entire system.
In some implementations, the recovery information for the currently used dynamic wallpaper includes a component name of a wallpaper process for the dynamic wallpaper. As a specific example, in an android system, for example, the component name of a process, namely "ComponentName", through which another program or process can be opened. By recording the component name of the wallpaper process of the dynamic wallpaper, when the dynamic wallpaper stops running, the recovery process can start the process based on the component name, namely, the wallpaper process can be started again according to the component name. It should be noted that the present embodiment stores the record of the recovery information in various storage forms including, but not limited to, a temporary cache, a file, a database, and the like.
The running of the dynamic wallpaper often requires the wallpaper to control the wallpaper, and in this embodiment, detecting whether the dynamic wallpaper stops running may include:
detecting whether a wallpaper process of the dynamic wallpaper survives. In practical application, the death notification can be sent before the wallpaper process dies, if the death notification is not received, the wallpaper process still survives, or other modes for detecting whether the wallpaper process dies are adopted to judge whether the wallpaper process survives.
The dynamic wallpaper stopping includes the death of the wallpaper process. It is understood that if the wallpaper process survives, the dynamic wallpaper may be considered not to be stopped, and if the wallpaper process dies, the dynamic wallpaper is necessarily stopped.
Restoring, by the restoration process, the dynamic wallpaper according to the recorded identification information includes:
and starting the wallpaper process by the recovery process according to the component name of the wallpaper process. In effect, this process is equivalent to the wallpaper process being restarted under the control of the recovery process, which is equivalent to the dynamic wallpaper being reconfigured once for the system.
As with fig. 4, in some embodiments, detecting whether a wallpaper process for dynamic wallpaper is alive comprises:
s401, constructing a binder object of the wallpaper process and transmitting the binder object to a monitoring process;
s402, calling a linkToDeath method by a monitoring process to set death monitoring on a binder object;
s403, when the monitoring process receives a death notice of the wallpaper process, the wallpaper process dies abnormally, otherwise, the wallpaper process survives;
the binder object is mainly used for realizing communication between applications and processes, and the binder object can be transmitted between the applications and the processes and can be regarded as a medium for message transmission between the applications and the processes in some implementation processes. The construction of the binder object includes instantiating the own binder object in the wallpaper process, and the delivery of the binder object can be realized through inter-process communication. For example, a binder object is usually run in some service processes, and when the service process dies, the binder object is cleared, and the client's call to the service process will also fail. In application, death monitoring is carried out on the service process through a linkToDeath method of a binder object, which is often used for ensuring that the related resources of the process can be cleared and swept when the process is dead, for example, important data is protected, and partial resources are released, so that abnormality caused when the process is closed accidentally is avoided; or the client is informed that the current service process is closed through a linkToDeath method, so that the client is prevented from continuously calling the cleared binder object to perform failed operation. In the embodiment, the death notification mechanism is utilized to detect the survival of the wallpaper process, and thus the recovery process recovers the wallpaper process, so that the problem of abnormal operation of the dynamic wallpaper in the system is solved.
In some embodiments, when the monitoring process receives the death notification of the wallpaper process, the monitoring process can directly or indirectly notify the recovery process to recover the dynamic wallpaper. In some embodiments, the monitoring process is a recovery process, that is, a linkToDeath method for calling a binder object of the wallpaper process in the recovery process, and when the recovery process receives a death notification, the wallpaper process is started immediately according to the component name of the wallpaper process to realize recovery, without performing additional communication with other processes, and thus, the consumption of system resources is less.
In this embodiment, the wallpaper process death includes at least one of the following situations:
the wallpaper process is closed by a user;
the wallpaper process is closed by the system;
the wallpaper process is closed due to the abnormal crash.
It is understood that the closing by the user includes the user closing the wallpaper process by setting. For example, a user may see all processes running in the background through the settings, and the user may manually close some running processes to save resources of the mobile phone, but the user usually does not know the role assumed by each process, and the user may close the wallpaper process during the operation. For example, although the priority of the wallpaper process is usually high, the system will often preferentially ensure that the wallpaper process survives, that is, when the system resources are not enough, the system will not actively kill the wallpaper process to make the system resources available for other processes or programs, but it is inevitable that in some extreme cases, the system may still kill the wallpaper process. In fact, in the system, for some important system processes, after being closed by a user, the processes can be restarted by control at a system level, or restarted during the restart of the terminal, however, the current wallpaper process related to the dynamic wallpaper cannot be restarted at the system level or restarted by restarting after being closed, and thus the dynamic wallpaper recovery method of this embodiment is required to recover the dynamic wallpaper. According to the method and the device, whether the dynamic wallpaper is closed carelessly by a user in order to clear the background process in the using process, or the dynamic wallpaper stops running due to the fact that system resources are insufficient or abnormal breakdown occurs, the dynamic wallpaper can be successfully detected to stop running, and the dynamic wallpaper is recovered through the recovery process. However, it can be understood that when the user sets to replace the wallpaper with the static wallpaper, the system may automatically close the wallpaper process and change the wallpaper process to display the static wallpaper, which is not the case to be monitored in this embodiment, or even if the wallpaper process of the dynamic wallpaper is monitored to be closed, the wallpaper process is not recovered.
In some embodiments, the wallpaper process may be detected to be running abnormally, where abnormal running includes a state where the wallpaper process is still alive, but may not respond or have been trapped in other exceptions but not yet crashed, in which case the dynamic wallpaper may also stop running. At this time, the recovery process recovers the dynamic wallpaper according to the recorded identification information, including but not limited to actively killing the current wallpaper process and restarting the wallpaper process. As a specific example, in the process of killing the wallpaper process, the wallpaper process may also be killed based on the recorded component name of the wallpaper process, that is, the wallpaper process can be killed or started according to the component name.
In some implementations, the death of the wallpaper process can be recorded when the monitoring process detects the death of the wallpaper process. For example, information such as the death times and reasons of the wallpaper progress can be recorded, and the information can be recorded in a log file to help a developer or a terminal user to know the running condition of the wallpaper progress, so that the system is optimized in a targeted manner, and the stability of the dynamic wallpaper is improved.
In the related art, dynamic wallpaper is different from static wallpaper, which requires continuous maintenance and control of a wallpaper process, and when the wallpaper process fails, the dynamic wallpaper cannot be displayed or cannot be displayed with a dynamic effect. The embodiment records the recovery information of the currently used dynamic wallpaper; detecting whether the dynamic wallpaper stops running or not in the process of using the dynamic wallpaper; when the dynamic wallpaper is detected to stop running, the recovery process recovers the dynamic wallpaper according to the recorded recovery information, so that the problem that the dynamic wallpaper is difficult to recover after the dynamic wallpaper stops running is solved, the automatic recovery of the dynamic wallpaper is realized, the long-term and normal running of the dynamic wallpaper is ensured, and the user experience is improved.
Second embodiment
The embodiment illustrates a more specific recovery process to further explain the dynamic wallpaper recovery method, and fig. 5 is a detailed flowchart of the dynamic wallpaper recovery method provided by the second embodiment of the present invention, where the dynamic wallpaper recovery method includes:
s501, constructing a binder object in Wallpaertervice;
as a specific example, code for instantiating a binder object may be added to wallpaperservce (wallpaper service) of a framework layer, and when a process of the wallpaperservce runs, the binder object is instantiated. It will be appreciated that the WallpaperService process represents only one implementation of a wallpaper process in this example, and in practice, a wallpaper process may be a process that inherits from other services of WallpaperService, or a process that enables other services of dynamic wallpaper.
S502, transmitting the binder object to a system desktop process;
the binder object itself can be used for interprocess communication, so that the instantiated binder object can be passed to the system desktop process when the process of Wallpaertervice runs.
S503, calling a linkToDeath method of the binder object by the system desktop process;
that is, the system desktop process monitors the survival state of the WallpaperService process.
S504, recording the ComponentName of the Wallpaertervice;
in this embodiment, the dynamic wallpaper is implemented by WallpaperService, and the commanengname of the WallpaperService is recorded for subsequent recovery of the dynamic wallpaper. The present embodiment does not limit the execution sequence of step S504 and the execution sequence between the other steps, that is, step S504 may be executed at any time before step S505.
S505, the system desktop process receives a death notification of the Wallpaertervice process;
when the WallpaperService process dies, the linkToDeath method receives a callback notification, and at this time, the system desktop process knows that the WallpaperService process dies. At this time, the dynamic wallpaper may be abnormal and needs to be restored.
S506, starting the Wallpaertervice by the system desktop process according to the CommponentName;
it can be understood that, in the embodiment, the system desktop process takes on the functions of monitoring whether the wallpaper process dies and recovering the wallpaper process. Before the wallpaper process is found dead, which is the commanengname of the wallpaper process of the current dynamic wallpaper is recorded, and when the wallpaper process is detected dead, the recovery process, that is, the system desktop process in this example, resets the wallpaper of the system once according to the recorded commanengname. As a specific example, when the system desktop process receives the death notification of the WallpaperService process, the startService method (a method for starting a service) is called according to the commantname to start the service corresponding to the commantname, that is, to start the WallpaperService, so that the dynamic wallpaper is equivalent to being reset and running. More specifically, when the wallpaperserviceis started, an intent (a runtime binding mechanism which can connect two different components during program running) object is instantiated to call its setComponent method (a method for setting a destination component), a commantname is sent in, and the intent object is sent in a stateservicemethod to start the wallpaperservicecorresponding to the commantname.
In the embodiment, the binder object of the WallpaperService is transmitted to the system desktop process, the system desktop process monitors the WallpaperService process and starts the process by using the prerecorded commanengname after receiving the death notification, so that the running of the dynamic wallpaper is ensured, and the situation that the dynamic wallpaper enters an unrecoverable state after being closed is avoided.
Third embodiment
The present embodiment further provides a terminal, as shown in fig. 6, which includes a processor 61, a memory 62 and a communication bus 63, wherein:
the communication bus 63 is used for realizing connection communication between the processor 61 and the memory 62;
processor 61 is configured to execute one or more programs stored in memory 62 to implement the steps of the dynamic wallpaper recovery method in the first and second embodiments.
The present embodiment also provides a computer-readable storage medium storing one or more programs, which are executable by one or more processors to implement the steps of the dynamic wallpaper recovery method in the first and second embodiments.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (10)

1. A dynamic wallpaper recovery method, characterized by comprising:
recording recovery information of the currently used dynamic wallpaper;
detecting whether the dynamic wallpaper stops running or not in the process of using the dynamic wallpaper;
and when the dynamic wallpaper is detected to stop running, the dynamic wallpaper is recovered by a recovery process according to the recorded recovery information.
2. A dynamic wallpaper recovery method as recited in claim 1, wherein the recovery process comprises other resident processes in the system other than the wallpaper process.
3. A dynamic wallpaper recovery method as recited in claim 2, wherein the other resident process comprises a system desktop process.
4. The dynamic wallpaper recovery method as recited in claim 1, wherein the recovery information of the currently used dynamic wallpaper includes a component name of a wallpaper process of the dynamic wallpaper.
5. The dynamic wallpaper recovery method as recited in claim 4, wherein the detecting whether the dynamic wallpaper stops running comprises:
detecting whether the wallpaper process of the dynamic wallpaper survives;
the dynamic wallpaper stopping comprises the following steps:
the wallpaper process dies;
the restoring, by the restoration process, the dynamic wallpaper according to the recorded restoration information includes:
and according to the component name of the wallpaper process, the recovery process starts the wallpaper process.
6. The dynamic wallpaper recovery method as recited in claim 5, wherein the detecting whether the wallpaper process of the dynamic wallpaper is alive comprises:
constructing a binder object of the wallpaper progress and transmitting the binder object to a monitoring progress;
calling a linkToDeath method by the listener process to set a death listener for the binder object;
and when the monitoring process receives the death notice of the wallpaper process, the wallpaper process dies abnormally, otherwise, the wallpaper process survives.
7. The dynamic wallpaper recovery method as recited in claim 6, wherein the listening process is the recovery process.
8. The dynamic wallpaper recovery method as claimed in claim 5, wherein the wallpaper process death comprises at least one of:
the wallpaper process is closed by a user;
the wallpaper process is closed by the system;
the wallpaper process is closed due to the abnormal crash.
9. A terminal, characterized in that the terminal comprises a processor, a memory and a communication bus;
the communication bus is used for realizing connection communication between the processor and the memory;
the processor is configured to execute one or more programs stored in the memory to implement the steps of the dynamic wallpaper recovery method as claimed in any one of claims 1 to 8.
10. A computer readable storage medium, characterized in that the computer readable storage medium stores one or more programs which are executable by one or more processors to implement the steps of the dynamic wallpaper recovery method according to any one of claims 1 to 8.
CN202111270062.0A 2021-10-29 2021-10-29 Dynamic wallpaper recovery method, terminal and computer-readable storage medium Pending CN114020528A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111270062.0A CN114020528A (en) 2021-10-29 2021-10-29 Dynamic wallpaper recovery method, terminal and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111270062.0A CN114020528A (en) 2021-10-29 2021-10-29 Dynamic wallpaper recovery method, terminal and computer-readable storage medium

Publications (1)

Publication Number Publication Date
CN114020528A true CN114020528A (en) 2022-02-08

Family

ID=80058667

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111270062.0A Pending CN114020528A (en) 2021-10-29 2021-10-29 Dynamic wallpaper recovery method, terminal and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN114020528A (en)

Similar Documents

Publication Publication Date Title
CN110188016B (en) Method, terminal and storage medium for detecting application program no-response blocking
CN107357704B (en) Application program detection method, terminal and computer readable storage medium
CN109040441B (en) Application body-separating display method, mobile terminal and computer readable storage medium
CN108683806B (en) Anti-disturbing method, mobile terminal and computer readable storage medium
CN107635070B (en) Message reminding method, terminal and storage medium
CN108121681B (en) Hot plug implementation method, terminal and storage medium
CN110704217A (en) Memory leak detection method, terminal and computer readable storage medium
CN109766119B (en) Recovery partition upgrade method, terminal and computer readable storage medium
CN112631535A (en) Screen projection reverse control method and device, mobile terminal and storage medium
CN107172605B (en) Emergency call method, mobile terminal and computer readable storage medium
CN112799577A (en) Small window screen projection method, terminal and storage medium
CN112689191A (en) Screen projection control method, terminal and computer readable storage medium
CN110677897B (en) Network search control method, terminal and computer readable storage medium
CN109309762B (en) Message processing method, device, mobile terminal and storage medium
CN109725967B (en) Method and device for adjusting horizontal and vertical screen display errors, mobile terminal and storage medium
CN109889651B (en) Notification message processing method, terminal and computer readable storage medium
CN107239208B (en) Method, apparatus, and computer-readable storage medium for processing screenshot
CN112395106A (en) Process management method, mobile terminal, and computer-readable storage medium
CN110187934B (en) Application control method, terminal and computer readable storage medium
CN112494932A (en) Game frame supplementing method and device, terminal and computer readable storage medium
CN109151201B (en) Anti-addiction method, mobile terminal and computer storage medium
CN109684132B (en) Data backup method of mobile terminal, mobile terminal and storage medium
CN110045888B (en) Screen interface screenshot processing method and mobile terminal
CN110572518B (en) Screen-extinguishing control method, mobile terminal and computer-readable storage medium
CN114020528A (en) Dynamic wallpaper recovery method, terminal and computer-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