Search

EP-4738804-A1 - WALLPAPER DISPLAY METHOD AND ELECTRONIC DEVICE

EP4738804A1EP 4738804 A1EP4738804 A1EP 4738804A1EP-4738804-A1

Abstract

This application discloses a wallpaper display method and an electronic device, which are used to avoid a flickering black screen caused by a dynamic wallpaper APP playing an animation effect video in a multi-screen coordination scenario. The wallpaper display method includes: establishing, by a first electronic device, a multi-screen coordination connection to a second electronic device at a first time point, where a folding angle of the first electronic device is a first angle; at a second time point, the folding angle of the first electronic device changing to a second angle, and based on that the first electronic device establishes the multi-screen coordination connection to the second electronic device, skipping displaying, by the first electronic device, an animation effect of a wallpaper change; disconnecting, by the first electronic device, the multi-screen coordination connection from the second electronic device at a third time point, where the folding angle of the first electronic device is the first angle at the third time point; and at a fourth time point, the folding angle of the first electronic device changing to the second angle, and based on that the first electronic device does not establish a multi-screen coordination connection to another electronic device, displaying, by the first electronic device, the animation effect of the wallpaper change.

Inventors

  • JIANG, FAN

Assignees

  • Honor Device Co., Ltd.

Dates

Publication Date
20260506
Application Date
20230914

Claims (10)

  1. A wallpaper display method, applied to a first electronic device, wherein the first electronic device is a foldable screen device, and the method comprises: establishing, by the first electronic device, a multi-screen coordination connection to a second electronic device at a first time point, wherein a folding angle of the first electronic device is a first angle; at a second time point, the folding angle of the first electronic device changing from the first angle to a second angle, and in a process in which the folding angle of the first electronic device changes from the first angle to the second angle, based on that the first electronic device establishes the multi-screen coordination connection to the second electronic device, skipping displaying, by the first electronic device, an animation effect of a wallpaper change, wherein the second time point is later than the first time point; disconnecting, by the first electronic device, the multi-screen coordination connection from the second electronic device at a third time point, wherein the folding angle of the first electronic device is the first angle at the third time point; and at a fourth time point, the folding angle of the first electronic device changing from the first angle to the second angle, and in a process in which the folding angle of the first electronic device changes from the first angle to the second angle, based on that the first electronic device does not establish a multi-screen coordination connection to another electronic device, displaying, by the first electronic device, the animation effect of the wallpaper change, wherein the fourth time point is later than the third time point.
  2. The method according to claim 1, further comprising: when the first electronic device establishes the multi-screen coordination connection to the second electronic device, sending, by a multi-screen coordination application in the first electronic device, first indication information to a dynamic wallpaper application in the first electronic device, wherein the first indication information indicates that the multi-screen coordination connection has been established; and setting, by the dynamic wallpaper application, a multi-screen coordination flag bit to be valid based on the first indication information, wherein when valid, the multi-screen coordination flag bit indicates that the multi-screen coordination connection has been established.
  3. The method according to claim 2, wherein sending, by the multi-screen coordination application in the first electronic device, the first indication information to the dynamic wallpaper application in the first electronic device comprises: sending, by the multi-screen coordination application, the first indication information to the dynamic wallpaper application by using a broadcast message.
  4. The method according to claim 2 or 3, further comprising: when the first electronic device disconnects the multi-screen coordination connection from the second electronic device, sending, by the multi-screen coordination application, second indication information to the dynamic wallpaper application, wherein the second indication information indicates that the multi-screen coordination connection has been disconnected; and setting, by the dynamic wallpaper application, the multi-screen coordination flag bit to be invalid based on the second indication information, wherein when invalid, the multi-screen coordination flag bit indicates that the first electronic device disconnects the multi-screen coordination connection.
  5. The method according to claim 4, wherein sending, by the multi-screen coordination application, the second indication information to the dynamic wallpaper application comprises: sending, by the multi-screen coordination application, the second indication information to the dynamic wallpaper application by using the broadcast message.
  6. The method according to claim 4 or 5, wherein based on that the first electronic device establishes the multi-screen coordination connection to the second electronic device, displaying, by the first electronic device, the animation effect of the wallpaper change comprises: determining, by the first electronic device, that the multi-screen coordination flag bit is invalid, and when a change amount of the folding angle of the first electronic device is greater than or equal to a threshold, playing, by a display of the first electronic device, an animation effect video of a dynamic wallpaper, wherein the change amount of the folding angle is equal to an absolute value of a difference between the first angle and the second angle.
  7. The method according to claim 6, wherein playing, by the display of the first electronic device, the animation effect video of the dynamic wallpaper comprises: calculating, by the dynamic wallpaper application, a timestamp that is of the animation effect video and that corresponds to the second angle based on the second angle and total duration of the animation effect video; sending, by the dynamic wallpaper application, the animation effect video and the timestamp that corresponds to the second angle to a media codec in the first electronic device; decoding, by the media codec, the animation effect video to obtain all image frames, and sending target image frames to a drawing and rendering service, wherein the target image frames comprise image frames that are from a played timestamp to the timestamp that corresponds to the second angle and that are in all the image frames; and rendering and drawing, by the drawing and rendering service, the received target image frames, and controlling, by using a display driver in the first electronic device, the display to sequentially display the target image frames in ascending order of timestamps.
  8. The method according to claim 2 or 3, wherein based on that the first electronic device establishes the multi-screen coordination connection to the second electronic device, skipping displaying, by the first electronic device, the animation effect of the wallpaper change comprises: determining, by the first electronic device, that the multi-screen coordination flag bit is valid, and displaying, by the first electronic device, a still image on a display.
  9. An electronic device, comprising a display, a processor, and a memory, wherein the memory stores instructions, and when the processor executes the instructions, the method according to any one of claims 1 to 8 is performed, to control the display to display the animation effect video of the dynamic wallpaper.
  10. A computer-readable storage medium, comprising instructions, wherein the instructions, when executed on an electronic device, cause the electronic device to perform the method according to any one of claims 1 to 8.

Description

TECHNICAL FIELD Embodiments of this application relate to the field of electronic technologies, and in particular, to a wallpaper display method and an electronic device. BACKGROUND In a scenario in which two electronic devices perform multi-screen coordination, a first electronic device needs to record the screen and encode a screen recording video, and then send the screen recording video to a second electronic device performing multi-screen coordination for playback, thereby implementing multi-screen coordination between the two electronic devices. In this case, if a dynamic wallpaper application (application, APP) in the first electronic device plays an animation effect video of a dynamic wallpaper, the first electronic device needs to decode the animation effect video. If the processing capability of a processor in the first electronic device is relatively low, the dynamic wallpaper APP is restarted, causing a flickering black screen and affecting user experience. SUMMARY Embodiments of this application provide a wallpaper display method and an electronic device, which relate to the field of electronic technologies and are used to avoid a flickering black screen caused by a dynamic wallpaper APP playing an animation effect video in a multi-screen coordination scenario. To achieve the foregoing objective, embodiments of this application use the following technical solutions. According to a first aspect, a wallpaper display method is provided, applied to a first electronic device, where the first electronic device is a foldable screen device, and the method includes: establishing, by the first electronic device, a multi-screen coordination connection to a second electronic device at a first time point, where a folding angle of the first electronic device is a first angle; at a second time point, the folding angle of the first electronic device changing from the first angle to a second angle, and in a process in which the folding angle of the first electronic device changes from the first angle to the second angle, based on that the first electronic device establishes the multi-screen coordination connection to the second electronic device, skipping displaying, by the first electronic device, an animation effect of a wallpaper change, where the second time point is later than the first time point; disconnecting, by the first electronic device, the multi-screen coordination connection from the second electronic device at a third time point, where the folding angle of the first electronic device is the first angle at the third time point; and at a fourth time point, the folding angle of the first electronic device changing from the first angle to the second angle, and in a process in which the folding angle of the first electronic device changes from the first angle to the second angle, based on that the first electronic device does not establish a multi-screen coordination connection to another electronic device, displaying, by the first electronic device, the animation effect of the wallpaper change, where the fourth time point is later than the third time point. The animation effect of the wallpaper change may be achieved by using an animation effect video of a dynamic wallpaper, or may be achieved by using a vector change of a still wallpaper. For example, when the electronic device gradually changes from an unfolded state to a folded state, the wallpaper gradually moves to the left, and a point of coordinates (0, 0) of the display gradually changes from coordinates (0, 0) corresponding to the wallpaper to coordinates (B, 0) corresponding to the wallpaper. The left side of the display is a display area of a main screen, and the right side of the display is a display area of a secondary screen. A black screen begins to appear in the display area ofthe secondary screen, and the range of the black screen gradually increases. In the wallpaper display method provided in this embodiment of this application, in a multi-screen coordination scenario, the first electronic device establishes the multi-screen coordination connection to the second electronic device. When the folding angle of the first electronic device changes, the display of the first electronic device does not display the animation effect of the wallpaper change. The first electronic device disconnects the multi-screen coordination connection from the second electronic device, and when the folding angle of the display of the first electronic device changes, the first electronic device displays the animation effect of the wallpaper change. To be specific, the multi-screen coordination and the playback of the animation effect video of the dynamic wallpaper are mutually exclusive, and the multi-screen coordination has a higher priority, to avoid the flickering black screen caused by the dynamic wallpaper APP playing the animation effect video in the multi-screen coordination scenario. In a possible implementation, the method further includes: when th