CN116795476B - Wallpaper deleting method and electronic equipment - Google Patents

Wallpaper deleting method and electronic equipment Download PDF

Info

Publication number
CN116795476B
CN116795476B CN202311092466.4A CN202311092466A CN116795476B CN 116795476 B CN116795476 B CN 116795476B CN 202311092466 A CN202311092466 A CN 202311092466A CN 116795476 B CN116795476 B CN 116795476B
Authority
CN
China
Prior art keywords
wallpaper
electronic device
picture
application
interface
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.)
Active
Application number
CN202311092466.4A
Other languages
Chinese (zh)
Other versions
CN116795476A (en
Inventor
梁滋堃
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202311092466.4A priority Critical patent/CN116795476B/en
Publication of CN116795476A publication Critical patent/CN116795476A/en
Application granted granted Critical
Publication of CN116795476B publication Critical patent/CN116795476B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04817Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance using icons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04842Selection of displayed objects or displayed text elements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Telephone Function (AREA)

Abstract

The application provides a wallpaper deleting method and electronic equipment. The electronic equipment displays a first user interface of a first application, wherein the first user interface comprises a first wallpaper picture and a first wallpaper deleting option; the electronic equipment receives a first operation aiming at a first wallpaper deleting option; the electronic device takes the address of the second wallpaper picture as a reference of a first variable referenced by a main thread of the first application; the electronic equipment creates a second variable and a sub-thread of the first application, and assigns the parameter of the first variable to the second variable, and the sub-thread of the first application refers to the second variable; the electronic equipment deletes the first wallpaper picture through the sub-thread of the first application; the electronic device displays a second user interface of the first application, wherein the second user interface does not comprise the first wallpaper picture. When the wallpaper is reset, the participation of the second variable referenced by the sub-thread cannot be emptied, and the sub-thread continues to execute the operation of deleting the first wallpaper picture, so that the wallpaper picture is ensured to be deleted successfully.

Description

Wallpaper deleting method and electronic equipment
Technical Field
The present application relates to the field of terminal technologies, and in particular, to a method for deleting wallpaper and an electronic device.
Background
With the development of electronic devices, the use of electronic devices is becoming more and more abundant. In order to enhance the user's experience with the electronic device, the user may be setting and changing a lock screen wallpaper or desktop wallpaper of the electronic device. The user may also delete the disliked wallpaper. However, a wallpaper deletion failure may occur due to a system upgrade or system change of the electronic device 100.
Disclosure of Invention
The application provides a method for deleting wallpaper and electronic equipment, which can ensure that the wallpaper is successfully deleted and that the electronic equipment can display a wallpaper deleting interface after the wallpaper is deleted.
In a first aspect, the present application provides a method for deleting wallpaper, the method comprising: the electronic equipment displays a first user interface of a first application, wherein the first user interface comprises a first wallpaper picture and a first wallpaper deleting option, and the first wallpaper deleting option is used for deleting the first wallpaper picture; the electronic equipment receives a first operation of a user aiming at a first wallpaper deleting option; in response to the first operation, the electronic device references an address of a second wallpaper picture as a first variable referenced by a main thread of the first application; the electronic equipment creates a second variable and a sub-thread of the first application, and assigns the participation of the first variable to the second variable, wherein the participation of the second variable is the address of the second wallpaper picture, and the sub-thread of the first application refers to the second variable; the electronic equipment deletes the first wallpaper picture through the sub-thread of the first application; the electronic device displays a second user interface of the first application, wherein the second user interface does not comprise the first wallpaper picture, and the second user interface comprises the second wallpaper picture.
The second wallpaper picture may be a new wallpaper picture automatically set by the electronic device after the user deletes the first wallpaper picture.
Optionally, a first identifier may be displayed on the first wallpaper picture, where the first identifier is used to indicate that the first wallpaper picture is a screen-locking wallpaper and/or a desktop wallpaper that is currently being used by the electronic device.
The electronic device can execute the operation of deleting the wallpaper through the sub-thread of the first application so as to lighten the load of the main thread of the first application, and the efficiency of deleting the wallpaper and resetting the wallpaper can be improved.
Before the electronic device performs the operation of deleting the wallpaper through the sub-thread of the first application, the electronic device needs to create a second variable. The sub-thread of the first application needs to refer to the second variable and take the address of the second wallpaper picture as the reference of the second variable.
In the case where the reference of the second variable referenced by the child thread of the first application is not null, the child thread of the first application may successfully delete the first wallpaper picture. Because the sub-thread of the first application refers to the second variable instead of the first variable, when the electronic device deletes the first wallpaper picture currently used by the electronic device, the electronic device executes the operations of destroying the wallpaper interface and restarting the wallpaper interface, and when the electronic device executes the operations of destroying the wallpaper interface and restarting the wallpaper interface, the electronic device sets the participation of the first variable referred to by the main thread to be empty. The reference of the second variable which is cited by the sub-thread is not set to be empty, so that the sub-thread can be ensured to continuously execute the operation of deleting the first wallpaper picture, and the wallpaper picture is ensured to be deleted successfully.
With reference to the first aspect, in one possible implementation manner, before the electronic device receives a first operation of a user on the first wallpaper option, the method further includes: the electronic equipment takes the first wallpaper picture as lock screen wallpaper and/or desktop wallpaper of the electronic equipment; after the electronic device receives the first operation of the user for the first wallpaper deleting option, the method further comprises: the electronic device takes the second wallpaper picture as lock screen wallpaper and/or desktop wallpaper of the electronic device.
Thus, after the user actively deletes the desktop wallpaper and/or the lock screen wallpaper currently used by the electronic device, the electronic device can automatically re-use the new desktop wallpaper and/or the lock screen wallpaper for the electronic device.
Optionally, a second identifier may be displayed on the second wallpaper picture, where the second identifier is used to indicate that the second wallpaper picture is a screen-locking wallpaper and/or a desktop wallpaper that is currently being used by the electronic device.
With reference to the first aspect, in one possible implementation manner, the electronic device uses the second wallpaper picture as a lock screen wallpaper and/or a desktop wallpaper of the electronic device, and specifically includes: and the electronic equipment sets the second wallpaper picture as the screen locking wallpaper and/or the desktop wallpaper of the electronic equipment through the sub-thread of the first application.
Specifically, the electronic device obtains an address of a second wallpaper picture through a second variable of the sub-thread application of the first application, and sets the second wallpaper picture as screen locking wallpaper and/or desktop wallpaper of the electronic device based on the address of the second wallpaper picture.
Thus, after the user actively deletes the desktop wallpaper and/or the lock screen wallpaper currently used by the electronic device, the electronic device may set the second wallpaper picture to the lock screen wallpaper and/or the desktop wallpaper of the electronic device through the sub-thread of the first application.
With reference to the first aspect, in one possible implementation manner, after the electronic device receives the first operation of the user for the first wallpaper deleting option, before the electronic device displays the second user interface of the first application, the method further includes: the electronic equipment clears the parameter of the first variable; the electronic device stops displaying the first user interface.
When the electronic device deletes the desktop wallpaper and/or the lock screen wallpaper which are currently used by the user, the electronic device empties the entry of the first variable which is referenced by the main thread, and stops displaying the first user interface. The electronic device then redraws and displays the second user interface.
With reference to the first aspect, in a possible implementation manner, the second user interface further includes a second wallpaper deleting option, where the second wallpaper option is used to delete the second wallpaper picture.
Thus, after the user actively deletes the first wallpaper picture, the electronic device automatically sets a new wallpaper picture (i.e., the second wallpaper picture) for the electronic device, and continues to display a wallpaper deletion interface, wherein the wallpaper deletion interface comprises wallpaper options, so that the user can delete a plurality of wallpaper pictures continuously.
With reference to the first aspect, in one possible implementation manner, after the electronic device receives a first operation of a user on a first wallpaper option, the method further includes: the electronic equipment generates a first cache file, wherein the first cache file comprises a label of a deletion interface of wallpaper.
With reference to the first aspect, in one possible implementation manner, in response to deleting the first wallpaper picture, the electronic device displays a second user interface of the first application, and specifically includes, in response to deleting the first wallpaper picture, the electronic device acquires a first cache file; the electronic equipment acquires a tag of a deleting interface of the wallpaper from the first cache file; and in response to acquiring the label of the deleting interface of the wallpaper, the electronic equipment displays a second user interface of an application.
Therefore, before the electronic equipment stops displaying the first user interface, the electronic equipment can record the label of the wallpaper deleting interface through the first cache file, so that when the electronic equipment redisplays the user interface of the wallpaper application, the electronic equipment can display the wallpaper deleting interface, namely a second user interface, based on the label of the wallpaper deleting interface recorded in the first cache file, and the second user interface can comprise a wallpaper deleting option.
With reference to the first aspect, in one possible implementation manner, the electronic device includes a wallpaper database, where the wallpaper database includes an address of the first wallpaper picture; after the electronic device receives the first operation of the user for the first wallpaper deleting option, the method further comprises: and the electronic equipment writes the address of the second wallpaper picture into the wallpaper database through the sub-thread of the first application.
After the electronic device resets the wallpaper picture, the electronic device needs to write the address of the second wallpaper picture into the wallpaper database, so that the address of the second wallpaper picture can be recorded in the wallpaper database, and the second wallpaper picture can be obtained based on the address of the second wallpaper picture recorded in the wallpaper database.
With reference to the first aspect, in a possible implementation manner, the electronic device writes the address of the second wallpaper picture into the wallpaper database through the sub-thread of the first application, and specifically includes; the electronic equipment obtains the address of a second wallpaper picture through a second variable referenced by the sub-thread of the first application; and the electronic equipment writes the address of the second wallpaper picture into the wallpaper database through the sub-thread of the first application.
In this way, the electronic device may write the address of the second wallpaper picture to the wallpaper database via the sub-thread of the first application.
With reference to the first aspect, in one possible implementation manner, after the electronic device receives a first operation of a user on a first wallpaper option, the method further includes: the electronic device deletes the address of the first wallpaper picture in the wallpaper database through the sub-thread of the first application.
After the electronic device resets the wallpaper picture, the electronic device also needs to delete the address of the first wallpaper picture in the wallpaper database.
Optionally, the electronic device may delete the address of the first wallpaper picture in the wallpaper database through a sub-thread of the first application.
With reference to the first aspect, in one possible implementation manner, the first user interface includes a second wallpaper picture.
With reference to the first aspect, in one possible implementation manner, the first user interface does not include the second wallpaper picture.
The new wallpaper picture set by the electronic device may be displayed in the first user interface, or the new wallpaper picture set by the electronic device may not be displayed in the first user interface.
In a second aspect, the present application provides an electronic device comprising one or more processors and one or more memories; wherein the one or more memories are coupled to the one or more processors, the one or more memories being for storing computer program code comprising computer instructions which, when executed by the one or more processors, cause a method of deleting wallpaper as provided in any of the possible implementations of the first aspect described above to be performed.
In a third aspect, the present application provides a chip system for application to an electronic device, the chip system comprising one or more processors for invoking computer instructions to cause execution of a method of deleting wallpaper as provided in any of the possible implementations of the first aspect.
In a fourth aspect, an embodiment of the present application provides a computer storage medium, including computer instructions, which when run on an electronic device, cause a communication apparatus to perform a method of deleting wallpaper provided in any of the possible implementations of the first aspect.
In a fifth aspect, embodiments of the present application provide a computer program product, which when run on a computer causes the computer to perform a method of deleting wallpaper as provided in any of the possible implementations of the first aspect.
For the advantages of the second to fifth aspects, reference may be made to the description of the advantages of the first aspect, and the present application will not be repeated here.
Drawings
Fig. 1 is a schematic structural diagram of an electronic device 100 according to an embodiment of the present application;
fig. 2 is a software block diagram of an electronic device 100 according to an embodiment of the present application;
Fig. 3A-3G illustrate UI diagrams after a wallpaper deletion failure on the electronic device 100;
fig. 4A-4B are schematic diagrams illustrating failure of wallpaper deletion on electronic device 100;
FIGS. 5A-5B illustrate U-diagrams of electronic device 100 after wallpaper has been successfully deleted;
fig. 6 is a schematic diagram of a method for deleting wallpaper according to an embodiment of the present application;
7A-7B illustrate schematic diagrams of wallpaper success and failure on electronic device 100;
fig. 8 is a flow chart of another method for deleting wallpaper according to the present application.
Detailed Description
The technical solutions of the embodiments of the present application will be clearly and thoroughly described below with reference to the accompanying drawings. Wherein, in the description of the embodiments of the present application, unless otherwise indicated, "/" means or, for example, a/B may represent a or B; the text "and/or" is merely an association relation describing the associated object, and indicates that three relations may exist, for example, a and/or B may indicate: the three cases where a exists alone, a and B exist together, and B exists alone, and furthermore, in the description of the embodiments of the present application, "plural" means two or more than two.
The terms "first," "second," and the like, are used below for descriptive purposes only and are not to be construed as implying or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature, and in the description of embodiments of the application, unless otherwise indicated, the meaning of "a plurality" is two or more.
The term "User Interface (UI)" in the following embodiments of the present application is a media interface for interaction and information exchange between an application program or an operating system and a user, which enables conversion between an internal form of information and a form acceptable to the user. A commonly used presentation form of the user interface is a graphical user interface (graphic user interface, GUI), which refers to a user interface related to computer operations that is displayed in a graphical manner. It may be a visual interface element of text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, etc., displayed in a display of the electronic device.
Referring to fig. 1, fig. 1 shows a schematic structural diagram of an electronic device.
The electronic device 100 may be a cell phone, tablet, desktop, laptop, handheld, notebook, ultra-mobile personal computer (ultra-mobile personal computer, UMPC), netbook, as well as a cellular telephone, personal digital assistant (personal digital assistant, PDA), augmented reality (augmented reality, AR) device, virtual Reality (VR) device, artificial intelligence (artificial intelligence, AI) device, wearable device, vehicle-mounted device, smart home device, and/or smart city device, with embodiments of the application not being particularly limited as to the particular type of electronic device.
The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, keys 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identity module (subscriber identification module, SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It should be understood that the illustrated structure of the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the application, electronic device 100 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface, among others.
The I2C interface is a bi-directional synchronous serial bus comprising a serial data line (SDA) and a serial clock line (derail clock line, SCL). In some embodiments, the processor 110 may contain multiple sets of I2C buses. The processor 110 may be coupled to the touch sensor 180K, charger, flash, camera 193, etc., respectively, through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through an I2C interface, such that the processor 110 communicates with the touch sensor 180K through an I2C bus interface to implement a touch function of the electronic device 100.
The I2S interface may be used for audio communication. In some embodiments, the processor 110 may contain multiple sets of I2S buses. The processor 110 may be coupled to the audio module 170 via an I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 may transmit an audio signal to the wireless communication module 160 through the I2S interface, to implement a function of answering a call through the bluetooth headset.
PCM interfaces may also be used for audio communication to sample, quantize and encode analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface. In some embodiments, the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface to implement a function of answering a call through the bluetooth headset. Both the I2S interface and the PCM interface may be used for audio communication.
The UART interface is a universal serial data bus for asynchronous communications. The bus may be a bi-directional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is typically used to connect the processor 110 with the wireless communication module 160. For example: the processor 110 communicates with a bluetooth module in the wireless communication module 160 through a UART interface to implement a bluetooth function. In some embodiments, the audio module 170 may transmit an audio signal to the wireless communication module 160 through a UART interface, to implement a function of playing music through a bluetooth headset.
The MIPI interface may be used to connect the processor 110 to peripheral devices such as a display 194, a camera 193, and the like. The MIPI interfaces include camera serial interfaces (camera serial interface, CSI), display serial interfaces (display serial interface, DSI), and the like. In some embodiments, processor 110 and camera 193 communicate through a CSI interface to implement the photographing functions of electronic device 100. The processor 110 and the display 194 communicate via a DSI interface to implement the display functionality of the electronic device 100.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal or as a data signal. In some embodiments, a GPIO interface may be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, an MIPI interface, etc.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the electronic device 100, and may also be used to transfer data between the electronic device 100 and a peripheral device. And can also be used for connecting with a headset, and playing audio through the headset. The interface may also be used to connect other electronic devices, such as AR devices, etc.
It should be understood that the interfacing relationship between the modules illustrated in the embodiments of the present application is only illustrative, and is not meant to limit the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also employ different interfacing manners in the above embodiments, or a combination of multiple interfacing manners.
The charge management module 140 is configured to receive a charge input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charge management module 140 may receive a charging input of a wired charger through the USB interface 130. In some wireless charging embodiments, the charge management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. The charging management module 140 may also supply power to the electronic device through the power management module 141 while charging the battery 142.
The power management module 141 is used for connecting the battery 142, and the charge management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 to power the processor 110, the internal memory 121, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be configured to monitor battery capacity, battery cycle number, battery health (leakage, impedance) and other parameters. In other embodiments, the power management module 141 may also be provided in the processor 110. In other embodiments, the power management module 141 and the charge management module 140 may be disposed in the same device.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution for wireless communication including 2G/3G/4G/5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 150 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be provided in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low frequency baseband signal to the baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs sound signals through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional module, independent of the processor 110.
The wireless communication module 160 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field wireless communication technology (near field communication, NFC), infrared technology (IR), etc., as applied to the electronic device 100. The wireless communication module 160 may be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2.
In some embodiments, antenna 1 and mobile communication module 150 of electronic device 100 are coupled, and antenna 2 and wireless communication module 160 are coupled, such that electronic device 100 may communicate with a network and other devices through wireless communication techniques. The wireless communication techniques may include the Global System for Mobile communications (global system for mobile communications, GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), wideband code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC, FM, and/or IR techniques, among others. The GNSS may include a global satellite positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a beidou satellite navigation system (beidou navigation satellite system, BDS), a quasi zenith satellite system (quasi-zenith satellite system, QZSS) and/or a satellite based augmentation system (satellite based augmentation systems, SBAS).
The electronic device 100 implements display functions through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The display screen 194 is used to display images, videos, and the like. The display 194 includes a display panel. The display panel may employ a liquid crystal display (liquid crystal display, LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED) or an active-matrix organic light-emitting diode (matrix organic light emitting diode), a flexible light-emitting diode (flex), a mini, a Micro led, a Micro-OLED, a quantum dot light-emitting diode (quantum dot light emitting diodes, QLED), or the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, N being a positive integer greater than 1.
The electronic device 100 may implement photographing functions through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
The ISP is used to process data fed back by the camera 193. For example, when photographing, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electric signal, and the camera photosensitive element transmits the electric signal to the ISP for processing and is converted into an image visible to naked eyes. ISP can also perform algorithm optimization on noise and brightness of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in the camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image onto the photosensitive element. The photosensitive element may be a charge coupled device (charge coupled device, CCD) or a Complementary Metal Oxide Semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, which is then transferred to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV, or the like format. In some embodiments, electronic device 100 may include 1 or N cameras 193, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process other digital signals besides digital image signals. For example, when the electronic device 100 selects a frequency bin, the digital signal processor is used to fourier transform the frequency bin energy, or the like.
Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 may play or record video in a variety of encoding formats, such as: dynamic picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
The NPU is a neural-network (NN) computing processor, and can rapidly process input information by referencing a biological neural network structure, for example, referencing a transmission mode between human brain neurons, and can also continuously perform self-learning. Applications such as intelligent awareness of the electronic device 100 may be implemented through the NPU, for example: image recognition, face recognition, speech recognition, text understanding, etc.
The internal memory 121 may include one or more random access memories (random access memory, RAM) and one or more non-volatile memories (NVM).
The random access memory may include a static random-access memory (SRAM), a dynamic random-access memory (dynamic random access memory, DRAM), a synchronous dynamic random-access memory (synchronous dynamic random access memory, SDRAM), a double data rate synchronous dynamic random-access memory (double data rate synchronous dynamic random access memory, DDR SDRAM, such as fifth generation DDR SDRAM is commonly referred to as DDR5 SDRAM), etc.; the nonvolatile memory may include a disk storage device, a flash memory (flash memory).
The FLASH memory may include NOR FLASH, NAND FLASH, 3D NAND FLASH, etc. divided according to an operation principle, may include single-level memory cells (SLC), multi-level memory cells (MLC), triple-level memory cells (TLC), quad-level memory cells (QLC), etc. divided according to a storage specification, may include universal FLASH memory (english: universal FLASH storage, UFS), embedded multimedia card (eMMC), etc. divided according to a storage specification.
The random access memory may be read directly from and written to by the processor 110, may be used to store executable programs (e.g., machine instructions) for an operating system or other on-the-fly programs, may also be used to store data for users and applications, and the like.
The nonvolatile memory may store executable programs, store data of users and applications, and the like, and may be loaded into the random access memory in advance for the processor 110 to directly read and write.
The external memory interface 120 may be used to connect external non-volatile memory to enable expansion of the memory capabilities of the electronic device 100. The external nonvolatile memory communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and video are stored in an external nonvolatile memory.
The electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or a portion of the functional modules of the audio module 170 may be disposed in the processor 110.
The speaker 170A, also referred to as a "horn," is used to convert audio electrical signals into sound signals. The electronic device 100 may listen to music, or to hands-free conversations, through the speaker 170A.
A receiver 170B, also referred to as a "earpiece", is used to convert the audio electrical signal into a sound signal. When electronic device 100 is answering a telephone call or voice message, voice may be received by placing receiver 170B in close proximity to the human ear.
Microphone 170C, also referred to as a "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can sound near the microphone 170C through the mouth, inputting a sound signal to the microphone 170C. The electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C, and may implement a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may also be provided with three, four, or more microphones 170C to enable collection of sound signals, noise reduction, identification of sound sources, directional recording functions, etc.
The earphone interface 170D is used to connect a wired earphone. The headset interface 170D may be a USB interface 130 or a 3.5mm open mobile electronic device platform (open mobile terminal platform, OMTP) standard interface, a american cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The pressure sensor 180A is used to sense a pressure signal, and may convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. The pressure sensor 180A is of various types, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a capacitive pressure sensor comprising at least two parallel plates with conductive material. The capacitance between the electrodes changes when a force is applied to the pressure sensor 180A. The electronic device 100 determines the strength of the pressure from the change in capacitance. When a touch operation is applied to the display screen 194, the electronic apparatus 100 detects the touch operation intensity according to the pressure sensor 180A. The electronic device 100 may also calculate the location of the touch based on the detection signal of the pressure sensor 180A. In some embodiments, touch operations that act on the same touch location, but at different touch operation strengths, may correspond to different operation instructions. For example: and executing an instruction for checking the short message when the touch operation with the touch operation intensity smaller than the first pressure threshold acts on the short message application icon. And executing an instruction for newly creating the short message when the touch operation with the touch operation intensity being greater than or equal to the first pressure threshold acts on the short message application icon.
The gyro sensor 180B may be used to determine a motion gesture of the electronic device 100. In some embodiments, the angular velocity of electronic device 100 about three axes (i.e., x, y, and z axes) may be determined by gyro sensor 180B. The gyro sensor 180B may be used for photographing anti-shake. For example, when the shutter is pressed, the gyro sensor 180B detects the shake angle of the electronic device 100, calculates the distance to be compensated by the lens module according to the angle, and makes the lens counteract the shake of the electronic device 100 through the reverse motion, so as to realize anti-shake. The gyro sensor 180B may also be used for navigating, somatosensory game scenes.
The air pressure sensor 180C is used to measure air pressure. In some embodiments, electronic device 100 calculates altitude from barometric pressure values measured by barometric pressure sensor 180C, aiding in positioning and navigation.
The magnetic sensor 180D includes a hall sensor. The electronic device 100 may detect the opening and closing of the flip cover using the magnetic sensor 180D. In some embodiments, when the electronic device 100 is a flip machine, the electronic device 100 may detect the opening and closing of the flip according to the magnetic sensor 180D. And then according to the detected opening and closing state of the leather sheath or the opening and closing state of the flip, the characteristics of automatic unlocking of the flip and the like are set.
The acceleration sensor 180E may detect the magnitude of acceleration of the electronic device 100 in various directions (typically three axes). The magnitude and direction of gravity may be detected when the electronic device 100 is stationary. The electronic equipment gesture recognition method can also be used for recognizing the gesture of the electronic equipment, and is applied to horizontal and vertical screen switching, pedometers and other applications.
A distance sensor 180F for measuring a distance. The electronic device 100 may measure the distance by infrared or laser. In some embodiments, the electronic device 100 may range using the distance sensor 180F to achieve quick focus.
The proximity light sensor 180G may include, for example, a Light Emitting Diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light outward through the light emitting diode. The electronic device 100 detects infrared reflected light from nearby objects using a photodiode. When sufficient reflected light is detected, it may be determined that there is an object in the vicinity of the electronic device 100. When insufficient reflected light is detected, the electronic device 100 may determine that there is no object in the vicinity of the electronic device 100. The electronic device 100 can detect that the user holds the electronic device 100 close to the ear by using the proximity light sensor 180G, so as to automatically extinguish the screen for the purpose of saving power. The proximity light sensor 180G may also be used in holster mode, pocket mode to automatically unlock and lock the screen.
The ambient light sensor 180L is used to sense ambient light level. The electronic device 100 may adaptively adjust the brightness of the display 194 based on the perceived ambient light level. The ambient light sensor 180L may also be used to automatically adjust white balance when taking a photograph. Ambient light sensor 180L may also cooperate with proximity light sensor 180G to detect whether electronic device 100 is in a pocket to prevent false touches.
The fingerprint sensor 180H is used to collect a fingerprint. The electronic device 100 may utilize the collected fingerprint feature to unlock the fingerprint, access the application lock, photograph the fingerprint, answer the incoming call, etc.
The temperature sensor 180J is for detecting temperature. In some embodiments, the electronic device 100 performs a temperature processing strategy using the temperature detected by the temperature sensor 180J. For example, when the temperature reported by temperature sensor 180J exceeds a threshold, electronic device 100 performs a reduction in the performance of a processor located in the vicinity of temperature sensor 180J in order to reduce power consumption to implement thermal protection. In other embodiments, when the temperature is below another threshold, the electronic device 100 heats the battery 142 to avoid the low temperature causing the electronic device 100 to be abnormally shut down. In other embodiments, when the temperature is below a further threshold, the electronic device 100 performs boosting of the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperatures.
The touch sensor 180K, also referred to as a "touch device". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is for detecting a touch operation acting thereon or thereabout. The touch sensor may communicate the detected touch operation to the application processor to determine the touch event type. Visual output related to touch operations may be provided through the display 194. In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100 at a different location than the display 194.
The bone conduction sensor 180M may acquire a vibration signal. In some embodiments, bone conduction sensor 180M may acquire a vibration signal of a human vocal tract vibrating bone pieces. The bone conduction sensor 180M may also contact the pulse of the human body to receive the blood pressure pulsation signal. In some embodiments, bone conduction sensor 180M may also be provided in a headset, in combination with an osteoinductive headset. The audio module 170 may analyze the voice signal based on the vibration signal of the sound portion vibration bone block obtained by the bone conduction sensor 180M, so as to implement a voice function. The application processor may analyze the heart rate information based on the blood pressure beat signal acquired by the bone conduction sensor 180M, so as to implement a heart rate detection function.
The keys 190 include a power-on key, a volume key, etc. The keys 190 may be mechanical keys. Or may be a touch key. The electronic device 100 may receive key inputs, generating key signal inputs related to user settings and function controls of the electronic device 100.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration alerting as well as for touch vibration feedback. For example, touch operations acting on different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 191 may also correspond to different vibration feedback effects by touching different areas of the display screen 194. Different application scenarios (such as time reminding, receiving information, alarm clock, game, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
The indicator 192 may be an indicator light, may be used to indicate a state of charge, a change in charge, a message indicating a missed call, a notification, etc.
The SIM card interface 195 is used to connect a SIM card. The SIM card may be inserted into the SIM card interface 195, or removed from the SIM card interface 195 to enable contact and separation with the electronic device 100. The electronic device 100 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 195 may support Nano SIM cards, micro SIM cards, and the like. The same SIM card interface 195 may be used to insert multiple cards simultaneously. The types of the plurality of cards may be the same or different. The SIM card interface 195 may also be compatible with different types of SIM cards. The SIM card interface 195 may also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to realize functions such as communication and data communication. In some embodiments, the electronic device 100 employs esims, i.e.: an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
The software system of the electronic device 100 may employ a layered architecture, an event driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. In the embodiment of the invention, taking an Android system with a layered architecture as an example, a software structure of the electronic device 100 is illustrated.
Fig. 2 is a software configuration block diagram of the electronic device 100 according to the embodiment of the present invention.
The layered architecture divides the software into several layers, each with distinct roles and branches. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, from top to bottom, an application layer, an application framework layer, an Zhuoyun row (Android run) and system libraries, and a kernel layer, respectively.
The application layer may include a series of application packages.
As shown in fig. 2, the application package may include applications for cameras, gallery, calendar, phone calls, maps, navigation, WLAN, bluetooth, music, video, short messages, etc.
The application framework layer provides an application programming interface (application programming interface, API) and programming framework for application programs of the application layer. The application framework layer includes a number of predefined functions.
As shown in FIG. 2, the application framework layer may include a window manager, a content provider, a view system, a telephony manager, a resource manager, a notification manager, and the like.
The window manager is used for managing window programs. The window manager can acquire the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
The content provider is used to store and retrieve data and make such data accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebooks, etc.
The view system includes visual controls, such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, a display interface including a text message notification icon may include a view displaying text and a view displaying a picture.
The telephony manager is used to provide the communication functions of the electronic device 100. Such as the management of call status (including on, hung-up, etc.).
The resource manager provides various resources for the application program, such as localization strings, icons, pictures, layout files, video files, and the like.
The notification manager allows the application to display notification information in a status bar, can be used to communicate notification type messages, can automatically disappear after a short dwell, and does not require user interaction. Such as notification manager is used to inform that the download is complete, message alerts, etc. The notification manager may also be a notification in the form of a chart or scroll bar text that appears on the system top status bar, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, a text message is prompted in a status bar, a prompt tone is emitted, the electronic device vibrates, and an indicator light blinks, etc.
Android run time includes a core library and virtual machines. Android run time is responsible for scheduling and management of the Android system.
The core library consists of two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. The virtual machine executes java files of the application program layer and the application program framework layer as binary files. The virtual machine is used for executing the functions of object life cycle management, stack management, thread management, security and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface manager (surface manager), media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., openGL ES), 2D graphics engines (e.g., SGL), etc.
The surface manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
Media libraries support a variety of commonly used audio, video format playback and recording, still image files, and the like. The media library may support a variety of audio and video encoding formats, such as MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, etc.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
The 2D graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.
The workflow of the electronic device 100 software and hardware is illustrated below in connection with capturing a photo scene.
When touch sensor 180K receives a touch operation, a corresponding hardware interrupt is issued to the kernel layer. The kernel layer processes the touch operation into the original input event (including information such as touch coordinates, time stamp of touch operation, etc.). The original input event is stored at the kernel layer. The application framework layer acquires an original input event from the kernel layer, and identifies a control corresponding to the input event. Taking the touch operation as a touch click operation, taking a control corresponding to the click operation as an example of a control of a camera application icon, the camera application calls an interface of an application framework layer, starts the camera application, further starts a camera driver by calling a kernel layer, and captures a still image or video by the camera 193.
The user may set the lock wallpaper and the desktop wallpaper of the electronic device 100. In some embodiments, a wallpaper deletion failure may occur due to a system change of the electronic device 100.
Fig. 3A-3G show UI diagrams of wallpaper deletion failure on electronic device 100.
Illustratively, as shown in FIG. 3A, the electronic device 100 displays a main interface. The main interface may include: status bar, tray with common application icons, and other application icons. Wherein the status bar may include a time indicator, a battery status indicator, one or more signal strength indicators of a wireless high-fidelity (wireless fidelity, wi-Fi) signal, one or more signal strength indicators of a mobile communication signal (also may be referred to as a cellular signal). Trays with common application icons may show: camera icons, phone icons, contact icons, and text message icons. Other application icons may be, for example: an icon of a clock, an icon of a calendar, an icon of a gallery, an icon of a memo, an icon of a video, and a set icon. The icon of any one of the applications may be used to cause the electronic device 100 to launch the application to which the icon corresponds in response to an operation (e.g., a click operation) by the user. Wherein the set icon may be used to initiate an application setting. The electronic device 100 may modify the setting items of the electronic device 100 through the setting application.
As shown in fig. 3A, the electronic device 100 receives an input operation (e.g., a click) of an icon of a setup application by a user, and in response to the input operation by the user, the electronic device 100 displays a user interface 310 as shown in fig. 3B. A number of settings are shown in the user interface 310, such as a flight mode setting (current flight mode has been turned off), a Wi-Fi setting (current Wi-Fi has been turned off), a bluetooth setting (current bluetooth function has been turned off), a personal hotspot setting, a mobile network setting, a do-not-disturb mode setting, a display and brightness setting, a Hua-Chen account setting, a wallpaper setting, and so forth.
As shown in fig. 3B, the electronic device 100 receives an input operation (e.g., a click) of the wallpaper setting item by the user, and in response to the input operation by the user, the electronic device 100 displays a user interface 320 as shown in fig. 3C.
The user interface 320 may be a setup interface of wallpaper.
As shown in fig. 3C, a plurality of wallpaper pictures are shown in user interface 320 along with interface identification 3203 and current wallpaper identification 3202. The plurality of wallpaper pictures include a wallpaper picture 3201 and a wallpaper picture 3304, wherein a current wallpaper identifier 3202 is displayed on the wallpaper picture 3201, and the current wallpaper identifier 3202 is used for indicating that wallpaper currently used by the electronic device 100 is the wallpaper picture 3201. Interface identifier 3203 is used to indicate that user interface 320 is a wallpaper setting interface, and a user may change wallpaper, delete wallpaper, add wallpaper, etc. in user interface 320.
When the user needs to delete wallpaper, the user may operate a delete interface into the wallpaper in user interface 320.
For example, as shown in fig. 3C, the electronic device 100 may receive an input operation (e.g., a long press operation) by a user with respect to the wallpaper picture 3201, and in response to the input operation by the user, the electronic device 100 may display the user interface 330 shown in fig. 3D.
The user interface 330 may be a delete interface of wallpaper.
As shown in fig. 3D, a plurality of wallpaper pictures are shown in user interface 330 along with interface identification 3301 and current wallpaper identification 3202. The plurality of wallpaper pictures include a wallpaper picture 3201 and a wallpaper picture 3304, wherein a current wallpaper identifier 3202 is displayed on the wallpaper picture 3201, and the current wallpaper identifier 3202 is used for indicating that wallpaper currently used by the electronic device 100 is the wallpaper picture 3201. Interface identification 3203 is used to indicate that user interface 330 is a delete interface for wallpaper. The user may delete wallpaper in user interface 320. Also included in the user interface 330 is a delete option for deleting wallpaper. As shown in fig. 3D, each wallpaper picture has a delete option, and the delete option on each wallpaper picture is used to delete the corresponding wallpaper picture. For example, a delete option 3302 is displayed on the wallpaper picture 3201, and the delete option 3302 is used to delete the wallpaper picture 3201. A delete option 3305 is displayed on the wallpaper picture 3304, and the delete option 3305 is used to delete the wallpaper picture 3304.
Alternatively, in some embodiments, the electronic device 100 may only receive user operations to delete custom wallpaper or operator wallpaper, etc., and may not delete system wallpaper. The customized wallpaper can be a wallpaper picture made of pictures selected by a user from a gallery, and the operator wallpaper can be a wallpaper picture downloaded by the user from a server. The system wallpaper may be a wallpaper picture with a threshold within the device at the factory of the electronic device 100.
For example, the electronic device 100 may receive an input operation (e.g., a long press operation) by a user with respect to the wallpaper picture 3201, and in response to the input operation by the user, the electronic device 100 may display the user interface 340 shown in fig. 3E. User interface 340 is similar to user interface 330, except that wallpaper picture 3303 in user interface 340 does not include delete option 3302, thereby indicating that wallpaper picture 3303 may be a system wallpaper, and that the user cannot delete wallpaper picture 3303.
After the electronic device 100 displays the user interface 330 shown in fig. 3D, the electronic device 100 may receive a user operation to delete one or more wallpaper pictures.
In some implementations, the electronic device 100 may receive a user operation to delete a wallpaper picture currently used by the electronic device 100. After the electronic device 100 deletes the wallpaper picture currently used by the electronic device 100, the electronic device 100 may automatically set a new wallpaper picture for the electronic device 100.
For example, as shown in fig. 3F, the electronic device 100 may receive an input operation (e.g., a single click) by a user for the delete option 3302 in the user interface 330, and in response to the input operation by the user, the electronic device 100 may display the user interface 350 shown in fig. 3G.
The user interface 350 may be a setup interface for wallpaper.
As shown in fig. 3G, a plurality of wallpaper pictures are shown in user interface 350 along with interface identification 3503 and current wallpaper identification 3502. The plurality of wallpaper pictures include a wallpaper picture 3501, a wallpaper picture 3201, a wallpaper picture 3304, and the like, wherein a current wallpaper identifier 3502 is displayed on the wallpaper picture 3501, and the current wallpaper identifier 3502 is used for indicating that wallpaper currently used by the electronic device 100 is the wallpaper picture 3501. Interface identification 3503 is used to indicate that user interface 350 is a delete interface for wallpaper.
As can be seen from fig. 3G, after the user performs the operation of deleting the wallpaper picture 3201, the wallpaper picture 3201 is further included in the user interface 350, that is, a case where the wallpaper picture deletion fails occurs. After the user performs the deletion of the wallpaper picture 3201, the user interface 350 is a wallpaper setting interface, and is not a wallpaper deletion interface. If the user needs to continuously delete a plurality of wallpaper pictures, the user needs to press the wallpaper pictures for a long time again to enter a wallpaper deleting interface, and the user operation is complicated.
Alternatively, after the user performs deleting the wallpaper picture 3201, not only the wallpaper picture 3501 is used as the wallpaper picture currently used by the electronic device 100, but also other wallpaper pictures displayed in the user interface 330 can be replaced by wallpaper pictures currently used by the electronic device 100, which is not limited in the present application.
Based on the above-described failure of wallpaper deletion and the schematic diagram of the setting interface that can only display wallpaper after the user performs the operation of deleting the wallpaper picture, the reason why the above-described failure of wallpaper deletion and the setting interface that can only display wallpaper after the user performs the operation of deleting the wallpaper picture will be explained next.
After the electronic device 100 receives the user operation to enter the wallpaper setting interface, the main thread of the wallpaper application will run. When the electronic device 100 receives a user operation to perform an operation of deleting a wallpaper picture in the wallpaper application, the electronic device 100 creates a sub-thread of the wallpaper application, and the sub-thread performs a task of deleting the wallpaper picture.
Currently, when the operation of deleting the wallpaper picture is performed, the system CONFIG (for example, config_asset_path=0x80000000) will change, and the electronic device 100 will call the wallpaper frame interface to reset the wallpaper picture, and when the wallpaper frame interface resets the wallpaper picture, the electronic device 100 performs two operations, which may include a wallpaper setting interface destruction operation and a wallpaper setting interface re-pull operation.
After the electronic device 100 performs the wallpaper setting interface re-pulling operation, the current wallpaper deleting interface is closed, and the wallpaper setting interface is re-entered, for example, the wallpaper setting interface similar to the user interface 320 is re-displayed according to the method shown in fig. 3A-3C. Without directly entering a wallpaper deletion interface like user interface 320 shown in fig. 3D. Resulting in the electronic device 100 not displaying a wallpaper deletion interface like the user interface 320 after the user performs the operation of deleting the wallpaper picture.
When the electronic device 100 receives a user operation to delete a wallpaper picture, as shown in fig. 4A, the electronic device 100 refers to an mdesetdefaultinfo variable in a stack, and the entry of the mdesetdefaultinfo variable is the address of the wallpaper picture currently used by the electronic device 100, and the wallpaper picture currently used by the electronic device 100 may be stored in the stack. For example, the entry of the mdelesetdefaultinfo variable may be the address of wallpaper picture 3501 shown in fig. 3G.
Meanwhile, when the electronic device 100 receives a user operation to delete the wallpaper picture, the electronic device 100 creates a sub-thread, and the sub-thread performs operations such as deleting the wallpaper picture and updating the database. As shown in FIG. 4B, the child thread will also reference the mDelSetDefaultInfo variable. When the electronic device 100 performs the wallpaper setting interface re-pull operation, the system invokes an onstop method that clears the entry of the mdeletsetdefaultinfo variable referenced by the main thread to clear the memory space. The child thread also refers to the mdeletsetdefaultinfo variable to perform operations such as deleting wallpaper pictures and updating databases. Since the entry of the mdeletsetdefaultinfo variable referenced by the main thread is empty, the entry of the mdeletsetdefaultinfo variable referenced by the sub-thread is also empty, and in the case where the entry of the mdeletsetdefaultinfo variable referenced by the sub-thread is empty, the sub-thread cannot update the database. The child thread cannot delete the wallpaper picture, namely the problem of wallpaper deletion failure occurs.
In order to solve the above problems, the present application provides a method for deleting wallpaper, which can ensure that wallpaper is successfully deleted, and simultaneously ensure that after a user performs a wallpaper picture deleting operation, the electronic device 100 can continuously display a wallpaper deleting interface, so that the user can continuously delete a plurality of wallpaper pictures, and the operation of the user is saved.
The application provides a wallpaper deleting method and electronic equipment. The method comprises the following steps: the electronic equipment displays a first user interface of a first application, wherein the first user interface comprises a first wallpaper picture and a first wallpaper deleting option, and the first wallpaper deleting option is used for deleting the first wallpaper picture; the electronic equipment receives a first operation of a user aiming at a first wallpaper deleting option; the electronic device takes the address of the second wallpaper picture as a reference of a first variable referenced by a main thread of the first application; responding to the first operation, the electronic equipment creates a second variable, takes the address of the second wallpaper picture as the reference of the second variable, and the sub-thread of the first application refers to the second variable; the electronic equipment deletes the first wallpaper picture through the sub-thread of the first application; in response to deleting the first wallpaper picture, the electronic device displays a second user interface of the first application, the second user interface including no first wallpaper picture.
The second wallpaper picture may be a new wallpaper picture automatically set by the electronic device after the user deletes the first wallpaper picture.
Optionally, a first identifier may be displayed on the first wallpaper picture, where the first identifier is used to indicate that the first wallpaper picture is a screen-locking wallpaper and/or a desktop wallpaper that is currently being used by the electronic device.
The electronic device can execute the operation of deleting the wallpaper through the sub-thread of the first application so as to lighten the load of the main thread of the first application, and the efficiency of deleting the wallpaper and resetting the wallpaper can be improved.
Before the electronic device performs the operation of deleting the wallpaper through the sub-thread of the first application, the electronic device needs to create a second variable. The sub-thread of the first application needs to refer to the second variable and take the address of the second wallpaper picture as the reference of the second variable.
In the case where the reference of the second variable referenced by the child thread of the first application is not null, the child thread of the first application may successfully delete the first wallpaper picture. Because the sub-thread of the first application refers to the second variable instead of the first variable, when the electronic device deletes the first wallpaper picture currently used by the electronic device, the electronic device executes the operations of destroying the wallpaper interface and restarting the wallpaper interface, and when the electronic device executes the operations of destroying the wallpaper interface and restarting the wallpaper interface, the electronic device sets the participation of the first variable referred to by the main thread to be empty. The reference of the second variable which is cited by the sub-thread is not set to be empty, so that the sub-thread can be ensured to continuously execute the operation of deleting the first wallpaper picture, and the wallpaper picture is ensured to be deleted successfully.
First, an effect diagram after executing the wallpaper deleting method provided by the application is introduced.
Fig. 5A-5B illustrate U-diagrams of electronic device 100 after wallpaper is successfully deleted.
In some implementations, the electronic device 100 may receive a user operation to delete a wallpaper picture currently used by the electronic device 100. After the electronic device 100 deletes the wallpaper picture currently used by the electronic device 100, the electronic device 100 may automatically set a new wallpaper picture for the electronic device 100.
For example, as shown in fig. 5A, the electronic device 100 may receive an input operation (e.g., a single click) by a user for the delete option 3302 in the user interface 330, and in response to the input operation by the user, the electronic device 100 may display the user interface 510 shown in fig. 5B.
User interface 510 may be a delete interface for wallpaper.
As shown in fig. 5B, a plurality of wallpaper pictures are shown in user interface 510 along with interface identifier 3301 and current wallpaper identifier 5101. The plurality of wallpaper pictures include a wallpaper picture 3501, a wallpaper picture 3304, and the like, wherein the wallpaper picture 3501 is displayed with a current wallpaper identifier 5101, and the current wallpaper identifier 5101 is used for indicating that wallpaper currently used by the electronic device 100 is the wallpaper picture 3501. Interface identification 3301 is used to indicate that user interface 510 is a delete interface for wallpaper.
A delete option 5102 is displayed on the wallpaper picture 3501, and the delete option 5102 is used to indicate that the user interface 510 is a delete interface for wallpaper.
As can be seen in fig. 5B, the electronic device 100 has deleted the wallpaper picture 3201. Also, after the user performs the operation of deleting the wallpaper picture 3201, the electronic device 100 further displays a wallpaper deletion interface, for example, a deletion option is included on the wallpaper picture in the wallpaper deletion interface, and the deletion option is used for deleting the wallpaper picture by the user.
Next, description will be given of how the electronic device 100 successfully deletes the wallpaper and continues to display the wallpaper deletion interface after deleting the wallpaper.
Fig. 6 is a schematic diagram of a method for deleting wallpaper according to an embodiment of the present application.
As shown in fig. 6, the electronic device 100 includes an interface display module, a main thread, a system framework, and sub threads.
S601, the electronic device 100 displays a wallpaper deleting interface.
Illustratively, the delete interface of wallpaper may be user interface 330 shown in FIG. 3D.
S602, the electronic device 100 receives a user operation to delete the first wallpaper picture.
The wallpaper deleting interface comprises a first wallpaper picture.
For example, the first wallpaper picture may be the wallpaper picture 3201 shown in fig. 3D, the wallpaper picture 3201 being a wallpaper picture currently being used by the electronic device 100.
S603, in response to the operation of deleting the first wallpaper picture, the electronic device 100 assigns the mdelesetdefaultinfo variable referenced by the main thread as the address of the second wallpaper picture.
In response to the operation of deleting the first wallpaper picture, the electronic device 100 assigns the mdeletsetdefaultinfo variable referenced by the main thread as the address of the second wallpaper picture.
The address of the second wallpaper picture may be an address of the wallpaper picture 3201. That is, the second wallpaper picture is the same as the first wallpaper picture, and the first wallpaper picture deleted by the user is not the wallpaper picture currently being used by the electronic device 100.
S604, the electronic device 100 creates a DelSetDefaultInfo variable, and assigns the DelSetDefaultInfo variable as an address of the second wallpaper picture.
As shown in fig. 7A, in response to an operation to delete the first wallpaper picture, the electronic device 100 creates a DelSetDefaultInfo variable, and assigns the DelSetDefaultInfo variable to an address of the second wallpaper picture (e.g., an address of the wallpaper picture 3501). The value of the mdelesetdefaultinfo variable and the value of the deltadeltadeltadeltadeltadeltadeltadeltas are both addresses of the second wallpaper picture (e.g., wallpaper picture 3501).
Because after the user performs the wallpaper deleting operation, the electronic device 100 performs two operations of destroying the wallpaper deleting interface and re-pulling the wallpaper setting interface. During execution of these two operations by the electronic device 100, the electronic device 100 clears the value of the mdeletsetdefaultinfo variable referenced by the main thread of the electronic device 100 to free up memory space.
After the electronic device 100 clears the value of the mdeletsetdefaultinfo variable referenced by the main thread of the electronic device 100, based on the foregoing description, a problem may occur in that the wallpaper deletion fails and only the setting interface of the wallpaper can be displayed after the user performs the operation of deleting the wallpaper picture. To avoid this, the electronic device 100 would additionally create a DelSetDefaultInfo variable, assign the DelSetDefaultInfo variable to the address of the second wallpaper picture (e.g., the address of wallpaper picture 3501). I.e., the value of the DelSetDefaultInfo variable is the same as the value of the mDelSetDefaultInfo variable.
Thus, during the two operations performed by the electronic device 100, the electronic device 100 clears the value of the mdesetdefaultinfo variable referenced by the main thread of the electronic device 100, but the value of the DelSetDefaultInfo variable is not cleared, and the value of the DelSetDefaultInfo variable can be transferred to the sub-thread, so that the problems that wallpaper deletion fails and a setting interface only capable of displaying wallpaper after the user performs the wallpaper picture deleting operation are avoided.
S605, in response to the operation of deleting the first wallpaper picture, the electronic device 100 creates a child thread that references the deltasetdefaultinfo variable.
In response to the operation to delete the first wallpaper picture, the electronic device 100 creates a sub-thread, which may be a sub-thread of the first application. The sub-thread is used for executing the operation of deleting the first wallpaper picture and refreshing the database. Because the main thread also needs to execute other task matters, the operation of deleting the first wallpaper picture and refreshing the database is executed by the sub-thread of the first application, so that the burden of the main thread can be reduced, and the efficiency of deleting the wallpaper picture is improved.
As shown in fig. 7A, in response to the operation of deleting the first wallpaper picture, the electronic device 100 creates a child thread that references the deltasetdefaultinfo variable. The value of the DelSetDefaultInfo variable is the address of the second wallpaper picture and the value of the DelSetDefaultInfo variable is used to point to the second wallpaper picture.
S606, the electronic device 100 deletes the first wallpaper picture through the sub-thread.
The sub-thread refers to a DelSetDefaultInfo variable, the value of the DelSetDefaultInfo variable is the address of the second wallpaper picture, and the sub-thread can delete the first wallpaper picture under the condition that the value of the DelSetDefaultInfo variable is not null so as to realize successful deletion of the first wallpaper picture.
S607, the electronic device 100 generates a first cache file, where the first cache file includes a tag of a deletion interface of the wallpaper.
In response to the operation of deleting the first wallpaper picture, the electronic device 100 performs two operations of destroying the wallpaper deletion interface and restarting the wallpaper setting interface. After the electronic device 100 performs these two operations, the electronic device 100 may stay at a setup interface of wallpaper, such as the user interface 350 shown in fig. 3G. If the user needs to continuously delete a plurality of wallpaper pictures, the user needs to operate the wallpaper deletion interface again, and the user operation is complicated.
After the electronic device responds to the operation of deleting the first wallpaper picture, in order to enable the electronic device 100 to stay on the wallpaper deleting interface, the electronic device 100 can generate a first cache file in response to the operation of deleting the first wallpaper picture, wherein the first cache file comprises a label of the wallpaper deleting interface.
Alternatively, the electronic device 100 may call the SharePreferences method to generate and store the first cache file.
Optionally, the first cache file may include a key-value key pair. The value of the key may be is_deleted_cut_ WALLPAPER, and the value of the value may be true. The electronic device 100 may obtain a corresponding value according to the key, and further take a label of the deletion interface of the wallpaper.
S608, the electronic device 100 invokes the wallpaper frame interface to reset the wallpaper.
In response to the operation of deleting the first wallpaper picture, the electronic device 100 may call the wallpaper frame interface, reset the wallpaper by the wallpaper frame interface, and perform a restarting operation on the wallpaper interface by the wallpaper frame interface, so that the electronic device 100 may display the interface after deleting the first wallpaper picture.
S609, the electronic device 100 updates the database based on the DelSetDefaultInfo variable referenced by the child thread.
As shown in fig. 7A, in response to the operation of deleting the first wallpaper picture, the electronic device 100 creates a child thread that references the deltasetdefaultinfo variable. The value of the DelSetDefaultInfo variable is the address of the second wallpaper picture and the value of the DelSetDefaultInfo variable is used to point to the second wallpaper picture.
The electronic device 100 may update the database based on the DelSetDefaultInfo variable referenced by the child thread.
The electronic device 100 may obtain the address of the second wallpaper picture based on the DelSetDefaultInfo variable referenced by the sub-thread, and write the address of the second wallpaper picture into the database through the sub-thread, so that the address of the second wallpaper picture may be recorded in the database, and subsequently the second wallpaper picture may be obtained based on the address of the second wallpaper picture recorded in the database.
In one possible implementation, after the electronic device resets the wallpaper picture, the electronic device also deletes the address of the first wallpaper picture in the database.
Optionally, the electronic device may delete the address of the first wallpaper picture in the database through a sub-thread of the first application.
S610, the electronic device 100 calls the wallpaper frame interface to execute a restarting operation on the wallpaper interface.
The electronic device 100 invokes the wallpaper frame interface to perform a restarting operation on the wallpaper interface, that is, the wallpaper frame interface performs the restarting operation on the wallpaper interface, so that the electronic device 100 may display the interface after deleting the first wallpaper picture.
S611, the electronic device 100 executes the wallpaper interface destruction stage lifecycle management method.
The electronic device 100 executes the wallpaper interface destruction stage lifecycle management method, that is, in response to the operation of deleting the first wallpaper picture, executes the destruction operation of the wallpaper deletion interface and the restarting operation of the wallpaper setting interface, so that the electronic device 100 can display the interface after deleting the first wallpaper picture.
S612, the electronic device 100 sets the value of mdeletdefaultinfo variable referenced by the main thread to null.
Optionally, the electronic device 100 may call the onstop method, and execute the destruction operation of the wallpaper deletion interface and the restarting operation of the wallpaper setting interface through the onstop method, so that the electronic device 100 may display the interface after deleting the first wallpaper picture.
In response to the electronic device 100 executing the wallpaper interface destruction phase lifecycle management method, the electronic device 100 needs to set the value of the mdeletsetdefaultinfo variable referenced by the main thread to null to free up memory space.
As shown in fig. 7B, after the electronic device 100 sets the value of the mdesetdefaultinfo variable referenced by the main thread to null, the value of the DelSetDefaultInfo variable referenced by the sub-thread is not null, and the value of the DelSetDefaultInfo variable referenced by the sub-thread is the address of the second wallpaper picture. Under the condition that the value of the DelSetDefaultInfo variable referenced by the sub-thread is not null, the operation that the sub-thread can normally execute to delete the first wallpaper picture is ensured, and meanwhile, the sub-thread can update the database based on the value of the DelSetDefaultInfo variable referenced by the sub-thread (such as the address of the second wallpaper picture).
S613, the electronic device 100 destroys the wallpaper interface and re-pulls up.
In response to executing the wallpaper interface destruction stage lifecycle management method, the electronic device 100 destroys and redraws the wallpaper interface. That is, the electronic device 100 destroys the wallpaper deletion interface pin, and then restarts the wallpaper setting interface.
S614, the electronic device 100 acquires the first cache file and acquires the tag of the deletion interface of the wallpaper.
Before the electronic device displays the wallpaper interface, the electronic device 100 may obtain the first cache file, and obtain the tag of the deletion interface of the wallpaper from the first cache file. The electronic device 100 may cause the electronic device 100 to continue displaying the deletion interface of the wallpaper based on the tag of the deletion interface of the wallpaper, instead of displaying only the setting interface of the wallpaper.
S615, the electronic device 100 continues to display the wallpaper deletion interface, where the wallpaper deletion interface does not include the first wallpaper picture.
The electronic device 100 continues to display a wallpaper deletion interface, where the wallpaper deletion interface does not include the first wallpaper picture. By the method, the electronic device 100 not only deletes the first wallpaper picture, but also continuously displays the wallpaper deleting interface, so that a user can continuously delete other wallpaper pictures in the wallpaper deleting interface, and the problem that the user can only display the wallpaper setting interface after executing the wallpaper picture deleting operation is avoided.
Illustratively, the deletion interface of wallpaper that electronic device 100 continues to display may be user interface 510 shown in fig. 5B. None of the user interfaces 510 include the first wallpaper picture. For example, wallpaper picture 3201 is not included in user interface 510.
Fig. 8 is a flow chart of another method for deleting wallpaper according to the present application.
S801, the electronic device displays a first user interface of a first application, wherein the first user interface comprises a first wallpaper picture and a first wallpaper deleting option, and the first wallpaper deleting option is used for deleting the first wallpaper picture.
Illustratively, the first user interface may be user interface 330 shown in FIG. 5A.
The first wallpaper picture may be the wallpaper picture 3201 shown in fig. 5A.
The first delete wallpaper option may be delete option 3302 shown in fig. 5A.
Optionally, a first identifier may be displayed on the first wallpaper picture, where the first identifier is used to indicate that the first wallpaper picture is a screen-locking wallpaper and/or a desktop wallpaper that is currently being used by the electronic device.
S802, the electronic equipment receives a first operation of a user aiming at a first wallpaper deleting option.
Illustratively, the first operation may be an input operation shown in fig. 5A for the delete option 3302 shown in fig. 5A.
S803, in response to the first operation, the electronic device takes the address of the second wallpaper picture as an entry for a first variable referenced by the main thread of the first application.
Illustratively, the first variable may be a mdelesetdefaultinfo variable.
The second wallpaper picture may be, for example, wallpaper picture 3501 shown in fig. 5B.
S804, the electronic equipment creates a second variable and a sub-thread of the first application, and assigns the input parameter of the first variable to the second variable, wherein the input parameter of the second variable is the address of the second wallpaper picture, and the sub-thread of the first application references the second variable.
The second wallpaper picture may be a new wallpaper picture automatically set by the electronic device after the user deletes the first wallpaper picture.
Illustratively, the second variable may be a DelSetDefaultInfo variable.
S805, the electronic device deletes the first wallpaper picture through the sub-thread of the first application.
The electronic device can execute the operation of deleting the wallpaper through the sub-thread of the first application so as to lighten the load of the main thread of the first application, and the efficiency of deleting the wallpaper and resetting the wallpaper can be improved.
Before the electronic device performs the operation of deleting the wallpaper through the sub-thread of the first application, the electronic device needs to create a second variable. The sub-thread of the first application needs to refer to the second variable and take the address of the second wallpaper picture as the reference of the second variable.
S806, the electronic device displays a second user interface of the first application, wherein the second user interface does not comprise the first wallpaper picture, and the second user interface comprises the second wallpaper picture.
By way of example, the second user interface may be user interface 510 shown in FIG. 5B.
In the case where the reference of the second variable referenced by the child thread of the first application is not null, the child thread of the first application may successfully delete the first wallpaper picture. Because the sub-thread of the first application refers to the second variable instead of the first variable, when the electronic device deletes the first wallpaper picture currently used by the electronic device, the electronic device executes the operations of destroying the wallpaper interface and restarting the wallpaper interface, and when the electronic device executes the operations of destroying the wallpaper interface and restarting the wallpaper interface, the electronic device sets the participation of the first variable referred to by the main thread to be empty. The reference of the second variable which is cited by the sub-thread is not set to be empty, so that the sub-thread can be ensured to continuously execute the operation of deleting the first wallpaper picture, and the wallpaper picture is ensured to be deleted successfully.
In one possible implementation, before the electronic device receives the first operation of the user for the first wallpaper option, the method further includes: the electronic equipment takes the first wallpaper picture as lock screen wallpaper and/or desktop wallpaper of the electronic equipment; after the electronic device receives the first operation of the user for the first wallpaper deleting option, the method further comprises: the electronic device takes the second wallpaper picture as lock screen wallpaper and/or desktop wallpaper of the electronic device.
Thus, after the user actively deletes the desktop wallpaper and/or the lock screen wallpaper currently used by the electronic device, the electronic device can automatically re-use the new desktop wallpaper and/or the lock screen wallpaper for the electronic device.
Optionally, a second identifier may be displayed on the second wallpaper picture, where the second identifier is used to indicate that the second wallpaper picture is a screen-locking wallpaper and/or a desktop wallpaper that is currently being used by the electronic device.
In one possible implementation manner, the electronic device uses the second wallpaper picture as a lock screen wallpaper and/or a desktop wallpaper of the electronic device, and specifically includes: and the electronic equipment sets the second wallpaper picture as the screen locking wallpaper and/or the desktop wallpaper of the electronic equipment through the sub-thread of the first application.
Thus, after the user actively deletes the desktop wallpaper and/or the lock screen wallpaper currently used by the electronic device, the electronic device may set the second wallpaper picture to the lock screen wallpaper and/or the desktop wallpaper of the electronic device through the sub-thread of the first application.
In one possible implementation, after the electronic device receives the first operation of the user for the first wallpaper deletion option, before the electronic device displays the second user interface of the first application, the method further includes: the electronic equipment clears the parameter of the first variable; the electronic device stops displaying the first user interface.
When the electronic device deletes the desktop wallpaper and/or the lock screen wallpaper which are currently used by the user, the electronic device empties the entry of the first variable which is referenced by the main thread, and stops displaying the first user interface. The electronic device then redraws and displays the second user interface.
In one possible implementation, the second user interface further includes a second wallpaper deletion option, where the second wallpaper deletion option is used to delete the second wallpaper picture.
Illustratively, the second delete wallpaper option may be delete option 5102 shown in fig. 5B.
Thus, after the user actively deletes the first wallpaper picture, the electronic device automatically sets a new wallpaper picture (i.e., the second wallpaper picture) for the electronic device, and continues to display a wallpaper deletion interface, wherein the wallpaper deletion interface comprises wallpaper options, so that the user can delete a plurality of wallpaper pictures continuously.
In one possible implementation, after the electronic device receives the first operation of the user for the first wallpaper deletion option, the method further includes: the electronic equipment generates a first cache file, wherein the first cache file comprises a label of a deletion interface of wallpaper.
With reference to the first aspect, in one possible implementation manner, in response to deleting the first wallpaper picture, the electronic device displays a second user interface of the first application, and specifically includes, in response to deleting the first wallpaper picture, the electronic device acquires a first cache file; the electronic equipment acquires a tag of a deleting interface of the wallpaper from the first cache file; and in response to acquiring the label of the deleting interface of the wallpaper, the electronic equipment displays a second user interface of an application.
Therefore, before the electronic equipment stops displaying the first user interface, the electronic equipment can record the label of the wallpaper deleting interface through the first cache file, so that when the electronic equipment redisplays the user interface of the wallpaper application, the electronic equipment can display the wallpaper deleting interface, namely a second user interface, based on the label of the wallpaper deleting interface recorded in the first cache file, and the second user interface can comprise a wallpaper deleting option.
In one possible implementation, the electronic device includes a wallpaper database including an address of the first wallpaper picture; after the electronic device receives the first operation of the user for the first wallpaper deleting option, the method further comprises: and the electronic equipment writes the address of the second wallpaper picture into the wallpaper database through the sub-thread of the first application.
After the electronic equipment resets the wallpaper picture, the electronic equipment needs to write the address of the second wallpaper picture into the wallpaper database, so that the address of the second wallpaper picture can be recorded in the wallpaper database, and the subsequent acquisition of the second wallpaper picture based on the address of the second wallpaper picture recorded in the wallpaper database is avoided.
In one possible implementation manner, the electronic device writes the address of the second wallpaper picture into the wallpaper database through the sub-thread of the first application, and specifically includes; the electronic equipment obtains the address of a second wallpaper picture through a second variable referenced by the sub-thread of the first application; and the electronic equipment writes the address of the second wallpaper picture into the wallpaper database through the sub-thread of the first application.
In this way, the electronic device may write the address of the second wallpaper picture to the wallpaper database via the sub-thread of the first application.
In one possible implementation, after the electronic device receives the first operation of the user for the first wallpaper deletion option, the method further includes: the electronic device deletes the address of the first wallpaper picture in the wallpaper database through the sub-thread of the first application.
After the electronic device resets the wallpaper picture, the electronic device also needs to delete the address of the first wallpaper picture in the wallpaper database.
Optionally, the electronic device may delete the address of the first wallpaper picture in the wallpaper database through a sub-thread of the first application.
In one possible implementation, the first user interface includes a second wallpaper picture therein.
In one possible implementation, the second wallpaper picture is not included in the first user interface.
The new wallpaper picture set by the electronic device may be displayed in the first user interface, or the new wallpaper picture set by the electronic device may not be displayed in the first user interface.
The application provides an electronic device comprising one or more processors and one or more memories; wherein the one or more memories are coupled to the one or more processors, the one or more memories for storing computer program code comprising computer instructions that when executed by the one or more processors cause a method of deleting wallpaper as shown in fig. 8 to be performed.
The application provides a chip system, which is applied to electronic equipment, and comprises one or more processors, wherein the processors are used for calling computer instructions to cause a wallpaper deleting method shown in fig. 8 to be executed.
An embodiment of the present application provides a computer storage medium including computer instructions that, when executed on an electronic device, cause a communication apparatus to perform a method of deleting wallpaper as shown in fig. 8.
Embodiments of the present application provide a computer program product which, when run on a computer, causes the computer to perform a method of deleting wallpaper as shown in fig. 8.
The embodiments of the present application may be arbitrarily combined to achieve different technical effects.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions in accordance with the present application are produced in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital subscriber line), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a Solid State Disk (SSD)), or the like.
Those of ordinary skill in the art will appreciate that implementing all or part of the above-described method embodiments may be accomplished by a computer program to instruct related hardware, the program may be stored in a computer readable storage medium, and the program may include the above-described method embodiments when executed. And the aforementioned storage medium includes: ROM or random access memory RAM, magnetic or optical disk, etc.
In summary, the foregoing description is only exemplary embodiments of the present invention and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made according to the disclosure of the present invention should be included in the protection scope of the present invention.

Claims (15)

1. A method of deleting wallpaper, the method comprising:
the method comprises the steps that the electronic equipment displays a first user interface of a first application, wherein the first user interface comprises a first wallpaper picture and a first wallpaper deleting option, and the first wallpaper deleting option is used for deleting the first wallpaper picture;
the electronic equipment receives a first operation of a user aiming at the first wallpaper deleting option;
in response to the first operation, the electronic device references an address of a second wallpaper picture as a first variable referenced by a main thread of the first application;
The electronic equipment creates a second variable and a sub-thread of the first application, and assigns the participation of the first variable to the second variable, wherein the participation of the second variable is the address of the second wallpaper picture, and the sub-thread of the first application refers to the second variable;
the electronic equipment deletes the first wallpaper picture through the sub-thread of the first application;
the electronic device displays a second user interface of the first application, wherein the second user interface does not comprise the first wallpaper picture, and the second user interface comprises the second wallpaper picture.
2. The method of claim 1, wherein prior to the electronic device receiving a first operation by a user for the first delete wallpaper option, the method further comprises:
the electronic equipment takes the first wallpaper picture as a screen locking wallpaper and/or a desktop wallpaper of the electronic equipment;
after the electronic device receives a first operation of a user for the first wallpaper-deleting option, the method further comprises:
and the electronic equipment takes the second wallpaper picture as a screen locking wallpaper and/or a desktop wallpaper of the electronic equipment.
3. The method according to claim 2, wherein the electronic device uses the second wallpaper picture as a lock wallpaper and/or a desktop wallpaper of the electronic device, and specifically comprises:
and the electronic equipment sets the second wallpaper picture as screen locking wallpaper and/or desktop wallpaper of the electronic equipment through the sub-thread of the first application.
4. A method according to any of claims 1-3, wherein after the electronic device receives a first operation by a user for the first wallpaper deletion option, before the electronic device displays a second user interface of the first application, the method further comprises:
the electronic equipment empties the parameter of the first variable;
the electronic device stops displaying the first user interface.
5. A method according to any of claims 1-3, characterized in that a second wallpaper deletion option is also included in the second user interface, said second wallpaper deletion option being used for deleting the second wallpaper picture.
6. The method of claim 5, wherein after the electronic device receives a first operation by a user for the first delete wallpaper option, the method further comprises:
And the electronic equipment generates a first cache file, wherein the first cache file comprises a label of a deletion interface of the wallpaper.
7. The method of claim 6, wherein the electronic device displays a second user interface of the first application, comprising in particular,
the electronic equipment acquires the first cache file;
the electronic equipment acquires a label of a deletion interface of the wallpaper from the first cache file;
and the electronic equipment displays the second user interface of the application in response to acquiring the label of the deleting interface of the wallpaper.
8. A method according to any of claims 1-3, wherein the electronic device comprises a wallpaper database comprising an address of the first wallpaper picture; after the electronic device receives a first operation of a user for the first wallpaper-deleting option, the method further comprises:
and the electronic equipment writes the address of the second wallpaper picture into the wallpaper database through the sub-thread of the first application.
9. The method according to claim 8, wherein the electronic device writes the address of the second wallpaper picture to the wallpaper database via a sub-thread of the first application, in particular comprising;
The electronic equipment obtains the address of the second wallpaper picture through the second variable referenced by the sub-thread of the first application;
and the electronic equipment writes the address of the second wallpaper picture into the wallpaper database through the sub-thread of the first application.
10. The method of claim 9, wherein after the electronic device receives a first operation by a user for the first delete wallpaper option, the method further comprises:
and deleting the address of the first wallpaper picture in the wallpaper database by the electronic equipment through the sub-thread of the first application.
11. A method according to any of claims 1-3, wherein the second wallpaper picture is included in the first user interface.
12. A method according to any of claims 1-3, wherein the second wallpaper picture is not included in the first user interface.
13. An electronic device comprising one or more processors and one or more memories; wherein the one or more memories are coupled to the one or more processors, the one or more memories for storing computer program code comprising computer instructions that, when executed by the one or more processors, cause the method of any of claims 1-12 to be performed.
14. A chip system for application to an electronic device, the chip system comprising one or more processors for invoking computer instructions to cause performance of the method of any of claims 1-12.
15. A computer readable storage medium comprising instructions which, when run on an electronic device, cause the method of any of claims 1-12 to be performed.
CN202311092466.4A 2023-08-29 2023-08-29 Wallpaper deleting method and electronic equipment Active CN116795476B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311092466.4A CN116795476B (en) 2023-08-29 2023-08-29 Wallpaper deleting method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311092466.4A CN116795476B (en) 2023-08-29 2023-08-29 Wallpaper deleting method and electronic equipment

Publications (2)

Publication Number Publication Date
CN116795476A CN116795476A (en) 2023-09-22
CN116795476B true CN116795476B (en) 2023-11-03

Family

ID=88040174

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311092466.4A Active CN116795476B (en) 2023-08-29 2023-08-29 Wallpaper deleting method and electronic equipment

Country Status (1)

Country Link
CN (1) CN116795476B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014106449A1 (en) * 2013-01-05 2014-07-10 北京奇虎科技有限公司 Client, system and method for replacing desktop backgrounds by turns
CN106775675A (en) * 2016-11-30 2017-05-31 依偎科技(南昌)有限公司 A kind of management method of terminal wallpaper, device and terminal
CN114327457A (en) * 2021-12-24 2022-04-12 珠海豹趣科技有限公司 Convenient wallpaper editing and developing method and device, electronic equipment and medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100205221A1 (en) * 2009-02-12 2010-08-12 ExaNetworks, Inc. Digital media sharing system in a distributed data storage architecture

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014106449A1 (en) * 2013-01-05 2014-07-10 北京奇虎科技有限公司 Client, system and method for replacing desktop backgrounds by turns
CN106775675A (en) * 2016-11-30 2017-05-31 依偎科技(南昌)有限公司 A kind of management method of terminal wallpaper, device and terminal
CN114327457A (en) * 2021-12-24 2022-04-12 珠海豹趣科技有限公司 Convenient wallpaper editing and developing method and device, electronic equipment and medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Windows_XP壁纸设置技巧四则;佚名;《计算机与网络》(第22期);第24页 *

Also Published As

Publication number Publication date
CN116795476A (en) 2023-09-22

Similar Documents

Publication Publication Date Title
CN115473957B (en) Image processing method and electronic equipment
CN113704205B (en) Log storage method, chip, electronic device and readable storage medium
CN116360725B (en) Display interaction system, display method and device
CN116048358B (en) Method and related device for controlling suspension ball
CN116828100A (en) Bluetooth audio playing method, electronic equipment and storage medium
CN115119048B (en) Video stream processing method and electronic equipment
CN116048831B (en) Target signal processing method and electronic equipment
CN115482143B (en) Image data calling method and system for application, electronic equipment and storage medium
CN116795476B (en) Wallpaper deleting method and electronic equipment
CN113467821A (en) Application program repairing method, device, equipment and readable storage medium
CN117221713B (en) Parameter loading method and electronic equipment
CN117009023B (en) Method for displaying notification information and related device
CN116709609B (en) Message delivery method, electronic device and storage medium
CN116048629B (en) System service switching method, control device, electronic equipment and storage medium
CN116719376B (en) Voltage control method, device, equipment and storage medium
CN114942741B (en) Data transmission method and electronic equipment
CN116089057B (en) Resource scheduling method, device, storage medium and program product
CN116662150B (en) Application starting time-consuming detection method and related device
CN117013660B (en) Charging icon display method and electronic equipment
CN116703689B (en) Method and device for generating shader program and electronic equipment
WO2022143891A1 (en) Focal point synchronization method and electronic device
CN117784990A (en) Method and related device for displaying icons of application programs in task bar
CN117675881A (en) Application data storage method and electronic equipment
CN117687708A (en) Starting-up method and electronic equipment
CN117311484A (en) Method for adjusting power consumption of equipment and electronic equipment

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
GR01 Patent grant
GR01 Patent grant