CN117013660B - Charging icon display method and electronic equipment - Google Patents

Charging icon display method and electronic equipment Download PDF

Info

Publication number
CN117013660B
CN117013660B CN202311167099.XA CN202311167099A CN117013660B CN 117013660 B CN117013660 B CN 117013660B CN 202311167099 A CN202311167099 A CN 202311167099A CN 117013660 B CN117013660 B CN 117013660B
Authority
CN
China
Prior art keywords
charging
power
electronic device
icon
target
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
CN202311167099.XA
Other languages
Chinese (zh)
Other versions
CN117013660A (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 CN202311167099.XA priority Critical patent/CN117013660B/en
Publication of CN117013660A publication Critical patent/CN117013660A/en
Application granted granted Critical
Publication of CN117013660B publication Critical patent/CN117013660B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/32Monitoring with visual or acoustical indication of the functioning of the machine
    • G06F11/324Display of status information
    • G06F11/328Computer systems status display
    • 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
    • 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
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/00032Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries characterised by data exchange
    • H02J7/00034Charger exchanging data with an electronic device, i.e. telephone, whose internal battery is under charge
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/0047Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries with monitoring or indicating devices or circuits

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Power Engineering (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Environmental & Geological Engineering (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • Charge And Discharge Circuits For Batteries Or The Like (AREA)

Abstract

The application provides a charging icon display method and electronic equipment, wherein the method comprises the following steps: the electronic equipment is connected to a charger which is powered on; the electronic equipment charges a battery in the electronic equipment based on the initial power through a charger which is powered on; the electronic equipment confirms target charging power through a charging drive and a charger which is powered on, and stores target power charging information, wherein the target power charging information comprises a target charging icon; the electronic equipment charges a battery in the electronic equipment based on the target charging power through a charger which is powered on; the electronic device sends callback notification information to the battery driver through the charging driver; in response to the callback notification message, the electronic device sends target power charging information to the first application through the battery-driven and communication interface; and the electronic equipment acquires the target charging icon from the target power charging information through the first application and displays the target charging icon. The time for the electronic equipment to switch and display the high-power charging icon is shortened.

Description

Charging icon display method and electronic equipment
Technical Field
The application relates to the technical field of terminals, in particular to a charging icon display method and electronic equipment.
Background
With the development of terminal technology, the demands of users on terminal equipment are also increasing, and the demands of users on the cruising ability of the terminal equipment are also increasing. When the electric quantity of the electronic equipment is too low, a user can charge a battery on the electronic equipment through a charger for switching on a power supply so as to improve the electric quantity of the electronic equipment. The chargers can be classified into slow chargers and fast chargers. In the case where the charger is a fast charger, the electronic device needs to switch to display a high power charging icon to indicate that high power charging is currently in progress. However, at present, the situation that the electronic equipment is not timely switched to display the high-power charging icon occurs. How to shorten the time for the electronic device to switch and display the high-power charging icon is to be further studied.
Disclosure of Invention
The application provides a charging icon display method and electronic equipment, which shorten the time for switching and displaying high-power charging icons by the electronic equipment.
In a first aspect, the present application provides a method for displaying a charging icon, where the method is applied to an electronic device, the electronic device includes a kernel layer, an application framework layer, and an application layer, the kernel layer includes a charging driver and a battery driver, the application framework layer includes a communication interface, and the application layer includes a first application, and the method includes: the electronic equipment is connected to a charger which is powered on; the electronic equipment confirms target charging power through a charging drive and a charger which is powered on, and stores target power charging information, wherein the target power charging information comprises a target charging icon; the electronic equipment charges a battery in the electronic equipment based on the target charging power through a charger which is powered on; the electronic device sends callback notification information to the battery driver through the charging driver; in response to the callback notification message, the electronic device sends target power charging information to the first application through the battery-driven and communication interface; and the electronic equipment acquires the target charging icon from the target power charging information through the first application and displays the target charging icon.
According to the method, after the target charging power is determined, the electronic equipment can actively send a callback notification message to the first application through the charging drive, wherein the callback notification message is used for indicating the first application to acquire the target power charging information. After the first application obtains the target power charging information, the first application may switch to displaying the target charging icon. In this way, the time for the electronic device to switch and display the high-power charging icon is shortened, so that the first application can quickly switch to display the target charging icon when the charger which is powered on charges the battery on the electronic device based on the target charging power.
With reference to the first aspect, in one possible implementation manner, in response to the callback notification message, the electronic device sends, to the first application through the battery-driven and communication interface, target power charging information, including:
responding to the callback notification message, and sending a first uevent event to a communication interface by the electronic equipment through battery driving; in response to a first uevent event, the electronic device sends a first message to the battery drive over the communication interface; in response to the first message, the electronic device sends target power charging information to the communication interface through battery driving; the electronic device sends target power charging information to the first application through the communication interface.
The first uevent event may be an interaction mechanism between the kernel layer and the application layer. Not only the first uevent event, but also other interaction mechanisms between the kernel layer and the application layer are possible, which is not limited in this application.
With reference to the first aspect, in a possible implementation manner, before the electronic device confirms the target charging power through the charging drive and the charger that is powered on, the method further includes: the electronic equipment charges a battery in the electronic equipment based on initial power through the charger which is powered on; the electronic device displays an initial charging icon through the first application.
In one possible implementation, the initial power may be preset within the charger, and the initial power may include an initial voltage and thus an initial current.
When the electronic device is connected to the charger which is powered on, the charger which is powered on can quickly charge the battery on the electronic device.
The electronic device displays an initial charge icon to prompt the user that the powered charger is charging the battery on the electronic device with initial power.
With reference to the first aspect, in one possible implementation manner, the sending, by the electronic device, a callback notification message to the battery driver through the charging driver specifically includes: and under the condition that the target charging power is larger than the first power, the electronic device sends a callback notification message to the battery driver through the charging driver.
In this way, when the finally determined target charging power is greater than the first power, that is, the target charging power is high, the first application needs to switch to display the high-power charging icon. The electronic device may send a callback notification message to the battery drive via the charging drive so that the first application may quickly switch to displaying the high power charging icon.
With reference to the first aspect, in one possible implementation manner, the target charging power is greater than the initial power.
With reference to the first aspect, in one possible implementation manner, the target charging icon is a high-power charging icon, and the high-power charging icon is different from the initial charging icon.
With reference to the first aspect, in one possible implementation manner, the sending, by the electronic device, a callback notification message to the battery driver through the charging driver specifically includes: and under the condition that the target charging power is smaller than the first power and the target charging icon is different from the initial charging icon, the electronic equipment sends a callback notification message to the battery driver through the charging driver.
In this way, when the finally determined target charging power is smaller than the first power, that is, the target charging power is low power, and the low power charging icon is different from the initial charging icon, the first application needs to switch to displaying the low power charging icon. The electronic device may send a callback notification message to the battery drive via the charging drive so that the first application may quickly switch to displaying the low power charging icon.
With reference to the first aspect, in one possible implementation manner, the method further includes: and under the condition that the target charging power is smaller than the first power and the low-power charging icon is the same as the initial charging icon, the electronic device does not send callback notification message to the battery driver through the charging driver.
In this way, the finally determined target charging power is smaller than the first power, that is, the target charging power is low power, and the first application does not need to switch to display the low-power charging icon when the low-power charging icon is the same as the initial charging icon. The electronic device may send a callback notification message to the battery drive without the charging drive to save power consumption of the electronic device.
With reference to the first aspect, in one possible implementation manner, the electronic device obtains, through a first application, a target charging icon from target power charging information, and specifically includes: under the condition that the first application receives the target power charging information, the electronic equipment acquires the target charging icon from the target power charging information through the first application.
With reference to the first aspect, in one possible implementation manner, the method further includes: under the condition that the first application does not receive the target power charging information, the electronic equipment monitors that the display duration of the initial charging icon exceeds the first duration through the first application, and sends a second message to the communication interface; the electronic device sends a second message to the battery driver through the communication interface; in response to the second message, the electronic device sends target power charging information to the communication interface through battery driving; the electronic equipment sends target power charging information to a first application through a communication interface; the electronic equipment acquires a target charging icon from target power charging information through a first application; and under the condition that the target charging icon is different from the initial charging icon, the electronic equipment displays the target charging icon through the first application.
With reference to the first aspect, in one possible implementation manner, the method further includes: and under the condition that the target charging icon is the same as the initial charging icon, the electronic equipment continues to display the initial charging icon.
In this way, the first application continues to display the initial charge icon in order to avoid loss of information or other reasons. After the application layer monitors that the time for displaying the initial charging icon exceeds the first time, the first application can actively send a message for acquiring the target power charging information to the battery driver so as to determine whether to continue displaying the initial charging icon or switch to displaying the high power charging icon or the low power charging icon.
With reference to the first aspect, in one possible implementation manner, the target power charging information includes one or more of the following: the residual electric quantity of the electronic equipment, the charging state of the electronic equipment, the target charging voltage, the target charging current, the target charging icon and the like, wherein the charging state of the electronic equipment comprises any one of the following items; an underfill state of charge, a full state.
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 operable to store computer program code comprising computer instructions that, when executed by the one or more processors, cause performance of a method of displaying a charging icon as provided in any of the possible implementations of the first aspect.
In a third aspect, the present application provides a computer readable storage medium comprising instructions which, when run on an electronic device, cause a charging icon display method provided in any one of the possible implementations of the first aspect to be performed.
In a fourth aspect, the present application provides a chip system, the chip system including one or more processors for invoking computer instructions to cause execution of a charging icon display method provided in any one of the possible implementations of the first aspect.
In a fifth aspect, the present application provides a computer program product comprising instructions which, when run on an electronic device, cause the electronic device to perform a charging icon display method provided in any one of the possible implementations of the first aspect.
For the description of the advantageous effects of the second aspect to the fifth aspect, reference may be made to the description of the advantageous effects in the first aspect.
Drawings
Fig. 1 shows a schematic configuration of an electronic device 100;
FIG. 2 is a block diagram of the software architecture of an electronic device 100 according to an embodiment of the invention;
FIG. 3 illustrates a system architecture diagram provided herein;
fig. 4A-4E show schematic diagrams of the electronic device 100 displaying a charge icon;
fig. 5 shows a schematic flow chart of the electronic device 100 displaying an initial charge icon;
fig. 6 shows a flowchart of a method for the electronic device 100 to obtain the remaining power of the electronic device 100;
fig. 7 shows a timing diagram of sending heartbeat information;
FIG. 8 shows a method flowchart of how the electronic device 100 displays a high power charge icon;
FIG. 9 illustrates a timing diagram for a first application to obtain target power charging information;
fig. 10 is a schematic diagram of how an electronic device 100 displays a charging icon provided in the present application;
FIG. 11 shows a flow chart of a method for electronic device 100 to display a low power charge icon or switch to display a high power charge icon;
FIG. 12 illustrates a timing diagram of another first application acquiring target power charging information;
fig. 13 is a flowchart of a method for the first application to obtain the target power charging information.
Detailed Description
The technical solutions in 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, "/" means or is meant unless otherwise indicated, 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 in addition, 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 present 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 an acceptable form of 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.
Currently, chargers can be classified into a fast charger and a slow charger, and the fast charger can shorten the charging time of the electronic device 100.
When the electronic device 100 charges the battery on the electronic device 100 through the charger 200, the charger 200 charges the battery of the electronic device 100 with the initial power before determining that the charger 200 is a fast charger or a slow charger. At the same time, the electronic device 100 displays an initial charge icon.
Thereafter, the charger 200 may communicate with the electronic device 100 in a protocol to determine whether the charger 200 is a fast charger or a slow charger.
Based on the protocol communication, the electronic device 100 may obtain the charging power supported by the charger 200. If the charging power is greater than the preset power, it may be determined that the charger 200 is a fast charger, and the charger 200 is switched to the high power to charge the battery on the electronic device 100. Thereafter, the electronic device 100 switches to display the high power charging icon.
If the charging power is less than the preset power, it may be determined that the charger 200 is a slow charger, and the charger 200 charges the battery on the electronic device 100 with low power. The electronic device 100 continues to display the low power charge icon.
However, the current speed at which the electronic device 100 switches to displaying either a high power charge icon or a low power charge icon may be slow. Resulting in the electronic device 100 not updating the high power charge icon or the low power charge icon in time. In particular, reference may be made to the description in the embodiment of fig. 8 and 9.
Based on the above, the application provides a charging icon display method, which comprises the following steps: after the charger 200 switches to high power to charge the battery on the electronic device 100, the electronic device 100 actively reports the high power charging event to the layer application, and the layer application switches to display the high power charging icon in time after receiving the high power charging event. In this way, the speed at which the electronic device 100 switches to displaying the high power charging icon can be quickly increased.
Referring to fig. 1, fig. 1 shows a schematic configuration of an electronic device 100.
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 the specific types of such electronic devices not being particularly limited in the embodiments of the present application. The following embodiments of the present application will be described with reference to the electronic device 100 as a mobile phone.
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 invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, electronic device 100 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a 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 invention 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 use different interfacing manners, or a combination of multiple interfacing manners in the foregoing embodiments.
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 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.
First, a scenario in which the electronic device 100 displays a charging icon is described.
When the remaining power of the battery on the electronic device 100 is too low, the user can charge the battery of the electronic device 100 through the charger, so as to increase the remaining power of the battery on the electronic device 100 and prolong the endurance time of the electronic device 100.
In some embodiments, to alert that the electronic device 100 is charging, when the electronic device 100 charges the battery of the electronic device 100 through a charger, the electronic device 100 may display a charging icon for indicating that the electronic device 100 is charging.
In order to increase the charging speed of the charger to the battery on the electronic device 100 and shorten the charging time of the electronic device 100, the charger may be classified into a fast charger and a non-fast charger.
In the case where the remaining power of the electronic device 100 is fixed, the time for the fast charger to fully charge the battery of the electronic device 100 is less than the time for the non-fast charger to fully charge the battery of the electronic device 100.
In one possible implementation, the charging power of the fast charger is greater than the charging power of the non-fast charger. Under the condition of the same charging voltage, the charging power of the quick charger is larger than that of the non-quick charger, and the charging current of the quick charger is larger than that of the non-quick charger, so that the charging time of the quick charger is shorter.
In other possible implementations, the charging power of the fast charger is greater than the charging power of the non-fast charger. Under the condition of the same charging current, the charging power of the quick charger is larger than that of the non-quick charger, and the charging voltage of the quick charger is larger than that of the non-quick charger, so that the charging time of the quick charger is shorter.
In other possible implementations, the charging power of the fast charger is greater than the charging power of the non-fast charger. Under the condition that the charging current and the charging voltage are not fixed, the charging power of the quick charger is larger than that of the non-quick charger, and the charging current and the charging voltage of the quick charger are larger than those of the non-quick charger, so that the charging time of the quick charger is shorter.
In order to distinguish between a fast charger charging scenario and a slow charger charging scenario, a charging icon displayed by the electronic device 100 when the fast charger charges the electronic device 100 is different from a charging icon displayed by the electronic device 100 when the slow charger charges the electronic device 100.
Fig. 3 shows a system architecture diagram provided herein.
As shown in fig. 3, the system may include an electronic device 100 and a charger 200.
In some embodiments, as shown in fig. 3, the charger 200 may be composed of a plug for connection to a power source to obtain a charging source and a data line. The data line is used to connect with the electronic device 100, and transmit the charging source to the electronic device 100 to charge the battery on the electronic device 100.
It should be noted that the shape of the charger 200 shown in fig. 3 is only for explaining the present application, and the shape of the charger 200 may be other types, which are not limited in the present application.
Fig. 4A-4E show schematic diagrams of the electronic device 100 displaying a charging icon.
The scene of displaying the charging icon when charging based on the quick charger (fig. 4A-4E).
In the uncharged state of the electronic device 100, the electronic device 100 may display the user interface shown in fig. 4A.
As shown in fig. 4A, 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, an icon of instant messaging. 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.
The display state of the battery state indicator shown in fig. 4A is used to indicate the remaining power of the battery on the current electronic device 100, and the battery on the current electronic device 100 is in an uncharged state.
In some embodiments, the user may charge the battery of the electronic device 100 through a charger. Specifically, a power supply is plugged into one end of the charger, and the other end of the charger is connected to the electronic device 100.
The charger 200 charges at an initial power before the electronic device 100 recognizes the charger 200 as a quick charger. In response to charger 200 charging at an initial power, electronic device 100 displays an initial charge icon indicating that electronic device 100 is charging and is in an initial power charging state.
In one possible implementation, as shown in fig. 4B, in response to charging at an initial power, electronic device 100 may display charging icon 401 shown in fig. 4B, charging icon 401 being used to indicate that electronic device 100 is currently charging at the initial power.
In other possible implementations, as shown in fig. 4C, in response to charging at an initial power, electronic device 100 may display user interface 410 shown in fig. 4C, with user interface 410 including charging icon 402 therein, charging icon 402 being used to indicate that electronic device 100 is currently charging at the initial power. A remaining power indicator may also be included in the user interface 410 to indicate that the remaining power of the battery on the electronic device 100 is 45% of full.
Not only the charging icon 401 shown in fig. 4B and the charging icon 402 shown in fig. 4C, the electronic device 100 may also display other types of charging icons, which is not limited in this application.
In some embodiments, in response to charging at the initial power, electronic device 100 may directly display charging icon 401 shown in fig. 4B.
In other embodiments, in response to charging at the initial power, the electronic device 100 may directly display the user interface 410 shown in fig. 4C. After the display exceeds the preset time, the electronic device 100 displays the charge icon 401 shown in fig. 4B again.
In other embodiments, in response to charging at the initial power, the electronic device 100 may directly display the user interface 410 shown in fig. 4C and continue to display the user interface 410 shown in fig. 4C. When the electronic apparatus 100 receives the user's operation (e.g., the user's sliding operation, etc.), the electronic apparatus 100 switches to display the charge icon 401 shown in fig. 4B again so that the mobile phone can be manipulated.
After the electronic device 100 recognizes that the charger 200 is a quick charger, the charger 200 charges the battery of the electronic device 100 with high power. In response to charger 200 charging at high power, electronic device 100 displays a high power charging icon indicating that electronic device 100 is charging and in a high power charging state.
In one possible implementation, as shown in fig. 4D, in response to charging at high power, the electronic device 100 may display a charging icon 403 shown in fig. 4D, the charging icon 403 being used to indicate that the electronic device 100 is currently charging at high power.
In other possible implementations, as shown in fig. 4E, in response to charging at high power, electronic device 100 may display user interface 420 shown in fig. 4E, with charging icon 404 included in user interface 420, charging icon 404 indicating that electronic device 100 is currently charging at high power. A remaining power indicator may also be included in the user interface 420 to indicate that the remaining power of the battery on the electronic device 100 is 45% of full.
Not only the charging icon 403 shown in fig. 4D and the user interface 420 shown in fig. 4E, the electronic device 100 may also display other types of charging icons, which is not limited in this application.
In some embodiments, in response to charging at high power, electronic device 100 may directly display charging icon 403 shown in fig. 4D.
In other embodiments, in response to charging at high power, electronic device 100 may directly display user interface 420 shown in fig. 4E. After the display exceeds the preset time, the electronic device 100 displays the charging icon 403 shown in fig. 4D again.
In other embodiments, in response to charging at high power, electronic device 100 may directly display user interface 420 shown in fig. 4E and continue to display user interface 420 shown in fig. 4E. When the electronic apparatus 100 receives the user's operation (e.g., the user's sliding operation, etc.), the electronic apparatus 100 switches to display the charge icon 403 shown in fig. 4D again so that the mobile phone can be manipulated.
And displaying a scene of a charging icon when the slow charger is charged.
In the uncharged state of the electronic device 100, the electronic device 100 may display the user interface shown in fig. 4A.
Specifically, reference may be made to the description in the embodiment of fig. 4A, and this application is not repeated here.
The charger 200 charges at an initial power before the electronic device 100 recognizes that the charger 200 is a slow charger. In response to charger 200 charging at an initial power, electronic device 100 displays an initial charge icon indicating that electronic device 100 is charging and is in an initial power charging state.
For how the electronic device 100 displays the initial charging icon, reference may be made to the descriptions in the embodiments of fig. 4B and 4C, and the description is omitted herein.
After the electronic device 100 recognizes that the charger 200 is a slow charger, the charger 200 charges the battery of the electronic device 100 with low power. In response to charger 200 charging at a low power, electronic device 100 displays a low power charging icon indicating that electronic device 100 is charging and in a low power charging state.
For how the electronic device 100 displays the low-power charging icon, reference may be made to the descriptions in the embodiments of fig. 4B and 4C, and the description is omitted herein.
In some embodiments of the present application, the power of charger 200 when charging at low power may be the same as or different from the power of charger 200 when charging at initial power, which is not limited in this application.
In other embodiments, the low power charging icon may also be different from the initial charging icon, which is not limited in this application.
Next, how the electronic device 100 displays the charging icon will be described.
The electronic device 100 displays the charging icon in two stages; an initial charge icon is displayed, a low power charge icon is displayed, or a switch to a high power charge icon is displayed.
1. And displaying an initial charging icon.
After the electronic device 100 establishes a communication connection with the charger 200 and the charger 200 is powered on, the electronic device 100 displays an initial charge icon before the electronic device 100 determines the charge type of the charger 200. The charging type of charger 200 includes, but is not limited to; a high power charge type and a low power charge type.
Since the electronic device 100 also takes a certain time to determine the charging type of the charger 200, in order for the charger 200 to rapidly charge the electronic device 100, the electronic device 100 may configure the charger 200 to charge at an initial power and display an initial charging icon.
Fig. 5 shows a schematic flow chart of the electronic device 100 displaying an initial charge icon.
As shown in fig. 5, the electronic device 100 includes a charger connection interface, a kernel layer, an application framework layer, and an application layer. The kernel layer comprises a power management driver, a charging driver and a battery driver, the application program framework layer comprises a communication interface, and the application layer comprises a first application.
S501, the charger 200 establishes a connection with the charger and charges the battery on the electronic device 100.
Charger 200 may be comprised of a plug for connection to a power source to obtain a charging source and a data line. The data line is used to connect with the electronic device 100, and transmit the charging source to the electronic device 100 to charge the battery on the electronic device 100.
S502, the charger connection interface sends an interrupt message to the power management drive.
The interrupt message is sent to the power management driver after the charger connection interface recognizes the charger 200. The interrupt message is used to inform the power management driver that the charger 200 has been connected to the charger connection interface of the electronic device 100.
When the charger 200 is connected to the charger connection interface, the charger 200 charges the battery of the electronic device 100 with the initial power before determining that the charger 200 is a fast charger or a slow charger, so as to shorten the start charging time.
The initial power is charged with a default charging voltage and a default charging current, for example, the default charging voltage may be 5v and the default charging current may be 2A. After receiving the interrupt message, the power management driver may determine a default charging voltage and a default charging current, and send the default charging voltage and the default charging current to the charger 200 through the charger connection interface, where the charger 200 starts charging the battery on the electronic device 100 based on the default charging voltage and the default charging current after receiving the default charging voltage and the default charging current.
In some embodiments, a default charging voltage and a default charging current are preset in the charger 200, and after receiving the interrupt message, the power management driver may send a start charging message to the charger 200 through the charger connection interface, so that the charger 200 starts charging the battery on the electronic device 100 based on the default charging voltage and the default charging current.
In some embodiments, a default charging voltage is preset in the charger 200, and after receiving the interrupt message, the power management driver may send a default charging current to the charger 200 through the charger connection interface, so that the charger 200 starts charging the battery on the electronic device 100 based on the default charging voltage and the default charging current.
In some embodiments, a default charging current is preset in the charger 200, and after receiving the interrupt message, the power management driver may send a default charging voltage to the charger 200 through the charger connection interface, so that the charger 200 starts charging the battery on the electronic device 100 based on the default charging voltage and the default charging current.
It should be noted that the default charging voltage, for example, 5V, and the default charging current, for example, 2A, are only used to explain the present application, and are not limiting.
S503, the power management driver sends an updated charging type icon message I to the charging driver.
S504, the charging driver sends an updated charging type icon message I to the battery driver.
S505, in response to updating the charge type icon message one, the battery drive saves the initial power charge information.
In response to receiving the interrupt message, the power management driver sends an update charge type icon message one to the charging driver, which in turn sends the update charge type icon message one to the battery driver. So that the battery drive can save the initial power charge information.
The initial power charging information includes, but is not limited to, one or more of the following: the remaining power of the electronic device 100, the state of charge of the electronic device 100, a default charge voltage, a default charge current, an initial charge icon, and the like. The state of charge of the electronic device 100 includes, but is not limited to, any of the following; an underfill state of charge, an uncharged state, and a full state.
S506, the charger 200 and the battery driver perform a charging protocol negotiation to determine the charging type of the charger 200 and the target charging power.
In some embodiments, the charging protocol may be a Power Delivery (PD) protocol. The charger 200 and the battery drive may determine the charging type of the charger 200 and the target charging power based on the PD protocol.
Specifically, the procedure of the PD protocol negotiation between the charger 200 and the battery drive is as follows:
1. the battery drive recognizes the charger 200 and sends an on notification to the charger 200.
2. In response to the on notification, charger 200 regulates the voltage up to a default charging voltage in preparation for starting charging electronic device 100 based on the initial power charge.
3. The charger 200 acquires the charging power supported by the charger 200 and transmits the charging power to the battery drive.
Alternatively, the charger 200 may support a plurality of different charging powers, among which the initial charging power may be included.
The charging type in which the charging power is greater than the first power is referred to as high power, and the charging at the high power may be referred to as a high power charging type. The charging type in which the charging is performed at a low power may be referred to as a low power charging type, in which the charging power is smaller than the first power.
The first power may be, for example, 18W.
In some embodiments, the plurality of different charging powers supported by charger 200 may include 10W and 18W. The charging types supported by the charger 200 may include a high power charging type and a low power charging type.
In some embodiments, the plurality of different charging powers supported by charger 200 may include 10W. The types of charge supported by charger 200 may include a low power charge type.
In some embodiments, the plurality of different charging powers supported by charger 200 may include 18W. The types of charging supported by charger 200 may include a high power charging type.
Alternatively, the charging power supported by the charger 200 may be one or more than one of the charging powers greater than the first power, and may further include 24W, 36W, and so on.
Alternatively, the charging power supported by the charger 200 may be one or more than one of the charging power smaller than the first power, and may further include 8W, 4W, and so on.
4. The battery drives to select the highest one supported by the electronic device 100 from among a plurality of different charging powers supported by the charger 200 as a target charging power, and determines a charging type based on the target charging power.
In some embodiments, if the plurality of different charging powers supported by the charger 200 may include 10W and 18W, and the highest power supported by the electronic device 100 is greater than or equal to 18W, the electronic device 100 may determine that the target charging power of the charger 200 is 18W, and the charging type of the charger 200 is a high-power charging type.
In some embodiments, if the plurality of different charging powers supported by the charger 200 may include 10W, 18W, 24W, 36W, etc., and the highest power supported by the electronic device 100 is 18W, the electronic device 100 may determine that the target charging power of the charger 200 is 18W, and the charging type of the charger 200 is a high-power charging type.
In some embodiments, if the plurality of different charging powers supported by the charger 200 may include 4W, 18W, 10W, etc., and the highest power supported by the electronic device 100 is 18W, the electronic device 100 may determine that the target charging power of the charger 200 is 10W, and the charging type of the charger 200 is a low-power charging type.
5. The battery drive transmits the target charging power to the charger 200.
6. Charger 200 charges a battery on electronic device 100 based on the target charging power.
After charger 200 receives the target charging power, charger 200 may determine a target charging voltage and a target charging current.
In some embodiments, the target charging voltage and target charging current are preset within charger 200, the target charging voltage and target charging current being related to the target charging power.
In some embodiments, the target charging voltage may be determined by the electronic device 100, the electronic device 100 sends the target charging voltage to the charger 200, and the charger 200 determines the target charging current based on the target charging power and the target charging voltage.
In some embodiments, the target charging current may be determined by the electronic device 100, the electronic device 100 sends the target charging current to the charger 200, and the charger 200 determines the target charging voltage based on the target charging power and the target charging current.
In some embodiments, the target charging voltage and the target charging current may be determined by the electronic device 100 based on the target charging power, the electronic device 100 sending the target charging voltage and the target charging current to the charger 200, the charger 200 charging the battery on the electronic device 100 directly based on the target charging voltage and the target charging current.
S507, the power management driver sends a callback notification message to the battery driver.
The power management driver sends a callback notification message to the battery driver, wherein the callback notification message is used for instructing the battery driver to send and acquire initial power charging information to the communication interface.
And S508, the battery drive sends a uevent event to the communication interface.
In response to the callback notification message, the battery driver may send a uevent event to the communication interface so that the communication interface may obtain the initial power charging information.
Alternatively, the uevent event may be an interaction mechanism between the kernel layer and the application framework layer. Not only is the uevent event, but the battery-driven may also send other types of messages to the communication interface in response to a callback notification message, the uevent event is just one example, and the application is not limited in this regard.
In this way, upon detecting a charge, the electronic device 100 may actively send a uevent event to the communication interface through the battery drive, such that the communication interface obtains initial power charging information.
S509, the communication interface sends a message to the battery driver to acquire the initial power charging information.
In response to the uevent event, the communication interface may send a message to the battery drive to obtain the initial power charging information. The message for acquiring the initial power charging information is used for acquiring the stored initial power charging information.
And S510, the battery drive transmits initial power charging information to the communication interface.
In response to a message sent by the communication interface to obtain the initial power charging information, the battery drive may obtain the initial power charging information and send the initial power charging information to the communication interface.
S511, the communication interface sends the initial power charging information to the first application.
S512, the first application acquires the initial charging icon based on the initial power charging information and displays the initial charging icon.
The initial power charging information includes, but is not limited to, one or more of the following: the remaining power of the electronic device 100, the state of charge of the electronic device 100, a default charge voltage, a default charge current, an initial charge icon, and the like. The state of charge of the electronic device 100 includes, but is not limited to, any of the following; an underfill state of charge, an uncharged state, and a full state.
In response to the initial power charge information sent by the battery driver, the communication interface sends the initial power charge information to the first application. After the first application acquires the initial power charging information, the first application can acquire an initial charging icon from the initial power charging information and display the initial charging icon.
For example, how the electronic device 100 displays the initial charging icon may refer to the description in the embodiments of fig. 4B and fig. 4C, and this application will not be repeated here.
In some embodiments, in order for the first application to update the remaining power of the electronic device 100 displayed in the user interface, the kernel layer may periodically/sporadically report the remaining power of the electronic device 100 to the first application.
Fig. 6 shows a flowchart of a method for the electronic device 100 to obtain the remaining power of the electronic device 100.
As shown in fig. 6, the electronic device 100 includes a kernel layer, an application framework layer, and an application layer. The application framework layer comprises a communication interface, the kernel layer comprises a battery driver, and the application layer comprises a first application.
S601, the battery driver sends a uevent event to the communication interface.
The battery drive may send a uevent event to the communication interface so that the communication interface may obtain heartbeat information.
Alternatively, the uevent event may be an interaction mechanism between the kernel layer and the application framework layer. Not limited to the uevent event, which is but one example, the battery-driven may also send other types of messages to the communication interface, and the present application is not limited in this regard.
In this way, the electronic device 100 may actively send the uevent event to the communication interface through the battery drive, so that the communication interface obtains the heartbeat information.
S602, responding to the uevent event, and sending a message for acquiring heartbeat information to the battery driver by the communication interface.
In response to the uevent event, the communication interface may send a message to the battery drive to acquire heartbeat information. The message for acquiring the heartbeat information is used for acquiring the heartbeat information.
The heartbeat information may include, but is not limited to, one or more of the following: the remaining power of the electronic device 100, the state of charge of the electronic device 100, and the like. The state of charge of the electronic device 100 includes, but is not limited to, any of the following; an underfill state of charge, an uncharged state, and a full state.
And S603, responding to the information for acquiring the heartbeat information, and sending the heartbeat information to the communication interface by the battery drive.
In response to the message sent by the communication interface to obtain the heartbeat information, the battery drive may obtain the heartbeat information and send the heartbeat information to the communication interface.
S604, the communication interface sends heartbeat information to the first application.
In response to the battery-driven transmission of the heartbeat information, the communication interface again transmits the heartbeat information to the first application.
S605, the first application obtains the remaining power of the electronic device 100 based on the heartbeat information, and displays the remaining power of the electronic device 100.
The heartbeat information may include, but is not limited to, one or more of the following: the remaining power of the electronic device 100, the state of charge of the electronic device 100, and the like. The state of charge of the electronic device 100 includes, but is not limited to, any of the following; an underfill state of charge, an uncharged state, and a full state.
After receiving the heartbeat information sent by the communication interface, the first application may obtain the remaining power of the electronic device 100 from the heartbeat information, and display the remaining power of the electronic device 100.
Alternatively, S601-S605 may be periodically performed, for example, the period of two adjacent heartbeats may be 60S, so that the first application may acquire the heartbeat information and update the remaining power of the electronic device 100 in time based on the heartbeat information.
In some embodiments, after the power management driver receives the interrupt message, the power management driver may send a message to the battery driver through the charging driver, where the message is used to instruct the battery driver to send a uevent event to the first application through the communication interface, so that the first application may obtain the heartbeat information and update the remaining power of the electronic device 100 in time based on the heartbeat information.
In some embodiments, the battery drive may also change the period of the heartbeat information, such as shortening the period of the heartbeat information, when the power management drive receives the interrupt message.
For example, fig. 7 shows a timing chart of transmitting heartbeat information.
By way of example, the period of two adjacent heartbeats may be 60s. As shown in fig. 7, the battery drive transmits a heartbeat message to the first application through the communication interface at time 0s. The battery drive sends a heartbeat message to the first application via the communication interface at time 60s. The battery drive sends a heartbeat message to the first application over the communication interface at 120 s. According to the period, the battery drive also needs to send heartbeat information to the first application through the communication interface at the moment of 180s, and the battery drive also needs to send heartbeat information to the first application through the communication interface at the moment of 240 s.
But as shown in fig. 7, the power management driver receives the interrupt message at time 150s and, in response to the interrupt message, after time 150s, for example, at time 155s, the battery driver sends a heartbeat message to the first application via the communication interface. Then the battery drive needs to send a heartbeat message to the first application via the communication interface every 60s later. For example, at time 215s, the battery drive may be required to send a heartbeat message to the first application via the communication interface. At time 275s, the battery drive is required to send a heartbeat message to the first application via the communication interface.
Fig. 8 shows a method flowchart of how the electronic device 100 displays a high power charging icon.
S801, the negotiation of the charging protocol is completed, and the charging drive determines high-power charging.
After the charging drive determines a high power charge, the charger 200 may charge the battery on the electronic device 100 at high power.
Meanwhile, the electronic device 100 needs to update the charging icon from the initial charging icon to the high-power charging icon.
In some embodiments, the charging protocol negotiation is complete and the charging driver may also determine a low power charge. The present application describes determining a high power charge for example.
S802, the charging driver sends an updated charging type icon message II to the battery driver.
And responding to the completion of the charge protocol negotiation, and sending an updated charge type icon message II to the rechargeable battery drive by the charge drive so that the target power charge information can be saved by the battery drive.
S803, in response to updating the charge type icon message two, the battery drive saves the target power charge information.
In response to updating charge type icon message two, the battery drive may save the target power charge information.
The target power charging information includes, but is not limited to, one or more of the following: the remaining power of the electronic device 100, the state of charge of the electronic device 100, the target charging voltage, the target charging current, the high power charging icon, and the like. The state of charge of the electronic device 100 includes, but is not limited to, any of the following; an underfill state of charge, an uncharged state, and a full state.
S804, the battery drive waits for the period of the next heartbeat signal to arrive.
As can be seen from the embodiment of fig. 7, the battery drive periodically sends heartbeat information to the first application via the communication interface. For example, heartbeat information is sent every 60 s.
As can be seen from the embodiment of fig. 6, the battery driver needs to send the uevent event to the communication interface before the battery driver sends the heartbeat information to the first application via the communication interface. After receiving the message of obtaining the charging information sent by the communication interface, the battery driver sends heartbeat information to the first application through the communication interface.
After the charging driver saves the target power charging information, the charging driver can wait for the period of the next heartbeat signal to come, and send the target power charging information to the first application through the communication interface, wherein the target power charging information comprises the heartbeat information.
S805, the period of the next heartbeat signal comes, and the battery drives to send a uevent event to the communication interface.
The period of the next heartbeat signal comes and the battery drive sends a uevent event to the communication interface. The event is used to notify the communication interface to acquire target power charging information.
S806, the communication interface sends a message to the battery driver to acquire the target power charging information.
In response to the uevent event, the communication interface may send a message to the battery drive to obtain the target power charging information. And the message for acquiring the target power charging information is used for acquiring the stored target power charging information.
S807, the battery drive transmits the target power charging information to the communication interface.
In response to a message sent by the communication interface to obtain the target power charging information, the battery driver may obtain the target power charging information and send the target power charging information to the communication interface.
And S808, the communication interface sends the target power charging information to the first application.
S809, the first application obtains a high-power charging icon based on the target power charging information, and displays the high-power charging icon.
The target power charging information includes, but is not limited to, one or more of the following: the remaining power of the electronic device 100, the state of charge of the electronic device 100, the high power charging voltage, the high power charging current, the high power charging icon, and the like. The state of charge of the electronic device 100 includes, but is not limited to, any of the following; an underfill state of charge, an uncharged state, and a full state.
In response to the battery-driven transmitted target power charging information, the communication interface transmits the target power charging information to the first application. After the first application obtains the target power charging information, the first application may obtain the high power charging icon from the target power charging information, and display the high power charging icon.
For example, how the electronic device 100 displays the high-power charging icon may refer to the descriptions in the embodiments of fig. 4D and 4E, and the description is omitted herein.
Fig. 9 shows a timing diagram of a first application acquiring target power charging information.
Illustratively, the time difference between two adjacent heartbeats may be 60s, requiring a uevent event to be sent before the heartbeat information is sent. The time difference between two adjacent uevent events may also be 60s. As shown in fig. 9, the battery drive sends a uevent event to the first application over the communication interface at time ts. The battery drive sends a uevent event to the first application over the communication interface at time (t+60) s. The battery drive sends a uevent event to the first application over the communication interface at time (t+120) s. The battery drive sends a heart event to the first application via the communication interface at time (t+180) s. The battery drive sends a uevent event to the first application over the communication interface at time (t+240) s.
However, as shown in fig. 9, if the charger 200 and the battery drive negotiate the charging protocol at time (t+185) s, a high power charge is determined. Since the charging driver has sent a uevent event to the communication interface at time (t+180) s. Since the heartbeat period is 60s, the charging drive needs to send a uevent event once more at time (t+240) s.
That is, the charging driver determines that the high power charging is performed at time (t+185) s, and needs to wait for sending a uevent event to the communication interface at time (t+240) s, where the uevent event is used to instruct the communication interface to acquire the target power charging information. If at the time (t+240) s, the charging driver sends a uevent event to the communication interface, and at the time (t+243) s, the charging driver sends target power charging information to the communication interface. At time (t+252) s, the first application may switch from the initial charge icon to display the high power charge icon based on the high power charge icon acquired from the target power charge information.
As can be seen in fig. 9, charger 200 and the battery drive negotiate the charging protocol at time (t+185) s and have begun charging the battery of electronic device 100 at high power, and the first application switches to displaying a high power charging icon at time (t+252) s. That is, if the charging driver has sent a uevent event to the communication interface to report the heartbeat information to the first application shortly before the charging protocol is negotiated and the high-power charging is determined, the charging driver needs to wait for the next period of the heartbeat information to arrive and then send the uevent event again to report the target power charging information to the first application, and if the period time of the heartbeat information is longer, the first application will not update the high-power charging icon in time, so that the user experience is affected.
Based on the above, the application provides a charging icon display method, which comprises the following steps: after the charger 200 switches to high power to charge the battery on the electronic device 100, the electronic device 100 actively reports the high power charging event to the layer application, and the layer application switches to display the high power charging icon in time after receiving the high power charging event. In this way, the speed at which the electronic device 100 switches to displaying the high power charging icon can be quickly increased.
Fig. 10 is a schematic diagram of how an electronic device 100 displays a charging icon.
As shown in fig. 10, first, the charger 200 negotiates a charging protocol with the electronic device 100 to determine the charging power.
The electronic device 100 then compares the charging power with the mobility threshold to determine the charging type.
In the event that the charging power is greater than the power threshold, the electronic device 100 may determine a high power charging icon and display the high power charging icon.
In the event that the charging power is less than the power threshold, the electronic device 100 may determine a low power charging icon and display the low power charging icon.
In particular, reference may be made to the description in the embodiment of fig. 11-13.
Next, how the electronic device 100 displays the charging icon will be described.
The electronic device 100 displays the charging icon in two stages; an initial charge icon is displayed, a low power charge icon is displayed, or a switch to a high power charge icon is displayed.
1. And displaying an initial charging icon.
For how the electronic device 100 displays the initial charging icon, reference may be made to the description in the embodiment of fig. 5, and this application will not be repeated here.
2. Displaying a low power charge icon or switching to displaying a high power charge icon.
Fig. 11 shows a flow chart of a method for the electronic device 100 to display a low power charging icon or switch to display a high power charging icon.
And S1101, finishing negotiation of a charging protocol, and determining the charging type and the target charging power by the charging drive.
As known from S506, the charging protocol is used to determine the charging type of the charger 200 and the target charging power.
The charge type may include a low power charge type and a high power charge type.
After determining the charging power, the charger 200 charges the battery on the electronic device 100 with the charging power. For how the charging drive and charger 200 negotiates the electric type and the target charging power, reference may be made to the description in S506, and the description is omitted herein.
S1102, the charging driver sends an updated charging type icon message II to the battery driver.
And responding to the completion of the charge protocol negotiation, and sending an updated charge type icon message II to the rechargeable battery drive by the charge drive so that the target power charge information can be saved by the battery drive.
S1103, in response to the update charge type icon message two, the battery drive saves the target power charge information.
In response to updating charge type icon message two, the battery drive may save the target power charge information.
As known from S1101, the charge type may include a low power charge type and a high power charge type.
In the case where the charging type is a low power charging type, the target power charging information includes, but is not limited to, one or more of the following: the remaining power of the electronic device 100, the state of charge of the electronic device 100, the target charging voltage, the target charging current, the low power charging icon, and the like. The state of charge of the electronic device 100 includes, but is not limited to, any of the following; an underfill state of charge, an uncharged state, and a full state.
In the case where the charging type is a high power charging type, the target power charging information includes, but is not limited to, one or more of the following: the remaining power of the electronic device 100, the state of charge of the electronic device 100, the target charging voltage, the target charging current, the high power charging icon, and the like. The state of charge of the electronic device 100 includes, but is not limited to, any of the following; an underfill state of charge, an uncharged state, and a full state.
S1104, the charging drive needs to determine whether the charging type is a low-power charging type or a high-power charging type.
In the case where it is determined that the charge type is the low power charge type, S1105 is performed.
In the case where it is determined that the charge type is the high-power charge type, S1106-S1111 are performed.
S1105, execution S804-S809.
And under the condition that the charging type is determined to be a low-power charging type and the low-power charging icon is the same as the initial charging icon, the effect of displaying the initial charging icon by the first application is consistent with the effect of displaying the low-power charging icon by the first application. The initial charge icon may be switched to display a low power charge icon as per the method of S1106-S1111. The charging driver is not required to generate a uevent event additionally according to the method of S1106-S1111. Power consumption can be saved.
In other embodiments, when it is determined that the charging type is a low-power charging type and the low-power charging icon is the same as the initial charging icon, the effect of the first application displaying the initial charging icon is consistent with the effect of the first application displaying the low-power charging icon. The first application may not update the charge icon and the process ends.
In other embodiments, when it is determined that the charging type is a low-power charging type and the low-power charging icon is different from the initial charging icon, the effect of displaying the initial charging icon by the first application is different from the effect of displaying the low-power charging icon by the first application, and the first application needs to switch the initial charging icon to display the low-power charging icon. To avoid the problem of not updating the low power charging icon in time like the embodiments of fig. 8 and 9, the method of S1106-S1111 may be switched to display the low power charging icon. Specifically, reference may be made to the descriptions in S1106-S1111, which are not repeated herein.
And S1106, the charging driver sends a callback notification message to the battery driver.
In response to determining that the charge type is a high power charge type, the charge driver sends a callback notification message to the battery driver. The callback notification message is used to cause the battery driver to send a uevent event to the communication interface.
In some embodiments, S1104 may not be executed, and after the charger 200 negotiates with the charging driver to determine the charging type and the target charging power, the charging module may directly execute S1106 without determining whether the charging type is a high-power charging type or a low-power charging type, i.e. the ue event is repeated for one time, without waiting for the next heartbeat information period to come, so that the first application may acquire the target power charging information in time.
S1107, the battery driver sends a uevent event to the communication interface.
In response to the callback notification message, the battery driver may send a uevent event to the communication interface so that the communication interface may obtain the target power charging information.
Alternatively, the uevent event may be an interaction mechanism between the kernel layer and the application framework layer. Not only is the uevent event, but the battery-driven may also send other types of messages to the communication interface in response to a callback notification message, the uevent event is just one example, and the application is not limited in this regard.
In this way, after determining the high-power charging type, the electronic device 100 may actively send the uevent event to the communication interface through the battery driving, so that the communication interface and the stress layer may timely obtain the target power charging information.
S1108, the communication interface sends a message for acquiring the target power charging information to the battery driver.
In response to the uevent event, the communication interface may send a message to the battery drive to obtain the target power charging information. And the message for acquiring the target power charging information is used for acquiring the stored target power charging information.
In some embodiments, the message sent by the communication interface to the battery drive in S1108 to obtain the target power charging information may be referred to as a first message.
S1109, the battery drive transmits the target power charging information to the communication interface.
In response to a message sent by the communication interface to obtain the target power charging information, the battery driver may obtain the target power charging information and send the target power charging information to the communication interface.
And S1110, the communication interface sends the target power charging information to the first application.
S1111, the first application obtains a target power charging icon based on the target power charging information, and displays the target power charging icon.
The target power charging information includes, but is not limited to, one or more of the following: the remaining power of the electronic device 100, the state of charge of the electronic device 100, the high power charging voltage, the high power charging current, the high power charging icon, and the like. The state of charge of the electronic device 100 includes, but is not limited to, any of the following; an underfill state of charge, an uncharged state, and a full state.
In response to the battery-driven transmitted target power charging information, the communication interface transmits the target power charging information to the first application. After the first application obtains the target power charging information, the first application may obtain the high power charging icon from the target power charging information, and display the high power charging icon.
For example, how the electronic device 100 displays the high-power charging icon may refer to the descriptions in the embodiments of fig. 4D and 4E, and the description is omitted herein.
Fig. 12 shows a timing diagram of another first application acquiring target power charging information.
Illustratively, the time difference between two adjacent heartbeats may be 60s, requiring a uevent event to be sent before the heartbeat information is sent. The time difference between two adjacent uevent events may also be 60s. As shown in fig. 12, the battery drive sends a uevent event to the first application over the communication interface at time ts. The battery drive sends a uevent event to the first application over the communication interface at time (t+60) s. The battery drive sends a uevent event to the first application over the communication interface at time (t+120) s. The battery drive sends a heart event to the first application via the communication interface at time (t+180) s. The battery drive sends a uevent event to the first application over the communication interface at time (t+240) s.
As shown in fig. 12, if the charger 200 and the battery drive negotiate the charging protocol at time (t+185) s, a high power charge is determined. Since the charging driver has sent a uevent event to the communication interface at time (t+180) s. Since the heartbeat period is 60s, the charging drive needs to send a uevent event once more at time (t+240) s.
In order to reduce the time that the charging driver waits to send the next uevent event, and also to shorten the time that the first application switches to displaying the high-power charging icon, after the charger 200 and the battery driver negotiate the charging protocol at time (t+185) s, the charging driver may not wait to send the uevent event once at time (t+240) s, and actively send the uevent event once after the charging protocol negotiation is completed, for example, the battery driver may send the uevent event to the communication interface once in addition at time (t+186) s. Then, the battery driver may receive a message for acquiring the target power charging information transmitted by the communication interface, and in response to the message for acquiring the target power charging information transmitted by the communication interface, the battery driver may transmit the target power charging information to the communication interface at time (t+189) s. After receiving the target power charging information, the communication interface sends the target power charging information to the first application, and the first application can acquire the target power charging information and acquire the high-power charging icon from the target power charging information. The first application may switch to displaying the high power charging icon at time (t+198) s.
Compared with fig. 9, the time for switching the first application to display the high-power charging icon is shortened, and the step ensures that the first application is timely switched to display the high-power charging icon.
In some embodiments, to avoid the first application from continuously displaying the initial charge icon in fig. 11 due to information loss or other reasons. After the first application monitors that the time for displaying the initial charging icon exceeds the first time, the first application can actively send a message for acquiring the target power charging information to the battery driver so as to determine whether to continue displaying the initial charging icon or switch to displaying the high power charging icon or the low power charging icon.
In some embodiments, the method steps shown in fig. 13 may not be performed if the first application has switched to display a high power charge icon or a low power charge icon.
Fig. 13 is a flowchart of a method for the first application to obtain the target power charging information.
S1301, the first application sends a message for acquiring the target power charging information to the communication interface.
In some embodiments, the first application in S1301 sends a message to the communication interface to obtain the target power charging information, which may be referred to as a second message.
After the first application monitors that the time for displaying the initial charging icon exceeds the first time, the first application can send a message for acquiring the target power charging information to the communication interface in order to confirm whether to continue displaying the initial charging icon or switch to displaying the high power charging icon or the low power charging icon.
S1302, the communication interface sends a message for acquiring the target power charging information to the battery driver.
In response to the message sent by the first application to obtain the target power charging information, the communication interface sends the message of the target power charging information to the battery drive.
S1303, in response to the message for acquiring the target power charging information, the battery drive acquires the target power charging information.
And responding to a message which is sent by the communication interface and used for acquiring the target power charging information, and acquiring the target power charging information by the battery driver.
In the case where the battery-driven and charger 200 negotiates a low power charging type, the target power charging information includes, but is not limited to, one or more of the following: the remaining power of the electronic device 100, the state of charge of the electronic device 100, the low power charging voltage, the low power charging current, the low power charging icon, etc. The state of charge of the electronic device 100 includes, but is not limited to, any of the following; an underfill state of charge, an uncharged state, and a full state.
In the case where the battery-driven and charger 200 negotiates a high power charging type, the standard power charging information includes, but is not limited to, one or more of the following: the remaining power of the electronic device 100, the state of charge of the electronic device 100, the high power charging voltage, the high power charging current, the high power charging icon, and the like. The state of charge of the electronic device 100 includes, but is not limited to, any of the following; an underfill state of charge, an uncharged state, and a full state.
S1304, the battery drive sends the target power charging information to the communication interface.
And S1305, the communication interface sends the target power charging information to the first application.
In response to obtaining the target power charging information, the battery driver sends the target power charging information to the communication interface, and the communication interface sends the target power charging information to the first application.
S1306, the first application determines whether to switch to display the charging icon based on the target power charging information.
After the first application obtains the target power charging information, the first application may determine whether to switch to display the charging icon based on the target power charging information.
Specifically, when the first application determines that the charging type is the low-power charging type based on the target power charging information, and when the low-power charging icon is the same as the initial charging icon, the first application may determine not to switch to display the charging icon.
Under the condition that the first application determines that the charging type is the low-power charging type based on the target power charging information, under the condition that the low-power charging icon is different from the initial charging icon, the first application can determine that the charging icon needs to be switched and displayed. The first application may obtain the low power charging icon from the target power charging information and switch to displaying the low power charging icon.
Under the condition that the first application determines that the charging type is the high-power charging type based on the target power charging information, the first application can determine that the charging icon needs to be switched and displayed. The first application may obtain the high power charging icon from the target power charging information and switch to displaying the high power charging icon.
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 described in 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 (14)

1. The method for displaying the charging icon is applied to the electronic equipment, and is characterized by comprising a kernel layer, an application program framework layer and an application layer, wherein the kernel layer comprises a charging driver and a battery driver, the application program framework layer comprises a communication interface, and the application layer comprises a first application, and the method comprises the following steps:
the electronic equipment is connected to a charger which is powered on;
The electronic equipment confirms target charging power through the charging drive and the charger with the power supply connected, and stores target power charging information, wherein the target power charging information comprises a target charging icon;
the electronic equipment charges a battery in the electronic equipment based on the target charging power through the charger which is powered on;
before sending the next heartbeat information, the electronic device sends a callback notification message to the battery driver through the charging driver, wherein the heartbeat information is periodically sent to the communication interface by the battery driver;
in response to the callback notification message, the electronic device sends the target power charging information to the first application through the battery drive and the communication interface;
and the electronic equipment acquires the target charging icon from the target power charging information through the first application, and displays the target charging icon.
2. The method of claim 1, wherein the electronic device, in response to the callback notification message, sends the target power charging information to the first application via the battery-driven and communication interface, comprising in particular;
Responding to the callback notification message, and sending a first uevent event to the communication interface by the electronic equipment through the battery drive;
in response to the first uevent event, the electronic device sends a first message to the battery drive over the communication interface;
in response to the first message, the electronic device sends the target power charging information to the communication interface through the battery drive;
and the electronic equipment sends the target power charging information to the first application through the communication interface.
3. The method according to claim 1 or 2, wherein before the electronic device confirms a target charging power by the charging drive and the powered-on charger, the method further comprises;
the electronic equipment charges a battery in the electronic equipment based on initial power through the charger which is powered on;
and the electronic equipment displays an initial charging icon through the first application.
4. A method according to claim 3, wherein the electronic device sends a callback notification message to the battery drive via the charging drive, comprising in particular;
And under the condition that the target charging power is larger than the first power, the electronic equipment sends a callback notification message to the battery driver through the charging driver.
5. The method of claim 4, wherein the target charging power is greater than the initial power.
6. The method of claim 4 or 5, wherein the target charging icon is a high power charging icon, the high power charging icon being different from the initial charging icon.
7. The method according to claim 4 or 5, further comprising;
and under the condition that the target charging power is smaller than the first power and the target charging icon is different from the initial charging icon, the electronic equipment sends a callback notification message to the battery driver through the charging driver.
8. The method according to claim 4 or 5, further comprising;
and under the condition that the target charging power is smaller than the first power and the low-power charging icon is the same as the initial charging icon, the electronic equipment does not send the callback notification message to the battery driver through the charging driving.
9. The method of claim 3, wherein the electronic device obtains the target charging icon from the target power charging information through the first application, specifically comprising;
and under the condition that the first application receives the target power charging information, the electronic equipment acquires the target charging icon from the target power charging information through the first application.
10. The method of claim 9, wherein the method further comprises;
when the first application does not receive the target power charging information, the electronic device sends a second message to the communication interface after monitoring that the display duration of the initial charging icon exceeds a first duration through the first application;
the electronic device sending the second message to the battery drive through the communication interface;
in response to the second message, the electronic device sends the target power charging information to the communication interface through the battery drive;
the electronic equipment sends the target power charging information to the first application through the communication interface;
the electronic equipment acquires the target charging icon from the target power charging information through the first application;
And the electronic equipment displays the target charging icon through the first application under the condition that the target charging icon is different from the initial charging icon.
11. The method of claim 10, wherein the method further comprises;
and under the condition that the target charging icon is the same as the initial charging icon, the electronic equipment continuously displays the initial charging icon.
12. The method of claim 1 or 2, wherein the target power charging information comprises one or more of: the method comprises the following steps of enabling the residual electric quantity of the electronic equipment, the charging state of the electronic equipment, a target charging voltage, a target charging current and a target charging icon to be included in the charging state of the electronic equipment; an underfill state of charge, an uncharged state, and a full state.
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 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.
CN202311167099.XA 2023-09-12 2023-09-12 Charging icon display method and electronic equipment Active CN117013660B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311167099.XA CN117013660B (en) 2023-09-12 2023-09-12 Charging icon display method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311167099.XA CN117013660B (en) 2023-09-12 2023-09-12 Charging icon display method and electronic equipment

Publications (2)

Publication Number Publication Date
CN117013660A CN117013660A (en) 2023-11-07
CN117013660B true CN117013660B (en) 2024-03-08

Family

ID=88569197

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311167099.XA Active CN117013660B (en) 2023-09-12 2023-09-12 Charging icon display method and electronic equipment

Country Status (1)

Country Link
CN (1) CN117013660B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110457111A (en) * 2019-08-19 2019-11-15 深圳传音控股股份有限公司 A kind of icon display method, device and terminal
CN112671080A (en) * 2021-03-16 2021-04-16 荣耀终端有限公司 Charging method and device
CN115589051A (en) * 2022-11-18 2023-01-10 荣耀终端有限公司 Charging method and terminal equipment
CN115622177A (en) * 2022-09-30 2023-01-17 荣耀终端有限公司 Charging method, mobile terminal and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20210032204A (en) * 2019-09-16 2021-03-24 삼성전자주식회사 Method for displaying charging situation at start of charging, the electronic device and storage medium therefor
CN116031964B (en) * 2022-05-30 2023-12-22 荣耀终端有限公司 Charging control method and terminal equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110457111A (en) * 2019-08-19 2019-11-15 深圳传音控股股份有限公司 A kind of icon display method, device and terminal
CN112671080A (en) * 2021-03-16 2021-04-16 荣耀终端有限公司 Charging method and device
CN115622177A (en) * 2022-09-30 2023-01-17 荣耀终端有限公司 Charging method, mobile terminal and storage medium
CN115589051A (en) * 2022-11-18 2023-01-10 荣耀终端有限公司 Charging method and terminal equipment

Also Published As

Publication number Publication date
CN117013660A (en) 2023-11-07

Similar Documents

Publication Publication Date Title
CN112789651B (en) Frequency adjustment method and device applied to terminal and electronic equipment
CN113704014B (en) Log acquisition system, method, electronic device and storage medium
EP3787298A1 (en) Flexible screen display method and terminal
CN109559270B (en) Image processing method and electronic equipment
US11683850B2 (en) Bluetooth reconnection method and related apparatus
CN113704205B (en) Log storage method, chip, electronic device and readable storage medium
CN113448382B (en) Multi-screen display electronic device and multi-screen display method of electronic device
CN115333941B (en) Method for acquiring application running condition and related equipment
CN113641271A (en) Application window management method, terminal device and computer readable storage medium
CN112437341B (en) Video stream processing method and electronic equipment
CN114691248B (en) Method, device, equipment and readable storage medium for displaying virtual reality interface
CN117013660B (en) Charging icon display method and electronic equipment
CN116828100A (en) Bluetooth audio playing method, electronic equipment and storage medium
CN113467821A (en) Application program repairing method, device, equipment and readable storage medium
CN115513571B (en) Control method of battery temperature and terminal equipment
CN116795476B (en) Wallpaper deleting method and electronic equipment
CN117221713B (en) Parameter loading method and electronic equipment
CN116048831B (en) Target signal processing method and electronic equipment
CN115529379B (en) Method for preventing Bluetooth audio Track jitter, electronic equipment and storage medium
CN115482143B (en) Image data calling method and system for application, electronic equipment and storage medium
CN116719376B (en) Voltage control method, device, equipment and storage medium
CN116703689B (en) Method and device for generating shader program and electronic equipment
WO2023246783A1 (en) Method for adjusting device power consumption and electronic device
RU2775835C1 (en) Method for wireless charging and electronic apparatus
CN117708009A (en) Signal transmission method 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