Battery cover color change method and electronic device
AssigneeHonor Device Co., Ltd.
InventorsHaifei Li, Xiaoliang Li, Shi Cao, Jinning Guo
Life of this patent
Estimating the term…
Abstract
This application provides a battery cover color change method applicable to an electronic device and the electronic device. The electronic device includes an application and a battery cover. The method includes: sending audio data to an audio playing process by the application; in an audio playing process, obtaining color change data based on the first audio data, where the color change data corresponds to rhythms of the first audio data; and playing the first audio data while the battery cover changes colors in accordance with the rhythms of the first audio data driven by the color change data.
Claims20
A battery cover color change method, applicable to an electronic device, wherein the electronic device comprises an application and a battery cover, and the method comprises:
- sending, by the application, an audio control signal to an audio hardware abstraction layer, wherein the audio control signal is used for configuring a battery cover path, and the battery cover path is used for transmitting and processing color change data;
- determining whether a battery cover color change switch is in an on state;
- initiating, by the application, an audio playing process on first audio data, wherein the first audio data sequentially passes through an application layer, an application framework layer, an audio hub service layer, the audio hardware abstraction layer, and a kernel layer in the audio playing process;
- in the audio playing process, obtaining the color change data based on the first audio data, wherein the color change data corresponds to rhythms of the first audio data;
- and
- playing the first audio data while the battery cover changes colors in accordance with the rhythms of the first audio data driven by the color change data.
An electronic device, wherein the electronic device comprises:
- one or more processors, a memory, and a battery cover, wherein the memory stores program code;
- and
- wherein the one or more processors run the program code, to cause the electronic device to perform operations comprising:
- sending, by an application, an audio control signal to an audio hardware abstraction layer, wherein the audio control signal is used for configuring a battery cover path, and the battery cover path is used for transmitting and processing color change data;
- determining whether a battery cover color change switch is in an on state;
- initiating, by the application, an audio playing process on first audio data, wherein the first audio data sequentially passes through an application layer, an application framework layer, an audio hub service layer, the audio hardware abstraction layer, and a kernel layer in the audio playing process;
- in the audio playing process, obtaining the color change data based on the first audio data, wherein the color change data corresponds to rhythms of the first audio data;
- and
- playing the first audio data while the battery cover changes colors in accordance with the rhythms of the first audio data driven by the color change data.
Dependencies are inferred from the claim text.