A method for restoring a dynamic wallpaper, a terminal, and a computer-readable storage medium

By recording and using the recovery information of the dynamic wallpaper, detecting and restoring the stopped-running dynamic wallpaper, the problem of difficult to recover dynamic wallpaper is solved, and the automatic recovery and long-term normal operation of the dynamic wallpaper is achieved, improving the user experience.

CN114020528BActive Publication Date: 2025-06-13NUBIA TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111270062.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-29
Publication Date
2025-06-13
Estimated Expiration
2041-10-29

AI Technical Summary

Technical Problem

Dynamic wallpapers often stop running during use, resulting in system wallpapers no longer playing dynamic pictures or directly changing back to the system's default static wallpapers, and it is difficult to recover.

Method used

Provides a dynamic wallpaper recovery method. By recording the recovery information of the currently used dynamic wallpaper, when the dynamic wallpaper stops running, the recovery process detects and restores the dynamic wallpaper based on the recorded recovery information.

Benefits of technology

It realizes automatic recovery of dynamic wallpaper, ensuring that dynamic wallpaper can operate normally for a long time and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114020528B_ABST
    Figure CN114020528B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, a terminal, and a computer-readable storage medium for restoring a dynamic wallpaper. The method records the restoration information of the currently used dynamic wallpaper; during the use of the dynamic wallpaper, it detects whether the dynamic wallpaper stops running; when it detects that the dynamic wallpaper stops running, the restoration process restores the dynamic wallpaper according to the recorded restoration information, solving the problem that it is difficult to restore the dynamic wallpaper after it stops running, realizing the automatic restoration of the dynamic wallpaper, ensuring that the dynamic wallpaper can run for a long time and normally, and enhancing the user experience. The present invention also discloses a device and a computer-readable storage medium. By implementing the above solution, the problem that it is difficult to restore the dynamic wallpaper after it stops running is solved, the automatic restoration of the dynamic wallpaper is realized, ensuring that the dynamic wallpaper can run for a long time and normally, and enhancing the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technologies, and more particularly, to a method for restoring a dynamic wallpaper, a terminal, and a computer-readable storage medium. Background Art

[0002] In current smartphones, users like to set dynamic wallpapers to make the wallpaper images on the phone more spectacular, so as to enhance the experience of using the terminal. However, during the use of dynamic wallpapers, especially in the case of Android system dynamic wallpapers, the dynamic wallpapers often stop running, resulting in the system wallpaper no longer playing the dynamic image or directly changing back to the system default static wallpaper, and it is difficult to restore in some cases. Summary of the Invention

[0003] The technical problem to be solved by the present invention is that during the current use of dynamic wallpapers, the dynamic wallpapers often stop running and are difficult to restore. To solve this technical problem, the present invention provides a method for restoring a dynamic wallpaper, a terminal, and a computer-readable storage medium.

[0004] To solve the above technical problem, the present invention provides a method for restoring a dynamic wallpaper, the method for restoring a dynamic wallpaper including:

[0005] Recording restoration information of the currently used dynamic wallpaper;

[0006] During the use of the dynamic wallpaper, detecting whether the dynamic wallpaper stops running;

[0007] When it is detected that the dynamic wallpaper stops running, a restoration process restores the dynamic wallpaper according to the recorded restoration information.

[0008] Optionally, the restoration process includes other resident processes in the system that are not wallpaper processes.

[0009] Optionally, the other resident processes include the system desktop process.

[0010] Optionally, the restoration information of the currently used dynamic wallpaper includes the component name of the wallpaper process of the dynamic wallpaper.

[0011] Optionally, the detecting whether the dynamic wallpaper stops running includes:

[0012] Detecting whether the wallpaper process of the dynamic wallpaper is alive;

[0013] The dynamic wallpaper stops running including:

[0014] The wallpaper process dies;

[0015] The restoration of the dynamic wallpaper by the restoration process according to the recorded restoration information includes:

[0016] According to the component name of the wallpaper process, the restoration process starts the wallpaper process.

[0017] Optionally, the detection of whether the wallpaper process of the dynamic wallpaper is alive includes:

[0018] Construct a binder object of the wallpaper process and pass it to the monitoring process;

[0019] The monitoring process calls the linkToDeath method to set a death monitor for the binder object;

[0020] When the monitoring process receives the death notice of the wallpaper process, the wallpaper process dies abnormally; otherwise, the wallpaper process is alive.

[0021] Optionally, the monitoring process is the restoration process.

[0022] Optionally, the death of the wallpaper process includes at least one of the following situations:

[0023] The wallpaper process is closed by the user;

[0024] The wallpaper process is closed by the system;

[0025] The wallpaper process is closed due to abnormal crash.

[0026] Furthermore, the present invention also provides a terminal, which includes a processor, a memory and a communication bus;

[0027] The communication bus is used to realize the connection communication between the processor and the memory;

[0028] The processor is used to execute one or more programs stored in the memory to implement the steps of the above-mentioned dynamic wallpaper restoration method.

[0029] Furthermore, the present invention also provides a computer-readable storage medium, which stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the above-mentioned dynamic wallpaper restoration method.

[0030] Beneficial effects

[0031] The present invention provides a method for restoring a dynamic wallpaper, a terminal, and a computer-readable storage medium. Aiming at the defect that the dynamic wallpaper often stops running and is difficult to restore during the use of the existing dynamic wallpaper, the restoration information of the currently used dynamic wallpaper is recorded; during the use of the dynamic wallpaper, it is detected whether the dynamic wallpaper stops running; when it is detected that the dynamic wallpaper stops running, the restoration process restores the dynamic wallpaper according to the recorded restoration information, solves the problem that it is difficult to restore the dynamic wallpaper after it stops running, realizes the automatic restoration of the dynamic wallpaper, ensures that the dynamic wallpaper can run for a long time and normally, and improves the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] The present invention will be further described below in conjunction with the drawings and embodiments. In the drawings:

[0033] Figure 1 FIG. is a schematic diagram of the hardware structure of an optional mobile terminal for implementing various embodiments of the present invention.

[0034] Figure 2 As shown in Figure 1 FIG., is a schematic diagram of the wireless communication system of the mobile terminal;

[0035] Figure 3 FIG. is a basic flowchart of the method for restoring a dynamic wallpaper provided by the first embodiment of the present invention;

[0036] Figure 4 FIG. is a flowchart of detecting whether the wallpaper process of the dynamic wallpaper survives provided by the first embodiment of the present invention;

[0037] Figure 5 FIG. is a detailed flowchart of the method for restoring a dynamic wallpaper provided by the second embodiment of the present invention;

[0038] Figure 6 FIG. is a schematic diagram of the structure of the terminal provided by the third embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0039] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0040] In the following description, suffixes such as "module", "component", or "unit" used to represent elements are only for the convenience of describing the present invention, and they have no specific meaning in themselves. Therefore, "module", "component", or "unit" can be used interchangeably.

[0041] The terminal can be implemented in various forms. For example, the terminal described in the present invention may include mobile terminals such as mobile phones, tablet computers, laptop computers, palmtop computers, personal digital assistants (PDAs), portable media players (PMPs), navigation devices, wearable devices, smart bracelets, pedometers, etc., and fixed terminals such as digital TVs, desktop computers, etc.

[0042] In the following description, a mobile terminal will be taken as an example for illustration. Those skilled in the art will understand that, except for elements specifically for mobile purposes, the structure according to the embodiments of the present invention can also be applied to fixed-type terminals.

[0043] Please refer to Figure 1 , which is a schematic diagram of the hardware structure of a mobile terminal for implementing various embodiments of the present invention. The mobile terminal 100 may include: an RF (Radio Frequency) unit 101, a WiFi module 102, an audio output unit 103, an A / V (audio / video) input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, a processor 110, and a power supply 111, etc. Those skilled in the art can understand that Figure 1 the mobile terminal structure shown in

[0044] does not constitute a limitation on the mobile terminal. The mobile terminal may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.

[0044] Next, the following will be combined with Figure 1 to specifically introduce each component of the mobile terminal:

[0045] The radio frequency unit 101 can be used for receiving and transmitting information or signals during communication. Specifically, after receiving the downlink information of the base station, it is processed by the processor 110. Additionally, it sends the uplink data to the base station. Generally, the radio frequency unit 101 includes but is not limited to antennas, at least one amplifier, a transceiver, a coupler, a low-noise amplifier, a duplexer, etc. Moreover, the radio frequency unit 101 can also communicate with the network and other devices through wireless communication. The above wireless communication can use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication), 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 Duplexing-Long Term Evolution), and TDD-LTE (Time Division Duplexing-Long Term Evolution), etc.

[0046] WiFi belongs to short-range wireless transmission technology. The mobile terminal can help users send and receive emails, browse the web, and access streaming media through the WiFi module 102, which provides users with wireless broadband Internet access. Although Figure 1 the WiFi module 102 is shown, it can be understood that it is not an essential component of the mobile terminal and can be omitted entirely within the scope of not changing the essence of the invention according to needs.

[0047] The audio output unit 103 can convert the 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 it as sound when the mobile terminal 100 is in call signal reception mode, call mode, recording mode, voice recognition mode, broadcast reception mode, etc. Moreover, the audio output unit 103 can also provide audio output related to specific functions executed by the mobile terminal 100 (such as call signal reception sound, message reception sound, etc.). The audio output unit 103 can include a speaker, a buzzer, etc.

[0048] 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 GPU 1041 processes the image data of still pictures or videos obtained by an image capturing device (such as a camera) in a video capture mode or an image capture mode. The processed image frames can be displayed on the display unit 106. The image frames processed by the GPU 1041 can be stored in the memory 109 (or other storage media) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 can receive sounds (audio data) via the microphone 1042 in operating modes such as a phone call mode, a recording mode, a voice recognition mode, etc., and can process such sounds into audio data. The processed audio (voice) data can be output in a format that can be transmitted to a mobile communication base station via the radio frequency unit 101 in the case of the phone call mode. The microphone 1042 can implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) the noise or interference generated during the reception and transmission of audio signals.

[0049] The mobile terminal 100 further 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 and a proximity sensor. Among them, the ambient light sensor can adjust the brightness of the display panel 1061 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 1061 and / or the backlight when the mobile terminal 100 is moved to the ear. As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary, and can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as a pedometer, tapping), etc.; as for other sensors that the mobile phone can also be configured with, such as a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., they will not be elaborated here.

[0050] The display unit 106 is used to display information input by the user or information provided to the user. The display unit 106 may include a display panel 1061, and the display panel 1061 can be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), etc.

[0051] The user input unit 107 can be used to receive input numerical or character information and generate key signal inputs related to the user settings and function control of the mobile terminal. Specifically, the user input unit 107 can include a touch panel 1071 and other input devices 1072. The touch panel 1071, also known as a touch screen, can collect touch operations of the user thereon or nearby (such as operations of the user using a finger, a stylus, or any suitable object or accessory on or near the touch panel 1071), and drive corresponding connection devices according to a preset program. The touch panel 1071 can include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the touch position of the user and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the processor 110, and can receive and execute the commands sent by the processor 110. In addition, the touch panel 1071 can be implemented in multiple types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 can also include other input devices 1072. Specifically, the other input devices 1072 can include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, power on / off keys, etc.), a trackball, a mouse, a joystick, etc., and are not specifically limited here.

[0052] Further, the touch panel 1071 can cover the display panel 1061. After the touch panel 1071 detects a touch operation thereon or nearby, it transmits the operation to the processor 110 to determine the type of touch event. Subsequently, the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of touch event. Although in Figure 1 the touch panel 1071 and the display panel 1061 are implemented as two independent components to realize the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 and the display panel 1061 can be integrated to realize the input and output functions of the mobile terminal, and are not specifically limited here.

[0053] The interface unit 108 serves as an interface through which at least one external device can be connected to the mobile terminal 100. For example, the external device can 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 with an identification module, an audio input / output (I / O) port, a video I / O port, a headset port, and so on. The interface unit 108 can be used to receive inputs from external devices (such as data information, power, etc.) and transmit the received inputs to one or more components within the mobile terminal 100 or can be used to transmit data between the mobile terminal 100 and external devices.

[0054] The memory 109 can be used to store software programs and various data. The memory 109 mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created according to the use of the mobile phone (such as audio data, phone book, etc.). In addition, the memory 109 can include high-speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0055] The processor 110 is the control center of the mobile terminal, connecting various parts of the entire mobile terminal through various interfaces and lines. By running or executing software programs and / or modules stored in the memory 109, and calling data stored in the memory 109, it executes various functions of the mobile terminal and processes data, thereby monitoring the mobile terminal as a whole. The processor 110 can include one or more processing units; preferably, the processor 110 can integrate an application processor and a modem processor. Among them, the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor may not be integrated into the processor 110.

[0056] The mobile terminal 100 can also include a power supply 111 (such as a battery) for supplying power to each component. Preferably, the power supply 111 can be logically connected to the processor 110 through a power management system, so as to realize functions such as management of charging, discharging, and power consumption management through the power management system.

[0057] Although Figure 1 not shown, the mobile terminal 100 can also include a Bluetooth module, etc., which will not be elaborated here.

[0058] To facilitate the understanding of the embodiments of the present invention, the communication network system on which the mobile terminal of the present invention is based will be described below.

[0059] Please refer to Figure 2 , Figure 2 which is an architecture diagram of a communication network system provided by an embodiment of the present invention. This communication network system is an LTE system of the general mobile communication technology. 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 operator's IP service 204 that are sequentially communicatively connected.

[0060] Specifically, the UE 201 may be the aforementioned terminal 100, which will not be elaborated here.

[0061] The E-UTRAN 202 includes an eNodeB 2021 and other eNodeBs 2022, etc. Among them, the eNodeB 2021 can be connected to other eNodeBs 2022 through a backhaul (such as the X2 interface), the eNodeB 2021 is connected to the EPC 203, and the eNodeB 2021 can provide access for the UE 201 to the EPC 203.

[0062] The EPC 203 may include an MME (Mobility Management Entity) 2031, an HSS (Home Subscriber Server) 2032, other MMEs 2033, an SGW (Serving Gate Way) 2034, a PGW (PDN Gate Way) 2035, a PCRF (Policy and Charging Rules Function) 2036, etc. Among them, the MME 2031 is a control node that processes the signaling between the UE 201 and the EPC 203 and provides bearer and connection management. The HSS 2032 is used to provide some registers to manage functions such as a home location register (not shown in the figure) and stores some user-specific information such as service characteristics and data rates. All user data can be sent through the SGW 2034. The PGW 2035 can provide IP address allocation for the UE 201 and other functions. The PCRF 2036 is a policy and charging control policy decision point for service data flows and IP bearer resources, and it selects and provides available policy and charging control decisions for a policy and charging enforcement functional unit (not shown in the figure).

[0063] The IP service 204 may include the Internet, an intranet, an IMS (IP Multimedia Subsystem), or other IP services, etc.

[0064] Although the above has been described by taking the LTE system as an example, those skilled in the art should be aware that the present invention is not only applicable to the LTE system, but also applicable to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, and future new network systems, etc., which are not limited here.

[0065] Based on the above mobile terminal hardware structure and communication network system, various embodiments of the method of the present invention are proposed.

[0066] The first embodiment

[0067] Figure 3 The basic flowchart of the dynamic wallpaper restoration method provided in this embodiment. The dynamic wallpaper restoration method includes:

[0068] S301. Record the restoration information of the currently used dynamic wallpaper.

[0069] The restoration information of the dynamic wallpaper recorded in this embodiment is used to restore the dynamic wallpaper subsequently. The restoration information can be any information that can find the dynamic wallpaper according to the content it contains. Therefore, it can be understood that the object pointed to by the restoration information of the dynamic wallpaper is not limited to a specific dynamic wallpaper itself, but can also reflect the corresponding process, program, etc. of the dynamic wallpaper. In practical applications, as long as the corresponding process and program of the dynamic wallpaper are found, the dynamic wallpaper can also be restored.

[0070] In some specific implementation processes, the dynamic wallpaper can be implemented by a wallpaper process. The wallpaper process remains in a running state in the system and continuously controls the wallpaper image to change and update, thus achieving the effect of the dynamic wallpaper. Of course, the specific wallpaper resources of the dynamic wallpaper can be saved locally on the terminal, and the process or program selects the specific wallpaper resources 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 only being able to display one specific dynamic wallpaper. In such specific implementation processes, although a single wallpaper process or program cannot directly correspond to the currently used dynamic wallpaper, since the wallpaper process or program has corresponding configuration information, starting the wallpaper process or program can restore the dynamic wallpaper. Or in other words, the existence of corresponding configuration information in the wallpaper process or program is also equivalent to including a part of the restoration information of the currently used dynamic wallpaper. These information are recorded in the corresponding configuration file and recorded and read by the corresponding wallpaper process or program; and the other part of the restoration information of the dynamic wallpaper is equivalent to the information of the wallpaper process or program, which is used to determine the wallpaper process or program corresponding to the currently used dynamic wallpaper. This part of the restoration information can be recorded and read in other forms, which will be described in more detail in the subsequent embodiments. In some implementation processes, a single wallpaper process or program can also be configured to correspond one-to-one with a specific dynamic wallpaper, that is, a wallpaper process or program can only run a specific dynamic wallpaper.

[0071] S302. During the use of the dynamic wallpaper, detect whether the dynamic wallpaper stops running.

[0072] It should be understood that in the process of using a live wallpaper, it means that the wallpaper of the current system is set to a live wallpaper, regardless of whether the live wallpaper is displayed on the current interface. When the wallpaper of the system is set to a static wallpaper, the live wallpaper is not being used.

[0073] S303. When it is detected that the live wallpaper has stopped running, the recovery process restores the live wallpaper according to the recorded recovery information.

[0074] Restoring the live wallpaper means making the stopped-running live wallpaper enter the normal running state again. In fact, in some specific implementation processes, the restoration of the live wallpaper can be achieved by restarting the wallpaper process or program. Since the relevant configuration information of the wallpaper process or program records the currently used live wallpaper or corresponds one-to-one with the live wallpaper, when the wallpaper process or program is started, the corresponding live wallpaper also starts running.

[0075] In the actual use process of the terminal, the live wallpaper may stop running for various reasons. However, it should be understood that in this embodiment, the live wallpaper is only detected and restored during the process of using the live wallpaper. For example, in the case where the user or an application actively replaces the live wallpaper with a static wallpaper, it belongs to stopping the use of the live wallpaper. At this time, the live wallpaper will surely stop running, but this embodiment does not restore the live wallpaper in this case. Therefore, in order to distinguish whether the live wallpaper stops running in the normal use state or stops running because it is no longer needed, an additional notification can be selected when replacing the live wallpaper with a static wallpaper to notify the terminal to stop detecting whether the live wallpaper has stopped or not to restore the live wallpaper; or other methods can be used to avoid restoring the live wallpaper when it is no longer needed actively.

[0076] In this embodiment, the dynamic wallpaper is restored by a restoration process. Therefore, it can be understood that the restoration process is a process other than the processes related to the dynamic wallpaper. That is to say, the restoration process will not be affected by the stopping of the dynamic wallpaper. Even when the dynamic wallpaper stops running, it can operate normally or completely independently of the dynamic wallpaper. In practical applications, theoretically, the restoration process can be any process other than the processes related to the dynamic wallpaper, which directly or indirectly controls the restoration of the dynamic wallpaper. In order to better ensure the success rate of restoring the dynamic wallpaper, in some embodiments, the restoration process includes other resident processes of the system. In the system, resident processes are theoretically required to always remain in a running state. Such resident processes usually belong to important processes of the system or processes essential for ensuring the normal use of the terminal by the user. Therefore, the priority of resident processes in the system is extremely high, and the system will give priority to scheduling resources for these resident processes to ensure that the resident processes will not be killed due to lack of application resources. Such resident processes are only likely to be killed by the system in extreme cases or may stop running when encountering abnormalities. In fact, it can be understood that since the normal presentation of the wallpaper must be ensured when the user exits to the wallpaper interface at any time, the wallpaper process is also usually equivalent to a kind of resident process of the system. Therefore, the other resident processes referred to in this embodiment refer to other resident processes other than the wallpaper process. Restoring the dynamic wallpaper through resident processes maximally ensures that when the dynamic wallpaper stops running, there is a corresponding restoration process to restore the dynamic wallpaper, thus avoiding the situation where there is no corresponding restoration process in a running state when the dynamic wallpaper stops running, resulting in the inability to effectively restore the dynamic wallpaper. As a specific example, the other resident processes in this embodiment include the system desktop process. Even among all resident processes, the system desktop process has a relatively high priority. And even if the system desktop process is closed, crashed, etc., the system usually gives priority to restoring the system desktop and restarting the system desktop process to ensure the normality of the system desktop. Thus, by using the high priority of the system desktop process in the overall system, the reliability of restoring the dynamic wallpaper is ensured.

[0077] In some implementation processes, the restoration information of the currently used dynamic wallpaper includes the component name of the wallpaper process of the dynamic wallpaper. As a specific example, for example, in the Android system, the component name of a process is also the "ComponentName", and another program or process can be opened through this "ComponentName". By recording the component name of the wallpaper process of the dynamic wallpaper, when the dynamic wallpaper stops running, the restoration process can start the process based on this component name, that is, according to this component name, the wallpaper process can be started again. It should be noted that the recording of the restoration information in this embodiment includes, but is not limited to, being saved in various storage forms such as temporary caches, files, databases, etc.

[0078] The operation of a live wallpaper often requires the wallpaper to control it. In this embodiment, detecting whether the live wallpaper has stopped running may include:

[0079] Detecting whether the wallpaper process of the live wallpaper is alive. In practical applications, a death notice may be sent before the wallpaper process dies. If the death notice is not received, it means that the wallpaper process is still alive, or other methods for detecting whether the wallpaper process has died may be used to determine whether the wallpaper process is alive.

[0080] The live wallpaper stopping running includes the death of the wallpaper process. It can be understood that if the wallpaper process is alive, it can be considered that the live wallpaper has not stopped running. If the wallpaper process has died, it means that the live wallpaper has definitely stopped running.

[0081] The recovery process recovering the live wallpaper according to the recorded identification information includes:

[0082] According to the component name of the wallpaper process, the recovery process starts the wallpaper process. In fact, this process is equivalent to the recovery process controlling the wallpaper process to start again. For the system, it is equivalent to reconfiguring the live wallpaper at this time.

[0083] Such as Figure 4 , in some embodiments, detecting whether the wallpaper process of the live wallpaper is alive includes:

[0084] S401. Construct a binder object of the wallpaper process and pass it to the monitoring process;

[0085] S402. The monitoring process calls the linkToDeath method to set a death monitor for the binder object;

[0086] S403. When the above monitoring process receives the death notice of the wallpaper process, the wallpaper process has died abnormally. Otherwise, the wallpaper process is alive;

[0087] The binder object is mainly used to implement communication between applications and between processes. The binder object can be passed between applications and between processes, and in some implementation processes, it can be regarded as a medium for message passing between applications and between processes. The construction of the binder object includes instantiating its own binder object in the wallpaper process. The transfer of the binder object can be achieved through inter-process communication. For example, the binder object usually runs in certain service processes. When the service process dies, the binder object is also cleared accordingly. At this time, the client's call to the service process will also fail. In the application, the linkToDeath method of the binder object is used to monitor the death of the service process, which is often used to ensure that relevant resources of the process can be cleared and tidied up when the process dies. For example, important data is protected, and some resources are released to avoid exceptions caused by the accidental shutdown of the process; or the linkToDeath method is used to notify the client that the current service process has been shut down, avoiding the client continuously calling the cleared binder object for failed operations. And in this embodiment, by using this death notification mechanism, the survival of the wallpaper process is detected, and the recovery process is used to recover the wallpaper process, solving the problem of abnormal operation of dynamic wallpapers in the system.

[0088] In some implementation manners, when the monitoring process receives the death notification of the wallpaper process, it can directly or indirectly notify the recovery process to recover the dynamic wallpaper. And in some implementation manners, the above-mentioned monitoring process is the recovery process, that is, the linkToDeath method of the binder object of the wallpaper process is called in the recovery process. When the recovery process receives the death notification, it immediately starts the wallpaper process according to the component name of the wallpaper process to achieve recovery, without additional communication with other processes, and consumes less system resources.

[0089] In this embodiment, the death of the wallpaper process includes at least one of the following situations:

[0090] The wallpaper process is closed by the user;

[0091] The wallpaper process is closed by the system;

[0092] The wallpaper process is closed due to abnormal crash.

[0093] It can be understood that the above is closed by the user, including the user closing the wallpaper process through settings. For example, the user can see all the processes running in the background through settings. The user may manually close some running processes to save phone resources, but the user usually does not understand the functions of each process. The user may also close the wallpaper process during the operation. Another example is that although the priority of the wallpaper process is usually high and the system often gives priority to ensuring its survival, that is, when the system resources are insufficient, the system usually does not actively kill the wallpaper process to free up system resources for other processes or programs. However, inevitably, 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 the user, they can be restarted through system-level control or restarted again during the terminal restart process. However, the current wallpaper process related to dynamic wallpapers cannot be restarted at the system level or restarted again through the restart method after being closed. Therefore, the dynamic wallpaper recovery method of this embodiment is required to recover the dynamic wallpaper. Whether the user accidentally closes the dynamic wallpaper in the process of using it to clean up the background processes in this embodiment, or the dynamic wallpaper stops running due to insufficient system resources or abnormal crashes, etc., it can successfully detect that the dynamic wallpaper stops running and recover the dynamic wallpaper through the recovery process. But it can be understood that when the user changes the wallpaper to a static wallpaper through settings, the system may automatically close the wallpaper process and change to display the static wallpaper, which does not belong to the situation to be monitored in this embodiment, or even if the wallpaper process of the dynamic wallpaper is monitored to be closed, it will not be recovered.

[0094] In some embodiments, it is also possible to detect whether the wallpaper process is running abnormally. Here, abnormal running includes that the wallpaper process is still alive, but may be unresponsive or fall into other abnormal but not yet crashed states. In these cases, the dynamic wallpaper may also stop running. At this time, the recovery process to recover the dynamic wallpaper according to the recorded identification information includes, but is not limited to, actively killing the current wallpaper process and restarting the wallpaper process again. As a specific example, similarly, during the process of killing the wallpaper process, the wallpaper process can also be killed based on the previously recorded component name of the wallpaper process, that is, according to this component name, the wallpaper process can be killed or started.

[0095] In some implementation processes, when the monitoring process detects the death of the wallpaper process, it can record the death of the wallpaper process. For example, information such as the number of times and reasons for the death of the wallpaper process can be recorded. These information can be recorded in a log file to help developers or terminal users understand the running situation of the wallpaper process, so as to optimize the system targeted and improve the stability of the dynamic wallpaper.

[0096] In the related art, different from static wallpapers, dynamic wallpapers require the wallpaper process to continuously maintain and control them. When the wallpaper process fails, the dynamic wallpaper cannot be displayed or cannot be displayed with a dynamic effect. In this embodiment, the recovery information of the currently used dynamic wallpaper is recorded; during the use of the dynamic wallpaper, it is detected whether the dynamic wallpaper stops running; when it is detected that the dynamic wallpaper stops running, the recovery process restores the dynamic wallpaper according to the recorded recovery information, solves the problem that it is difficult to restore the dynamic wallpaper after it stops running, realizes the automatic recovery of the dynamic wallpaper, ensures that the dynamic wallpaper can run for a long time and normally, and improves the user experience.

[0097] Second Embodiment

[0098] This embodiment further illustrates the dynamic wallpaper recovery method by demonstrating a more specific recovery process. Figure 5 It is a detailed flowchart of the dynamic wallpaper recovery method provided by the second embodiment of the present invention. The dynamic wallpaper recovery method includes:

[0099] S501. Construct a binder object in WallpaperService;

[0100] As a specific example, in the WallpaperService (wallpaper service) of the framework (application framework layer), code for instantiating the binder object can be added. When the process of WallpaperService runs, its binder object is instantiated. It can be understood that the process of WallpaperService only represents an implementation of a wallpaper process in this example. In actual applications, the wallpaper process can be the process of other services inherited from WallpaperService, or the process of other services that can implement dynamic wallpapers.

[0101] S502. Pass the binder object to the system desktop process;

[0102] The binder object itself can be used for inter-process communication. Therefore, when the process of WallpaperService runs, the instantiated binder object can be passed to the system desktop process.

[0103] S503. The system desktop process calls the linkToDeath method of the binder object;

[0104] That is, the system desktop process monitors the survival status of the process of WallpaperService.

[0105] S504. Record the CommponentName of WallpaperService;

[0106] In this embodiment, the live wallpaper is implemented by WallpaperService, and the ComponentName of this WallpaperService is recorded for subsequent restoration of the live wallpaper. The execution order of this step S504 in this embodiment is not limited to the execution order with the foregoing other steps, that is, step S504 can be executed at any time before step S505.

[0107] S505. The system desktop process receives a death notification of the process of WallpaperService;

[0108] When the process of WallpaperService dies, the linkToDeath method will receive a callback notification. At this time, the system desktop process learns that the process of this WallpaperService has died. At this time, the live wallpaper may generate an exception and needs to be restored.

[0109] S506. The system desktop process starts WallpaperService according to the ComponentName;

[0110] It can be understood that in this embodiment, the system desktop process undertakes the functions of monitoring whether the wallpaper process has died and restoring the wallpaper process. Before discovering that the wallpaper process has died, the ComponentName of the wallpaper process of the current live wallpaper has been recorded. When it is detected that this wallpaper process has died, the process needs to be restored, that is, in this example, the system desktop process resets the system wallpaper according to the recorded ComponentName. As a specific example, when the system desktop process receives a death notification of the process of WallpaperService, it calls the startService method (a method for starting a service) according to the ComponentName to start the service corresponding to the ComponentName, that is, to start WallpaperService, so that the live wallpaper is equivalently reset and run again. More specifically, when starting WallpaperService, an intent (a runtime binding mechanism that can connect two different components during the running of the program) object is instantiated, its setComponent method (a method for setting the destination component) is called, the ComponentName is passed in, and this intent object is passed into the startService method to start the WallpaperService corresponding to the ComponentName.

[0111] In this embodiment, by passing the binder object of WallpaperService to the system desktop process, the system desktop process monitors the process of WallpaperService and starts the process using the pre-recorded ComponentName after receiving the death notice, ensuring the operation of the live wallpaper and preventing the live wallpaper from entering an irrecoverable state after being closed.

[0112] The third embodiment

[0113] This embodiment also provides a terminal. Refer to Figure 6 As shown, it includes a processor 61, a memory 62, and a communication bus 63, where:

[0114] The communication bus 63 is used to implement the connection and communication between the processor 61 and the memory 62;

[0115] The processor 61 is used to execute one or more programs stored in the memory 62 to implement the steps of the live wallpaper recovery method in the first and second embodiments above.

[0116] This embodiment also provides a computer-readable storage medium that stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the live wallpaper recovery method in the first and second embodiments above.

[0117] It should be noted that in this article, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including the element.

[0118] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments.

[0119] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-described example methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions for causing a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in various embodiments of the present invention.

[0120] The embodiments of the present invention have been described above in conjunction with the accompanying drawings. However, the present invention is not limited to the above specific embodiments. The above specific embodiments are merely illustrative and not restrictive. Under the inspiration of the present invention, those of ordinary skill in the art can also make many forms without departing from the spirit of the present invention and the scope protected by the claims. All of these are within the protection scope of the present invention.

Claims

1. A method for restoring a dynamic wallpaper, characterized in that, the method for restoring the dynamic wallpaper includes: recording the restoration information of the currently used dynamic wallpaper; during the process of using the dynamic wallpaper, detecting whether the dynamic wallpaper stops running, including: constructing a binder object of the wallpaper process and passing it to the monitoring process; the monitoring process calling the linkToDeath method to set a death monitor for the binder object; when the monitoring process receives the death notice of the wallpaper process, the wallpaper process abnormally dies, then the dynamic wallpaper stops running; when it is detected that the dynamic wallpaper stops running, the restoration process restores the dynamic wallpaper according to the recorded restoration information; the restoration process is the monitoring process, and the restoration process includes other resident processes in the system that are not wallpaper processes.

2. The method for restoring a dynamic wallpaper according to claim 1, characterized in that, the other resident processes include the system desktop process.

3. The method for restoring a dynamic wallpaper according to claim 1, characterized in that, the restoration information of the currently used dynamic wallpaper includes the component name of the wallpaper process of the dynamic wallpaper.

4. The method for restoring a dynamic wallpaper according to claim 3, characterized in that, detecting whether the dynamic wallpaper stops running includes: detecting whether the wallpaper process of the dynamic wallpaper is alive; the dynamic wallpaper stops running includes: the wallpaper process dies; the restoration process restoring the dynamic wallpaper according to the recorded restoration information includes: the restoration process starting the wallpaper process according to the component name of the wallpaper process.

5. The method for restoring a dynamic wallpaper according to claim 4, characterized in that, the death of the wallpaper process includes at least one of the following situations: the wallpaper process is closed by the user; the wallpaper process is closed by the system; the wallpaper process is closed due to abnormal crash.

6. A terminal, characterized in that, the terminal includes a processor, a memory and a communication bus; the communication bus is used to realize the connection communication between the processor and the memory; the processor is used to execute one or more programs stored in the memory to realize the steps of the method for restoring a dynamic wallpaper according to any one of claims 1 to 5.

7. A computer-readable storage medium, characterized in that, the computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to realize the steps of the method for restoring a dynamic wallpaper according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Installation and display method of dynamic wallpaper of Android mobile phone

    CN102664990A