A method for displaying application icons and an electronic device

By realizing the detection of layer-free function and window focus change callback events in electronic devices, the problem of dynamic icons not being updated in time during mode switching is solved, and the display accuracy and user experience are improved.

CN118426887BActive Publication Date: 2025-06-13HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410458984.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-15
Publication Date
2025-06-13
Estimated Expiration
2044-04-15

AI Technical Summary

Technical Problem

When switching between dark mode and light mode, the electronic device may experience the problem that the display content on the dynamic icon cannot be updated in time, resulting in inaccurate display content.

Method used

By realizing the detection of layer-free function and window focus change callback events in electronic devices, we ensure that the display content of the dynamic icon is updated in a timely manner after the user triggers the operation, so that it matches the current time point.

Benefits of technology

It effectively improves the display accuracy of dynamic icons, improves user experience, reduces resource waste and improves the utilization rate of mobile phone resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118426887B_ABST
    Figure CN118426887B_ABST
Patent Text Reader

Abstract

The embodiments of the present application are applied to the field of terminal technologies, and provide a method for displaying application icons and an electronic device. At a first time point, the electronic device displays a desktop in a first color mode, and the desktop includes a first icon displaying first information, and the first information matches the first time point. The electronic device turns off the screen. At a second time point, in response to a first switching event, the electronic device switches to a second color mode. At a third time point, in response to a second switching event, the electronic device switches to the first color mode, and between the second time point and the third time point, the electronic device remains in the screen-off state. At a fourth time point, in response to a first triggering operation of the user on the electronic device, the electronic device displays a desktop in the first color mode, and the desktop at the fourth time point includes a first icon displaying second information, and the second information matches the fourth time point. In the present application, the accuracy of the display of the first icon can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present application relate to the technical field of terminals, and in particular, to a method for displaying application icons and an electronic device. Background Art

[0002] With the continuous development of electronic devices, some applications in electronic devices support the display function of dynamic icons, and the display content of the dynamic icons can change according to the actual situation. For example, an electronic device can display a calendar icon on the desktop, and the display content on the calendar icon can include the current system date. As time goes by, the current system date will change, and correspondingly, the display content on the calendar icon will also change.

[0003] However, in some scenarios, such as the scenario of switching between the dark mode and the light mode, the electronic device may fail to update the display content on the dynamic icon in a timely manner, resulting in the display content on the dynamic icon not matching the actual situation. For example, the date displayed on the calendar icon is inconsistent with the current system date, which will cause the display content on the dynamic icon to be inaccurate. Therefore, how to accurately display the content on the dynamic icon to improve the user experience has become an urgent problem to be solved. Summary of the Invention

[0004] Embodiments of the present application provide a method for displaying application icons and an electronic device, which are used to improve the accuracy of dynamic icon display and thus improve the user experience.

[0005] To achieve the above object, the embodiments of the present application adopt the following technical solutions:

[0006] In a first aspect, a method for displaying application icons is provided, which is applied to an electronic device. The electronic device supports color mode switching, and the color mode includes a dark mode and a light mode. The electronic device has a function of not destroying layers, and the function of not destroying layers includes that when the electronic device does not display the desktop, the electronic device stores the display information of the application icons on the desktop. The application icon includes a first icon. In this method, at a first time point, the electronic device displays the desktop of the first color mode, and the desktop at the first time point includes the first icon displaying the first information, and the first information matches the first time point. Then, the electronic device turns off the screen. At a second time point, in response to a first switching event, the electronic device switches to the second color mode. At a third time point, in response to a second switching event, the electronic device switches to the first color mode. Between the second time point and the third time point, the electronic device remains in the screen-off state. At a fourth time point, in response to a first trigger operation by the user on the electronic device, the electronic device displays the desktop of the first color mode, and the desktop at the fourth time point includes the first icon displaying the second information, and the second information matches the fourth time point.

[0007] Among them, the first color mode is the dark mode, and the second color mode is the light mode, or the first color mode is the light mode, and the second color mode is the dark mode.

[0008] In this application, since the desktop before the electronic device turns off the screen includes a first icon displaying first information, and the desktop after detecting the first trigger operation includes a first icon displaying second information, and the second information matches the fourth time point. That is to say, the display content of the first icon is displayed according to the time information corresponding to the fourth time point. Therefore, the display content of the first icon can be made correct, improving the accuracy of the first icon display, enabling the user to understand the relevant time content by browsing the first icon, and enhancing the user experience.

[0009] In a possible implementation manner of the first aspect, the above-mentioned first icon includes an application icon of a calendar application, the first information includes the date and / or week to which the first time point belongs, and the second information includes the date and / or week to which the fourth time point belongs.

[0010] In this application, since the first icon includes an application icon of a calendar application, the user can clearly understand the current date by browsing the calendar application, which provides convenience for the user to understand the current date.

[0011] In a possible implementation manner of the first aspect, the above-mentioned first icon includes an application icon of a clock application, the first information includes the first time point, and the second information includes the fourth time point.

[0012] In this application, since the first icon includes an application icon of a clock application, the user can clearly understand the current time by browsing the clock application, which provides convenience for the user to understand the current time.

[0013] In a possible implementation manner of the first aspect, the above-mentioned application icon includes a second icon of a weather application. Among them, the desktop at the first time point further includes a second icon displaying third information, and the third information matches the weather at the location where the electronic device is located at the first time point; the desktop at the fourth time point further includes a second icon displaying fourth information, and the fourth information matches the weather at the location where the electronic device is located at the fourth time point.

[0014] In this application, since the application icon includes a second icon of a weather application, and the second icon displays the weather matching the location where the electronic device is located at the current time point, the user can clearly understand the current weather condition by browsing the weather application, which provides convenience for the user to understand the current weather.

[0015] In a possible implementation of the first aspect, the process of the electronic device displaying the desktop in the first color mode may specifically include: in response to a first trigger operation of the user on the electronic device, the electronic device displays the desktop in the first color mode, and after detecting that the electronic device displays the desktop in the first color mode, the electronic device updates the first icon so that the first icon includes second information.

[0016] In this application, when it is determined that the desktop in the first color mode is visible, the electronic device updates the first icon so that the first icon includes second information. In this way, while reducing resource waste, it can also achieve precise update of dynamic icons, improve the accuracy of dynamic icon display, enable users to understand relevant content by browsing dynamic icons, and enhance the user experience.

[0017] In a possible implementation of the first aspect, the process of the electronic device displaying the desktop in the first color mode may specifically include: in response to the first trigger operation of the user on the electronic device, the electronic device sets a callback event for window focus change, and the electronic device displays the desktop in the first color mode. After that, when it is detected that the callback event for window focus change returns a first result, the electronic device detects that the electronic device displays the desktop in the first color mode. Here, the first result is true.

[0018] In this application, by judging whether the focus visibility of the display interface changes, it is judged whether the display interface is the desktop. Specifically, when the focus visibility of the display interface changes, that is, when the focus content of the display interface changes, it is determined that the display interface is the desktop. In this way, it can more timely and accurately detect whether the display interface includes the first icon, thereby realizing precise update of the first icon, improving the accuracy of the first icon display, enabling users to understand relevant content by browsing the first icon, and enhancing the user experience.

[0019] In a possible implementation of the first aspect, before the electronic device updates the first icon, the method further includes: the electronic device determines that the desktop at the fourth time point includes dynamic icons, and the dynamic icons include the first icon.

[0020] The above method further includes: the electronic device determines that the desktop at the fourth time point does not include dynamic icons, and the electronic device does not update the first icon.

[0021] In this application, only when the display interface includes dynamic icons, the electronic device updates the dynamic icons. In this way, while reducing resource waste, it can also achieve precise update of dynamic icons, improve the accuracy of dynamic icon display, enable users to understand relevant content by browsing dynamic icons, and enhance the user experience.

[0022] In a possible implementation of the first aspect, the above dynamic icon includes at least one of the following: a dynamic icon independently displayed on the desktop; and a dynamic icon displayed at the position of the first page in a folder of the first size on the desktop.

[0023] In this application, if the dynamic icon is independently displayed on the desktop or is displayed at the position of the first page in a folder of the first size on the desktop, it indicates that the dynamic icon is visible. Therefore, the electronic device can set a callback event for window focus change to display the desktop in the first color mode. In this way, accurate update of the first icon can be achieved, improving the accuracy of the display of the first icon, enabling the user to understand relevant content by browsing the first icon, and enhancing the user experience.

[0024] In a possible implementation of the first aspect, the above method further includes: when it is determined that the electronic device has the function of not destroying layers, the electronic device detects whether the electronic device is displaying the desktop in the first color mode.

[0025] In this application, only when the electronic device has the function of not destroying layers, the electronic device sets a callback event for window focus change to detect whether the electronic device is displaying the desktop in the first color mode. In this way, the situation where the display content of the first icon is incorrect due to the desktop layer always being visible can be reduced, improving the accuracy of the display of the first icon and further enhancing the user's browsing experience.

[0026] In a possible implementation of the first aspect, the above method further includes: when it is determined that the electronic device does not have the function of not destroying layers, the electronic device detects whether the visibility of the first icon has changed. After detecting that the visibility of the first icon has changed, the electronic device updates the first icon.

[0027] In this application, if the electronic device does not have the function of not destroying layers, it means that the desktop layer can change. Therefore, the electronic device can determine whether the first icon can be updated by detecting whether the visibility of the first icon has changed. That is, if the visibility of the first icon has changed, it means that the desktop has switched to the foreground, that is, the mobile phone is displaying the first icon on the desktop. Therefore, the electronic device can update the first icon. In this way, accurate update of the first icon can be achieved, improving the accuracy of the display of the first icon, enabling the user to understand relevant content by browsing the first icon, and enhancing the user experience.

[0028] In a possible implementation of the first aspect, the process of the above electronic device updating the first icon may specifically include: when the display information of the first icon does not match the fourth time point, the electronic device updates the first icon; wherein, when the display information of the first icon matches the fourth time point, the electronic device does not update the first icon.

[0029] In this application, the first icon is updated only when the display information of the first icon does not match the fourth time point. In this way, not only can the probability of incorrect display of the first icon be reduced, the accuracy of the display of the first icon be improved, thereby enhancing the user's browsing experience, but also the waste of drawing resources can be reduced, and the utilization rate of mobile phone resources can be improved.

[0030] In a possible implementation of the first aspect, the above method further includes: at a fifth time point between the second time point and the third time point, in response to a first trigger operation of the user on the electronic device, the electronic device displays a desktop in a second color mode, and the desktop at the fifth time point includes a first icon displaying fifth information, and the fifth information matches the fifth time point.

[0031] In this application, after the electronic device switches to the second color mode, if it detects a first trigger operation of the user on the electronic device, the electronic device can directly display a desktop in the second color mode, and the desktop includes a first icon displaying fifth information, and the fifth information matches the fifth time point. In this way, accurate update of the first icon can be directly achieved, the accuracy of the display of the first icon can be improved, enabling the user to understand relevant content by browsing the first icon, and enhancing the user's usage experience.

[0032] In a possible implementation of the first aspect, the process of the above electronic device displaying a desktop in the second color mode may specifically include: in response to a first trigger operation of the user on the electronic device, the electronic device displays a desktop in the second color mode. After that, in response to detecting a color mode switch, the electronic device updates the first icon so that the first icon includes the fifth information.

[0033] In a possible implementation of the first aspect, the process of the above electronic device displaying a desktop in the first color mode may specifically include: at the fourth time point, in response to a first trigger operation of the user on the electronic device, the electronic device does not detect a color mode switch, and the electronic device does not update the first icon in response to detecting a color mode switch.

[0034] In a second aspect, the present application provides an electronic device, which includes a display screen, a memory, and one or more processors; the display screen, the memory, and the processor are coupled; the display screen is configured to display a first icon and / or a second icon, the memory is configured to store computer program code, and the computer program code includes computer instructions; when the processor executes the computer instructions, the electronic device is caused to execute the method described above.

[0035] In a third aspect, the present application provides a computer-readable storage medium, including computer instructions, which when running on an electronic device, cause the electronic device to execute the method described above.

[0036] In a fourth aspect, the present application provides a computer program product, which when running on an electronic device, causes the electronic device to execute the method described above.

[0037] In a fifth aspect, a chip is provided, including: an input interface, an output interface, a processor, and a memory, where the input interface, the output interface, the processor, and the memory are connected through an internal connection path, and the processor is configured to execute the code in the memory, and when the code is executed, the processor is configured to execute the method described above.

[0038] Among them, for the beneficial effects that can be achieved by the electronic device described in the second aspect, the computer-readable storage medium described in the third aspect, the computer program product described in the fourth aspect, and the chip described in the fifth aspect, reference can be made to the beneficial effects in the first aspect and any possible design thereof, which will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 It is a schematic diagram of an interface for displaying application icons provided by an embodiment of the present application;

[0040] Figure 2 It is a schematic diagram of an interface for displaying an incorrect date on a calendar icon provided by an embodiment of the present application;

[0041] Figure 3 It is a schematic diagram of an interface for clicking a "dark mode" control provided by an embodiment of the present application;

[0042] Figure 4 It is a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present application;

[0043] Figure 5 It is a schematic diagram of the software structure of an electronic device provided by an embodiment of the present application;

[0044] Figure 6Flowchart of a method for displaying application icons provided by an embodiment of the present application;

[0045] Figure 7 Schematic diagram of an interface for switching the display mode from a light mode to a dark mode provided by an embodiment of the present application;

[0046] Figure 8 Schematic diagram of an interface for enabling the dark mode provided by an embodiment of the present application;

[0047] Figure 9 Schematic diagram of an interface for performing an unlocking operation provided by an embodiment of the present application;

[0048] Figure 10 Schematic diagram of an interface for performing an upward sliding operation provided by an embodiment of the present application;

[0049] Figure 11 Schematic diagram of a process for clearing all cached data provided by an embodiment of the present application;

[0050] Figure 12 Schematic diagram of a process for updating cached data according to a callback event of configuration change provided by an embodiment of the present application;

[0051] Figure 13 Schematic diagram of a process for updating cached data according to a callback event of visibility change provided by an embodiment of the present application;

[0052] Figure 14 Schematic diagram of an interface for displaying the display position of a calendar icon on the desktop provided by an embodiment of the present application;

[0053] Figure 15 Schematic diagram of a process for updating a dynamic icon when the dynamic icon is on the desktop provided by an embodiment of the present application;

[0054] Figure 16 Schematic diagram of a process for updating a dynamic icon when the dynamic icon is in a large folder provided by an embodiment of the present application;

[0055] Figure 17 Schematic diagram of a process for updating a dynamic icon when the dynamic icon is in a small folder provided by an embodiment of the present application;

[0056] Figure 18 Schematic diagram of a process for updating the display content of a dynamic icon provided by an embodiment of the present application. Detailed implementation manners

[0057] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings in the embodiments of the present application. Among them, in the description of the present application, unless otherwise specified, "and / or" in the present application is merely an association relationship describing associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. These three situations, where A and B may be singular or plural. Also, in the description of the present application, unless otherwise specified, "a plurality of" means two or more than two. "At least one (item)" or its similar expression refers to any combination of these items, including any combination of single item (item) or plural items (items). For example, at least one (item) of a, b, or c may represent: a, b, c, a - b, a - c, b - c, or a - b - c, where a, b, and c may be single or multiple. Additionally, in order to clearly describe the technical solutions in the embodiments of the present application, in the embodiments of the present application, terms such as "first" and "second" are used to distinguish identical or similar items with basically the same functions and roles. Those skilled in the art can understand that terms such as "first" and "second" do not limit the quantity and execution order, and terms such as "first" and "second" do not necessarily mean different. At the same time, in the embodiments of the present application, words such as "exemplary" or "for example" are used to represent examples, illustrations, or explanations. Any embodiment or design solution described as "exemplary" or "for example" in the embodiments of the present application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, using words such as "exemplary" or "for example" is intended to present relevant concepts in a specific manner for easy understanding.

[0058] In some embodiments, the electronic device may display a plurality of application icons and / or the application names corresponding to the application icons on the desktop (or referred to as the main interface, home interface). Among them, the plurality of application icons may include static icons and / or dynamic icons (or referred to as the first icons). The static icon is an application icon that displays a fixed identifier of the application program. That is to say, the display content of the static icon is pre-set and will only be updated during the update of the application program or the system update, and will not be updated during the operation of the application program. Exemplarily, the static icon may be the icon corresponding to the browser application, the icon corresponding to the gallery application, etc. The dynamic icon is an application icon that can be updated in real time according to the actual situation (or referred to as environmental factors). That is to say, the display content of the dynamic icon will change with environmental factors (such as time, climate). Exemplarily, the dynamic icon may be the icon corresponding to the clock application, or the icon corresponding to the calendar application, or the icon corresponding to the weather application, etc., and specific examples are not limited.

[0059] Exemplarily, taking the above-mentioned electronic device as a mobile phone for example, please refer toFigure 1 On the mobile phone screen, there is a desktop which includes multiple application icons and the corresponding application names for each icon. Among them, the calendar icon 101 is the above-mentioned dynamic icon, and the current date (15) and the corresponding day of the week (Monday) of the current date are displayed on the calendar icon 101. The calculator icon 102 is a static icon, and the display content of the calculator icon 102 will not change with environmental factors such as time.

[0060] Next, the calendar icon will be taken as an example of the dynamic icon for further detailed description.

[0061] However, in some usage scenarios, the electronic device may fail to update the calendar icon in a timely manner according to the current time. That is to say, the electronic device cannot dynamically change the date displayed on the calendar icon as time changes, which may lead to the date displayed on the calendar icon being incorrect and affecting the user's visual experience. For example, please refer to Figure 2 On the mobile phone screen, there is a desktop which includes a time display area 1B and application icons. The application icons may include a calendar icon 1A, a clock icon, etc. It can be seen that the displayed date of the calendar icon 1A is different from the date displayed in the time display area 1B. Specifically, the displayed date of the calendar icon 1A is Monday, the 15th. The date displayed in the time display area 1B is Wednesday, April 16th. It can be understood that the date displayed in the time display area 1B is the system date. If the date displayed on the calendar icon 1A is different from the system date, it means that the date displayed on the calendar icon 1A has not been updated in a timely manner, or the update of the displayed date is incorrect, which will reduce the display effect of the calendar icon and thus affect the user's browsing experience.

[0062] Exemplarily, the above usage scenario can be a mode switching scenario. The mode switching scenario refers to a scenario of switching display modes. The display mode (or color mode) may include a dark mode and a light mode. The dark mode means that the system background is dark and the system text is light. The light mode means that the system background is light and the system text is dark. The mode switching scenario can be a scenario of switching from the light mode to the dark mode, or a scenario of switching from the dark mode to the light mode, and no specific limitation is made.

[0063] In one example, taking the above mode switching scenario as an example of switching from the light mode to the dark mode, such as Figure 3The interface shown in (a) is an interface for displaying the downward notification bar, which includes "WLAN" control, "Bluetooth" control, "Mobile Data" control, "Mute" control, and "Dark Mode" control, etc. After that, if the "Dark Mode" control in the downward notification bar is clicked by the user, it means that the user wants to turn on the dark mode. Therefore, the mobile phone can directly switch the display mode of the mobile phone from the light mode to the dark mode, that is, the mobile phone can display an interface as shown in Figure 3 (b).

[0064] It can be understood that the default display mode of the electronic device is usually the light mode. That is to say, the electronic device usually displays content with a light system background and dark system text. After that, in response to the user's operation of turning on the "Dark Mode" control, the electronic device can perform the operation of turning on the dark mode. After that, when it is detected that the dark mode is turned on, if the current time reaches the start switching time (or the first switching time) of the mode switching period, the electronic device can switch the display mode from the light mode to the dark mode. After that, when the current time reaches the end switching time (or the second switching time) of the mode switching period, the electronic device can switch the display mode back from the dark mode to the light mode. However, if during the process of switching to the dark mode, if the electronic device has not been used during the mode switching period, that is, the electronic device is used only after switching back to the light mode, then the calendar icon of the electronic device may not be updated in a timely manner, that is, the date shown by the calendar icon is inconsistent with the current system date, thus affecting the user experience.

[0065] It should be noted that as long as the display mode of the electronic device before use is the same as the display mode when the electronic device is used next time, and the two display modes are separated by one day, that is, the time corresponding to the display mode before the electronic device is used is the time of the first day, and the time corresponding to the display mode when the electronic device is used next time is the time of the second day, then the above-mentioned situation of the calendar icon not being updated in a timely manner will occur. Therefore, in this embodiment, it is not limited to the scenario of switching from the light mode to the dark mode and then back to the light mode. It can also be the scenario of switching from the dark mode to the light mode and then back to the dark mode. As long as the dates of the two mode switches are different, they can all be used as the application scenarios of this application.

[0066] Exemplarily, the above-mentioned mode switching period can be set by default in the electronic device or can be set in advance by the user according to the actual situation, and no specific limitation is made. For example, the mode switching period can be set from 10:00 p.m. to 7:00 a.m. the next day. That is to say, the above-mentioned start switching time is 10:00 p.m., and the end switching time is 7:00 a.m. the next day. Therefore, if the electronic device is in the screen-off state before 10:00 p.m. and the electronic device has not been used between 10:00 p.m. and 7:00 a.m. the next day, that is, the electronic device is in the screen-off state between 10:00 p.m. and 7:00 a.m. the next day, then the electronic device will default that the mode switching operation has not been performed, and the electronic device will continue to display the date before the screen-off state, that is, the electronic device will continue to display the date before 10:00 p.m. the previous day, resulting in the current date displayed by the calendar icon being inconsistent with the current system date, thereby affecting the user's browsing experience.

[0067] In some other cases, the above scenario can also be an interface switching scenario. In one example, for an electronic device with the function of not destroying layers set, if the electronic device switches from the locked screen state to the unlocked state, the electronic device will default that the layer corresponding to the desktop has not changed. That is to say, the electronic device will continue to display the date before the locked screen state. In another example, for an electronic device with the function of not destroying layers set, if the display interface of the electronic device returns from other application interfaces to the desktop, the electronic device will default that the layer corresponding to the desktop has not changed. That is to say, the electronic device will continue to display the date when the desktop was last displayed. If the electronic device performs the unlocking operation only on the second day, or returns to the desktop only on the second day, then if the layer corresponding to the desktop has not changed, it will result in the date displayed by the calendar icon being the date of the previous day (or the first day), rather than the current date (or the second day), that is, the date displayed by the calendar icon will be inconsistent with the current system date, thereby affecting the user's experience.

[0068] Among them, the above-mentioned function of not destroying layers means that when the electronic device does not display the desktop, that is, when the desktop is in the background, the layers of the desktop will not be destroyed, and the electronic device still stores the layers of the desktop. That is to say, after the electronic device switches to the unlocked state, the electronic device will not redraw the layers of the desktop and will continue to call the layers before the electronic device was locked to display the desktop.

[0069] Therefore, in order to update the display time of the calendar icon in a timely manner and improve the accuracy of the date display on the calendar icon, an embodiment of the present application provides a method for displaying application icons. In this method, the electronic device receives a mode switching instruction, where the mode switching instruction is used to switch the display mode of the electronic device from the light mode to the dark mode. After that, when the focus content of the display interface changes and the display interface includes dynamic icons, the electronic device updates the dynamic icons, where the change in the focus content of the display interface means that the display interface of the electronic device switches to the desktop.

[0070] Among them, the above dynamic icon is a calendar icon.

[0071] In an embodiment of the present application, by judging whether the focus visibility of the display interface changes, it is judged whether the display interface is the desktop. Specifically, when the focus visibility of the display interface changes, that is, when the focus content of the display interface changes, it is determined that the display interface is the desktop. And when the display interface includes dynamic icons, the electronic device updates the dynamic icons. In this way, it is possible to detect more timely and accurately whether the display interface includes dynamic icons, thereby realizing the accurate update of dynamic icons, improving the accuracy of dynamic icon display, enabling the user to understand relevant content by browsing dynamic icons, and enhancing the user experience.

[0072] In some examples, the electronic device in the embodiment of the present application may be a mobile phone, a tablet computer, a smart watch, a desktop type, a laptop, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, and a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) / virtual reality (VR) device, etc. that are installed with a calendar application and have a dark mode switching function. The embodiment of the present application does not impose special restrictions on the specific form of the electronic device.

[0073] Figure 4 This is the schematic hardware structure diagram of the electronic device 100 provided by the embodiment of the present application. As Figure 4 shown, the electronic device 100 may include a processor 110, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an external memory interface 120, an internal memory 121, a sensor module 180, and a display screen 190, etc.

[0074] It can be understood that the structure illustrated in the embodiments of the present invention does not constitute a specific limitation on the electronic device 100. In some other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figures, or combine certain components, or split certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0075] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.

[0076] Among them, the controller may be the nerve center and command center of the electronic device 100. The controller may generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching and executing instructions.

[0077] 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. This memory may save the instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0078] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, etc.

[0079] The I2S interface can be used for audio communication. The PCM interface can also be used for audio communication to sample, quantize, and encode analog signals.

[0080] The wireless communication function of the electronic device 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, and the baseband processor, etc. The antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals. The mobile communication module 150 can provide solutions for wireless communication including 2G / 3G / 4G / 5G, etc. applied to the electronic device 100. The wireless communication module 160 can provide solutions for wireless communication applied to the electronic device 100.

[0081] It can be understood that the interface connection relationship between the modules illustrated in the embodiments of the present invention is only for illustrative purposes and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0082] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to implement the storage capacity expansion of the electronic device 100.

[0083] The internal memory 121 can be used to store computer-executable program code, and the executable program code includes instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 can include a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.). The data storage area can store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.). In some embodiments, the program storage area can also store dynamic icons (calendar icons) cached during the use of the electronic device 100, that is, the program storage area stores the calendar icons that have been updated by the electronic device 100 before. In addition, the internal memory 121 can include high-speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0084] The sensor module 180 can include a folding angle detection sensor, a pressure sensor, a gyroscope sensor, a barometric pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc.

[0085] The display screen (or screen) 190 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can adopt a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Miniled, a MicroLed, a Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 can include one or N display screens 194, where N is a positive integer greater than 1.

[0086] In some embodiments, the above display screen 190 can also be used to display dynamic icons. Among them, the dynamic icon is an application icon that can be updated in real time according to the actual situation, that is, the display content of the dynamic icon will change according to the actual situation. Exemplarily, taking the dynamic icon as a calendar icon as an example, the calendar icon displays the current date and / or the week corresponding to the current date.

[0087] Exemplarily, the software system of the above electronic device 100 can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture. In the embodiments of the present invention, the Android system with a layered architecture is taken as an example to exemplarily illustrate the software structure of the electronic device 100.

[0088] Figure 5 It is a software structure block diagram of the electronic device 100 in the embodiments of the present application.

[0089] The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom, which are the application layer (abbreviated as the application layer), the application framework layer (abbreviated as the framework layer), the Android runtime and the system library, and the kernel (Kernel) layer (or called the driver layer). The application layer can include a series of application packages.

[0090] Among them, the application layer can include a series of application packages. The application layer can include multiple application packages. As Figure 5 shown, the application packages can include applications such as phone, short message, calendar, map, and music.

[0091] The application framework layer provides application programming interfaces (APIs) and programming frameworks for the applications in the application layer. The application framework layer includes some predefined functions. As Figure 5 shown, the application framework layer can include a window manager, a content provider, a phone manager, an icon management module, a mode switching module, a dynamic icon updater, calendar-related tool classes, etc.

[0092] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc. The content provider is used to store and obtain data, and make these data accessible to applications. The data can include videos, images, audio, dialed and answered calls, browsing history and bookmarks, phone books, etc. The phone manager is used to provide the communication function of the electronic device 100. For example, the management of call states (including answering, hanging up, etc.).

[0093] Among them, the above icon management module is used to manage dynamic icons. The above mode switching module is used to perform a mode switching operation on the display interface of the electronic device. In this embodiment, the mode switching module is a launcher application, which is used to create a cache of application shortcuts in the electronic device. In some embodiments, the electronic device obtains the current time. When the current time reaches the first preset time, the mode switching module can trigger a first mode switching operation. Among them, the first mode switching operation is used to switch the display mode of the electronic device from the light mode to the dark mode. In other embodiments, when the current time reaches the second preset time, the mode switching module can trigger a second mode switching operation. Among them, the second mode switching operation is used to switch the display mode of the electronic device from the dark mode to the light mode.

[0094] The dynamic icon updater is used to manage dynamic icons. In some embodiments, when receiving a clear instruction for dynamic icons, the dynamic icon updater can clear all currently cached dynamic icons (such as calendar icons). In other embodiments, when receiving an update instruction for dynamic icons, the dynamic icon updater can update the dynamic icon set. Among them, the dynamic icon set includes at least one target dynamic icon, and the target dynamic icon is the dynamic icon that is updated and displayed on the desktop after the dark mode of the electronic device is switched.

[0095] The calendar-related tool class is used to determine whether the calendar icon needs to be updated. Specifically, the calendar-related tool class can obtain the date displayed by the current calendar icon (or called the icon display date) and the time of the electronic device system (or called the system date). Then, the calendar-related tool class determines whether the icon display date is the same as the system date. When the icon display date is different from the system date, a first indication is sent to the dynamic icon updater to facilitate the dynamic icon updater to update the calendar icon date to the system date. When the icon display date is the same as the system date, a second indication is sent to the dynamic icon updater to prevent the dynamic icon updater from updating the calendar icon date. That is to say, only when the calendar icon date is different from the system date, the dynamic icon updater updates the dynamic icon. In this way, unnecessary power consumption losses can be reduced and the utilization rate of display resources can be improved.

[0096] The Android runtime includes a core library and a virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.

[0097] The core library includes two parts: one part is the functional functions that the Java language needs to call, and the other part is the core library of Android.

[0098] The application layer and the application framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.

[0099] The system library can include multiple functional modules. For example: media libraries, 3D graphics processing libraries (such as OpenGL ES), 2D graphics engines (such as SGL), surface managers, etc.

[0100] The media library supports the playback and recording of various common audio and video formats, as well as static image files, etc. The media library can support multiple audio and video coding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc. The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing, etc. The 2D graphics engine is a drawing engine for 2D drawing. The surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.

[0101] The kernel layer is the layer between hardware and software. The kernel layer at least includes a display driver, a camera driver, an audio driver, etc.

[0102] It can be understood that Figure 5 The layers in the shown structure and the components included in each layer do not constitute a specific limitation on the electronic device 100, that is, the folding screen device. In other embodiments of the present application, the structure may include more or fewer layers than shown, and each layer may include more or fewer components, which are not limited in the present application.

[0103] Based on the above-exemplarily introduced electronic device, an embodiment of the present application provides a method for displaying application icons. This method can be applied to the scenario where the electronic device displays dynamic icons (such as a calendar icon, a clock icon, etc.) after switching the display mode. Here, taking the electronic device as a mobile phone and the dynamic icon as a calendar icon as an example, the method of the embodiment of the present application will be described. Specifically, as Figure 6 shown, the method for displaying application icons may include S501 to S505.

[0104] S501, the mobile phone receives a mode switching instruction, where the mode switching instruction is used to switch the display mode of the mobile phone.

[0105] In this embodiment, the above mode switching instruction can be used to switch the display mode of the mobile phone from the light mode to the dark mode. In other embodiments, the mode switching instruction can also be used to switch the display mode of the mobile phone from the dark mode to the light mode, and the specific situation is not limited.

[0106] In one implementation, the above mode switching instruction can be triggered automatically by the mobile phone. Specifically, the mobile phone can obtain the current time. When the current time reaches the start switching time, it indicates that the current is the switching time to the dark mode, that is, the display mode of the mobile phone needs to be switched to the dark mode. Therefore, the mobile phone can trigger the mode switching instruction to switch the display mode of the mobile phone. Among them, the start switching time is the time when the mobile phone switches the display mode to the dark mode.

[0107] In another implementation, the above mode switching instruction can also be triggered after the mobile phone detects that the user clicks on the "dark mode" control. Specifically, in response to the user's click operation on the "dark mode" control, the mobile phone can directly trigger the mode switching instruction to switch the display mode of the mobile phone. Exemplarily, as Figure 3 The interface shown in (a) is the interface for displaying the sliding-down notification bar, and this sliding-down notification bar includes controls such as "WLAN" control, "Bluetooth" control, "Mobile Data" control, "Mute" control, and "Dark Mode" control, etc. After that, if the "Dark Mode" control in the sliding-down notification bar is clicked by the user, it means that the user wants to turn on the dark mode. Therefore, the mobile phone can directly switch the display mode of the mobile phone from the light mode to the dark mode, that is, the mobile phone can display the interface as shown in Figure 3 (b).

[0108] It can be understood that the above display mode of the mobile phone can include the dark mode and the light mode. Exemplarily, as Figure 7 The interface shown in (a) is the desktop displayed by the mobile phone when the display mode is the light mode. As Figure 7 The interface shown in (b) is the desktop displayed by the mobile phone when the display mode is the dark mode. It can be seen that the background color in the light mode is white and the text color is black. The background color in the dark mode is black and the text color is white.

[0109] In some embodiments, the above display mode of the mobile phone can be set by default on the mobile phone. For example, the mobile phone can set the display mode to the light mode by default.

[0110] In some other embodiments, the display mode of the above-mentioned mobile phone can be set by the user holding the mobile phone according to their own needs. For example, if the user is accustomed to using a dark color as the background color, then the user can set the display mode of the mobile phone to the dark mode. Another example is that if the user is accustomed to using a light color as the background color, then the user can set the display mode of the mobile phone to the light mode, that is, the user does not need to set the dark mode to be turned on.

[0111] Among them, the above-mentioned dark mode can be turned on all day or turned on at a scheduled time, and there is no specific limitation. That is to say, the user holding the mobile phone can set the turn-on time according to the actual situation. Exemplarily, as Figure 8 The interface shown in (a) is the setting interface for the dark mode. This (a) interface includes a scheduled turn-on setting item and a full-time turn-on setting item. That is to say, the user can select the corresponding setting item according to the actual situation to trigger the dark mode to turn on. For example, in response to the user's click operation on the scheduled turn-on setting item, the mobile phone can control the dark mode to turn on at a scheduled time. After that, the mobile phone can display the start time and end time of the dark mode, that is, display the interface shown in Figure 8 (b). Among them, the start time is the time when the mobile phone triggers the dark mode to turn on. For example, the start time can be 10:00 pm. The end time is the time when the dark mode ends, that is, the time when the mobile phone switches back to the light mode. For example, the end time can be 7:00 am the next day. It should be noted that the start time and the end time can be set by the mobile phone by default or set by the user according to their own needs, and there is no specific limitation.

[0112] It should be noted that the above Figure 8 The shown interface for setting the dark mode is only an example, and the user can also control the dark mode to turn on or off in other ways. For example, please continue to refer to the above Figure 3 , the mobile phone can display a "dark mode" control in the downward sliding notification bar so that the user can directly control the dark mode to turn on or off. That is to say, if the "dark mode" control is clicked by the user, the mobile phone can directly turn on or off the dark mode.

[0113] In some embodiments, after receiving the above-mentioned mode switching instruction, the mobile phone can delete all the currently cached dynamic icons. That is to say, the mobile phone needs to redraw the dynamic icons to update the cached data of the dynamic icons again. After that, the mobile phone detects whether the user triggers an interface switching operation. In this way, not only can the waste of storage resources be reduced and the utilization rate of the storage space be improved, but also the situation where the icon display is incorrect due to the mobile phone updating the icons according to the previously stored cached data can be reduced, the accuracy of the icon display can be improved, and thus the user's browsing experience can be improved.

[0114] S502. In response to a user's interface switching operation on the mobile phone, the mobile phone determines that the focus content of the display interface has changed and switches the display interface to the desktop.

[0115] Specifically, after the mobile phone receives the above-mentioned mode switching instruction, if it detects a user's interface switching operation (or desktop return operation) on the mobile phone, it indicates that the user wants to switch back to the desktop. Therefore, the mobile phone can switch the display interface from the current interface to the desktop and determine that the focus content of the display interface has changed. Here, the current interface can be any interface other than the desktop. Exemplarily, the current interface can be a lock screen interface or a usage interface of any application in the mobile phone, etc., and no specific limitation is made.

[0116] In one example, as Figure 9 shown, taking the above-mentioned interface switching operation as an unlocking operation as an example for illustration, Figure 9 the interface shown in (a) is the interface displayed when the mobile phone is in the locked state. Specifically, in response to a touch operation of the user's finger on the fingerprint collection area 901 in the (a) interface, if the fingerprint image of the user's finger matches the fingerprint image pre-stored in the mobile phone, the mobile phone can perform an unlocking operation, that is, the mobile phone can display Figure 9 the interface shown in (b). Among them, Figure 9 the interface shown in (b) is the desktop of the mobile phone. It can be understood that if the interface switching operation is an unlocking operation, that is, this interface switching operation is a touch operation on the fingerprint collection area 901, then the above-mentioned current interface can be the lock screen interface.

[0117] In another example, as Figure 10 shown, taking the above-mentioned interface switching operation as an application exit operation as an example for illustration, Figure 10 the interface shown in (a) is the interface of the news application, where the news content corresponding to News 1 to News 5 is displayed in the (a) interface. Specifically, in response to a swiping-up operation of the user on the bottom area in the (a) interface, the mobile phone can perform an exit operation of the news application, that is, the mobile phone can display Figure 10 the interface shown in (b). Among them, Figure 10 the interface shown in (b) is the desktop of the mobile phone. It can be understood that if the interface switching operation is an application exit operation, that is, this interface switching operation is a swiping-up operation on the bottom area of any application in the mobile phone, then the above-mentioned current interface can be the usage interface of any application in the mobile phone.

[0118] It should be noted that for a mobile phone with the function of not destroying layers, it is impossible to determine whether the display interface of the mobile phone has switched to the desktop through the onVisibilityChanged event. That is to say, as long as the desktop layer is stored in the mobile phone, when the mobile phone displays the desktop again, the originally stored layer will be called, that is, the layer visibility will not change. That is to say, even if the content displayed on the desktop needs to change, due to the function of not destroying layers in the mobile phone, the content displayed on the desktop will not change, which will lead to incorrect content displayed on the mobile phone and ultimately affect the user's viewing experience. Therefore, in order to avoid incorrect content displayed on the mobile phone, the mobile phone can set a callback function for onWindowFocusChanged. After that, the mobile phone can judge whether the focus content of the display interface has changed according to this onWindowFocusChanged callback function. Specifically, if onWindowFocusChanged is true, it means that the display interface of the mobile phone is entering or returning to the desktop. Therefore, the mobile phone can determine that the focus content of this display interface has changed. If onWindowFocusChanged is false, it means that the desktop has been exited to the background, that is, the display interface of the mobile phone does not display the desktop. Therefore, the mobile phone can determine that the focus content of this display interface has not changed.

[0119] S503, the mobile phone determines whether the above desktop includes dynamic icons.

[0120] Specifically, after the display interface switches to the desktop, the mobile phone can determine whether the desktop includes dynamic icons. If the desktop includes dynamic icons, it means that the dynamic icons may change. Therefore, in order to avoid incorrect display of dynamic icons, the mobile phone can execute S504 to update the display content on the dynamic icons. If the desktop does not include dynamic icons, it means that there will be no incorrect display of icons on the desktop. Therefore, the mobile phone only needs to adjust the relevant parameters of the desktop. That is to say, the mobile phone can directly execute S505.

[0121] Among them, the above dynamic icon is used to display prompt information, which includes time information and / or weather information. The time information may include at least one of date, week, hour, minute, and second. In this embodiment, the dynamic icon is a calendar icon, which can be changed according to time factors, and the date and / or week are displayed on the calendar icon. In other embodiments, the dynamic icon may be a clock icon, which can be changed in real time according to time factors, and the clock icon is used to represent at least one of hour, minute, and second. The dynamic icon may also be a weather icon, which can be changed according to weather changes, that is, the weather icon can represent the atmospheric conditions of the current weather.

[0122] S504, the mobile phone updates the dynamic icon.

[0123] Specifically, after determining that the above desktop includes a dynamic icon, the mobile phone can update the display content of the dynamic icon. Exemplarily, taking the dynamic icon as a calendar icon as an example, the display content of the dynamic icon may include the date and / or week, that is, the mobile phone can update the date and / or week displayed on the dynamic icon.

[0124] In some embodiments, the mobile phone can redraw the display content of the dynamic icon to display the redrawn dynamic icon. In this way, the situation of the dynamic icon displaying error information can be reduced, the accuracy of the dynamic icon display can be improved, and thus the user's interface browsing experience can be improved.

[0125] S505, the mobile phone performs parameter processing on the above desktop to obtain a target desktop.

[0126] Specifically, after determining that the above desktop does not include a dynamic icon, the mobile phone can adjust the color parameters of the desktop so that the color of the adjusted desktop (or called the target desktop) can adapt to the dark mode display style, thereby improving the user's visual experience. Among them, the color parameters may include at least one of brightness parameter, grayscale parameter, foreground adjustment parameter, and background adjustment parameter.

[0127] In some embodiments, the color parameters of the above desktop may be pre-set according to the actual situation. Specifically, after the mobile phone receives the mode switching instruction, it can directly perform parameter processing on the desktop according to the color parameters of the desktop to obtain a target desktop.

[0128] In some other embodiments, the color parameters of the above desktop can also be adjusted according to the user's own needs. For example, the user can preset the color parameters of the desktop. After that, after receiving the mode switching instruction, the mobile phone can directly process the parameters of the desktop according to the color parameters preset by the user to obtain the target desktop. For another example, the user can set the color parameters of the desktop in real time. Specifically, in response to the user's operation of turning on the "dark mode" control, the mobile phone can display the setting interface of the color parameters. After that, in response to the user's adjustment operation for any color parameter, the mobile phone processes the parameters of the desktop according to the adjusted parameters to obtain the target desktop.

[0129] In still some other embodiments, the color parameters of the above desktop can also be obtained by learning according to the user's habits for color parameters. Specifically, the mobile phone can obtain the color parameters adjusted by the user before. After that, the mobile phone can count the color parameters adjusted by the user before to obtain the target color parameters. After that, after receiving the mode switching instruction, the mobile phone can directly process the parameters of the desktop according to the target color parameters to obtain the target desktop.

[0130] In one implementation manner, when the current time reaches the above start switching time, that is, in response to the mode switching instruction, the desktop in the mobile phone can configure and change the displayed content to delete all cache data of dynamic icons, providing a basis for subsequent updating of dynamic icons. The following will be combined with the above Figure 5 shown structure and Figure 11 the cache data clearing process shown to introduce in detail the process of how the desktop in the mobile phone clears the cache data.

[0131] S1101. When the current time reaches the start switching time, the mode switching module in the mobile phone triggers the mode switching instruction.

[0132] Among them, the above mode switching instruction is used to switch the display mode of the mobile phone from the light mode to the dark mode.

[0133] In some embodiments, the mobile phone can obtain the current time in real time. When the current time reaches the start switching time, it means that the mobile phone needs to perform a display mode switch. Therefore, the mode switching module in the mobile phone can trigger the mode switching instruction to switch the display mode of the mobile phone from the light mode to the dark mode. Among them, the start switching time is the time when the mobile phone switches the display mode to the dark mode.

[0134] S1102. The mode switching module sends a configuration change instruction to the desktop.

[0135] Specifically, after triggering the mode switching instruction, the mode switching module can send a configuration change indication (doConfigChange) to the desktop to instruct the desktop to handle the configuration change event.

[0136] S1103. When the desktop receives the configuration change indication sent by the mode switching module, it processes the first configuration change event. Among them, the first configuration change event is an event indicating that the configuration has changed.

[0137] Specifically, after receiving the above configuration change indication, the desktop in the mobile phone can process the first configuration change event. Among them, the first configuration change event is an event of "configuration changed", which is used to make the desktop adapt to different configuration changes to avoid the situation where the layer is destroyed and redrawn due to the change of the desktop configuration, thereby improving the user experience.

[0138] S1104. The desktop processes the second configuration change event. Among them, the second configuration change event is a post handle configuration change event.

[0139] Specifically, after receiving the above configuration change indication, the desktop in the mobile phone can also process the second configuration change event. Among them, the second configuration change event is a "post handle config change" event.

[0140] It should be noted that the execution order of the above steps S1103 and S1104 is not limited. That is to say, steps S1103 and S1104 can be executed simultaneously or in a preset order, which is not specifically limited. Exemplarily, the preset order can be that the desktop first executes step S1103 and then executes step S1104, or the desktop first executes step S1104 and then executes step S1103.

[0141] S1105. The desktop sends a data clearing indication to the icon management module.

[0142] Specifically, after the configuration change event is processed, the desktop can send a data clearing indication to the icon management module. Among them, the data clearing indication (clear all dynamic icon) is used to instruct the dynamic icon updater to clear the cached data corresponding to the dynamic icons displayed on the desktop.

[0143] S1106. When the icon management module receives the above data clearing indication, it sends the data clearing indication to the dynamic icon updater.

[0144] In some embodiments, after receiving the data clearing instruction sent from the desktop, the icon management module may send the data clearing instruction to the dynamic icon updater to instruct the dynamic icon updater to perform a clearing operation on the cached data corresponding to the dynamic icons displayed on the desktop.

[0145] S1107. When the dynamic icon updater receives the above data clearing instruction, it clears all the cached data corresponding to the dynamic icons displayed on the desktop.

[0146] In some embodiments, after receiving the data clearing instruction sent from the icon management module, the dynamic icon updater may perform the clearing operation of the cached data. That is to say, the dynamic icon updater may clear all the cached data in the dynamic icon set. Specifically, the dynamic icon updater may use the mDynamicIconList.clear() function to clear all the cached data in the dynamic icon set.

[0147] Specifically, the dynamic icon updater may obtain the dynamic icons displayed on the desktop. Then, for each dynamic icon, the dynamic icon updater obtains all the cached data corresponding to the dynamic icon. Then, the dynamic icon updater may delete all the cached data corresponding to the dynamic icons displayed on the desktop, so as to facilitate the re-update of the display content of the dynamic icons and provide a basis for the subsequent accurate update of the dynamic icons.

[0148] In one implementation, after the dynamic icon updater clears all the cached data of the dynamic icons, if the display mode of the mobile phone is the dark mode, that is, the display mode of the mobile phone has switched, in response to the user's return operation on the desktop of the mobile phone, the view of the mobile phone desktop may trigger a callback for configuration change to update the dynamic icons. The following will be combined with the Figure 5 structure shown above and Figure 12 the dynamic icon update process shown above to introduce in detail the process of how the desktop in the mobile phone updates the dynamic icons.

[0149] S1201. When the display mode of the mobile phone is the dark mode, in response to the user's return operation on the desktop of the mobile phone, the view group of the mobile phone desktop triggers a configuration change instruction.

[0150] Specifically, after the mode switching instruction is executed, that is, after the display mode of the mobile phone has been switched to the dark mode, in response to the user's return operation on the desktop of the mobile phone, the view group of the mobile phone desktop may trigger a configuration change instruction. Among them, the configuration change instruction is to send a configuration change instruction downward (dispatch configurationchanged), which is used to send a notification about resource configuration change downward in the view hierarchy, that is, to send a notification about resource configuration change to the view.

[0151] Among them, the above-mentioned desktop return operation refers to the operation of switching the display interface of the mobile phone to the desktop. Exemplarily, the desktop return operation can be an unlocking operation for the lock screen interface, or an exit operation for the usage interface of any application in the mobile phone, etc., and no specific limitation is made.

[0152] S1202. The view group of the mobile phone desktop sends a configuration change instruction to the view.

[0153] Specifically, after triggering the configuration change instruction, the view group can send a configuration change instruction to the view to instruct the view to perform a configuration change operation.

[0154] S1203. When the view receives the configuration change instruction sent by the view group, it performs a configuration change operation.

[0155] S1204. The view triggers a callback event for the configuration change.

[0156] In some embodiments, after the view of the mobile phone desktop performs a configuration change operation, it can trigger a callback event for the configuration change. Among them, the callback event for the configuration change is the onConfigurationChanged event, which is used to be called when the current configuration information of the usage resources of the dynamic icon changes. That is to say, if the configuration information of the view (or the configuration information of the display interface) changes, then the view will automatically trigger the callback event for the configuration change, that is, the view can directly call the onConfigurationChanged() method.

[0157] S1205. The view sends the above callback event to the view class of the dynamic icon.

[0158] Specifically, after triggering the callback event for the above configuration change, the view can send the callback event for the configuration change to the view class of the dynamic icon, so as to check whether the configuration information corresponding to the dynamic icon has changed.

[0159] S1206. When the view class of the dynamic icon receives the callback event sent by the view, it executes the callback event.

[0160] S1207. The view class of the dynamic icon checks whether there is a dynamic icon on the desktop.

[0161] Specifically, after executing the callback event for the above configuration change, the view class of the dynamic icon can check whether there is a dynamic icon on the desktop. If there is a dynamic icon on the desktop, it means that the dynamic icon updater needs to update the dynamic icon. Therefore, the view class of the dynamic icon can execute S1208. If there is no dynamic icon on the desktop, it means that the dynamic icon updater does not need to update the dynamic icon. Therefore, to avoid wasting resources, the view class of the dynamic icon can not execute S1208. In this way, the utilization rate of the mobile phone resources can be improved.

[0162] In some embodiments, the process of the view class of the above dynamic icon checking whether there is a dynamic icon on the desktop can be implemented by check exist in updater.

[0163] S1208: When there is a dynamic icon on the desktop, the view class of the dynamic icon sends an indication to update the cached data to the dynamic icon updater.

[0164] Specifically, after detecting that there is a dynamic icon on the desktop, the view class of the dynamic icon can send an indication to update the cached data (put dynamic icon) to the dynamic icon updater to instruct the dynamic icon updater to update the cached data of the dynamic icon in the dynamic icon set.

[0165] S1209: When the dynamic icon updater receives the indication to update the cached data sent by the view class of the above dynamic icon, it updates the cached data of the dynamic icon to the dynamic icon set.

[0166] In some embodiments, after receiving the above indication to update the cached data, the dynamic icon updater can update the cached data of the dynamic icon to the dynamic icon set. Specifically, the dynamic icon updater can update the dynamic icon set through the mDynamicIconList.put(key, value) function. Here, key is the key name, which is used to call the target object (value).

[0167] In another implementation, considering that if the mobile phone has not been used after switching to the dark mode, that is, the mobile phone is only used after switching back to the light mode, then after the mobile phone switches back to the light mode, the mobile phone will default that the configuration information of the above view has not changed, that is, the mobile phone will not update the cached data of the above dynamic icons to the dynamic icon set, which will cause the display content of the dynamic icons to not be updated in time, resulting in the display content of the dynamic icons being incorrect content and affecting the user experience. Therefore, in order to improve the accuracy of the dynamic icon display, after the dynamic icon updater clears all the cached data of the dynamic icons, in response to the user's desktop return operation on the mobile phone, the view class of the dynamic icons can trigger a callback for visibility change to update the dynamic icons. The following will be combined with the Figure 5 structure shown above and Figure 13 the dynamic icon update process shown above to introduce in detail how the desktop in the mobile phone updates the dynamic icons.

[0168] S1301. In response to the user's desktop return operation on the mobile phone, the view group on the mobile phone desktop triggers a visibility change instruction.

[0169] Specifically, after detecting the user's desktop return operation on the mobile phone, the view group on the mobile phone desktop can trigger a visibility change instruction. Among them, this visibility change instruction is dispatch visibilitychanged, which is used to schedule the view visibility change of the view hierarchy.

[0170] Among them, the above desktop return operation refers to the operation of switching the display interface of the mobile phone to the desktop. Exemplarily, this desktop return operation can be an unlocking operation for the lock screen interface, or an exit operation for the usage interface of any application in the mobile phone, etc., without specific limitation.

[0171] S1302. The view group sends a visibility change indication to the view on the mobile phone desktop.

[0172] Specifically, after triggering the above visibility change instruction, the view group can send a visibility change indication to the view on the mobile phone desktop to instruct the view to perform a visibility change operation.

[0173] S1303. When the view receives the visibility change indication sent by the view group, it performs a visibility change operation.

[0174] S1304. When the visibility of the dynamic icon is visible, the view triggers a callback event for visibility change.

[0175] Specifically, after the view performs the above visibility change operation, it can detect whether there are dynamic icons on the desktop, that is, detect whether the dynamic icons are visible. It can be understood that if there are dynamic icons on the desktop, it means that the display interface of the mobile phone shows dynamic icons. Therefore, the view of the mobile phone desktop can determine that the dynamic icons are visible, that is, the visibility of the dynamic icons is visible.

[0176] In some embodiments, after detecting that the visibility of the above dynamic icons is visible, the view of the mobile phone desktop can trigger a callback event for the visibility change. Among them, the callback event for the visibility change is the onVisibilityChanged event, which is used to handle the visibility change of a single view itself. That is to say, if the visibility of a view on the desktop changes, the mobile phone can directly call the onVisibilityChanged() method corresponding to the view. It can be understood that the desktop of the mobile phone can include multiple views.

[0177] S1305. The view sends the above callback event to the view class of the dynamic icon.

[0178] Specifically, after the view triggers the above callback event for the visibility change, it can send the callback event for the visibility change to the view class of the dynamic icon, so as to check whether the visibility of the dynamic icon has changed.

[0179] S1306. When the view class of the dynamic icon receives the callback event sent by the view, it executes the callback event.

[0180] S1307. The view class of the dynamic icon checks whether there are dynamic icons on the desktop.

[0181] Specifically, after executing the above callback event for the visibility change, the view class of the dynamic icon can check whether there are dynamic icons on the desktop. If there are dynamic icons on the desktop, it means that the dynamic icon updater needs to update the dynamic icon. Therefore, the view class of the dynamic icon can execute S1308. If there are no dynamic icons on the desktop, it means that the dynamic icon updater does not need to update the dynamic icon. Therefore, in order to avoid wasting resources, the view class of the dynamic icon can not execute S1308. In this way, the utilization rate of the mobile phone resources can be improved.

[0182] In some embodiments, the process by which the view class of the above dynamic icon checks whether there are dynamic icons on the desktop can be implemented through check exist in updater.

[0183] S1308. When there are dynamic icons on the desktop, the view class of the dynamic icon sends an indication to update the cache data to the dynamic icon updater.

[0184] Specifically, after detecting a dynamic icon on the desktop, the view class of the dynamic icon can send a cache data update instruction (put dynamic icon) to the dynamic icon updater to instruct the dynamic icon updater to update the cache data of the dynamic icon in the dynamic icon set.

[0185] S1309. When the dynamic icon updater receives the cache data update instruction sent by the view class of the above dynamic icon, it updates the cache data of the dynamic icon to the dynamic icon set.

[0186] In some embodiments, after receiving the above cache data update instruction, the dynamic icon updater can update the cache data of the dynamic icon to the dynamic icon set. Specifically, the dynamic icon updater can update the dynamic icon set through the mDynamicIconList.put(key, value) function. Among them, key is the key name, which is used to call the target object (value).

[0187] It should be noted that the above Figure 12 shown dynamic icon update process and the above Figure 13 shown dynamic icon update process are both schematic diagrams of the process in the dynamic icon update process. That is to say, as long as the configuration information of the display interface changes, or the visibility of the dynamic icon changes, the cache data of the dynamic icon can be updated to the dynamic icon set, providing a basis for subsequent updating the display content of the dynamic icon.

[0188] However, in some embodiments, through the dynamic icon update process shown in Figure 13 , when updating the dynamic icon displayed on the mobile phone desktop, although the mode switching operation can be performed according to the mode switching instruction received by the mobile phone to update the dynamic icon when the visibility of the dynamic icon changes. But if the mobile phone is a mobile phone with a layer non-destruction function, then even if the display interface does not display the desktop, the mobile phone will not destroy the desktop layer either. That is to say, the mobile phone will always store the desktop layer. When the mobile phone displays the desktop again, the mobile phone can call the previously stored desktop layer, that is, the dynamic icon on the desktop is always visible. Therefore, even if the display content on the desktop needs to change, due to the layer non-destruction function of the mobile phone, the display content on the desktop of this mobile phone will not change, which will lead to the display content on the mobile phone desktop being incorrect content, ultimately affecting the user experience.

[0189] Therefore, in order to reduce the probability that the display content on the mobile phone desktop is incorrect content, the mobile phone can execute a corresponding dynamic icon update process according to the display position of the dynamic icon, that is, according to the display position of the dynamic icon on the desktop. Among them, the display position can include at least one of the desktop, a large folder (or called the first folder), and a small folder (or called the second folder). The large folder refers to a folder in which the applications in the folder can be opened without expanding the folder. That is to say, if the application icon is placed in the large folder, in response to the user's click operation on any application icon, the mobile phone can directly enter the initial interface of the application of the clicked icon. The small folder refers to a folder in which the applications in the folder need to be expanded to be opened. That is to say, if the application icon is placed in the small folder, in response to the user's click operation on the small folder, the mobile phone expands the icon content in the small folder. Among them, the icon content can include the application icon and the application name corresponding to the application icon. After that, in response to the user's click operation on any application icon in the small folder, the mobile phone can enter the initial interface of the application of the clicked icon.

[0190] Exemplarily, the above dynamic icon is taken as a calendar icon for example. As Figure 14 The interface shown in (a) is the interface displayed by the mobile phone when the calendar icon is placed on the desktop. That is to say, the display position of the calendar icon is area A on the desktop. As Figure 14 The interface shown in (b) is the interface displayed by the mobile phone when the calendar icon is placed at a non-stack position in the large folder on the desktop. Among them, the non-stack position is any position except the last position in the large folder. For example, the display position of the calendar icon can be area B in the large folder 14A on the desktop. As Figure 14 The interface shown in (c) is the interface displayed by the mobile phone when the calendar icon is placed at the stack position in the large folder on the desktop. Among them, the stack position is the last position in the large folder. That is to say, the display position of the calendar icon is area C in the large folder 14A on the desktop. As Figure 14 The interface shown in (d) is the interface displayed by the mobile phone when the calendar icon is placed in the small folder on the desktop. For example, the display position of the calendar icon can be area D in the small folder 14B on the desktop.

[0191] In one implementation, for the scenario of switching back to the light mode again, that is, the scenario of switching from the light mode to the dark mode and then switching back to the light mode, and the mobile phone is a device with the function of not destroying the layer, if through the above Figure 12 and / or Figure 13 shown dynamic icon update process, the cached data of the dynamic icon cannot be updated to the dynamic icon set, and thus the timely update of the dynamic icon cannot be achieved. Therefore, in order to improve the accuracy of the dynamic icon display, the following will be combined with the aboveFigure 5 The structure shown and Figure 15 the dynamic icon update process shown, and a detailed introduction is provided for the placement of dynamic icons on the desktop or non-stacked positions, that is, for the display positions of the calendar icons in the (a) interface and (b) interface shown above Figure 14 and how the desktop in the mobile phone updates the dynamic icons.

[0192] S1501. In response to the user's operation of returning to the desktop of the mobile phone, if the mobile phone belongs to the target device, the view class of the dynamic icon in the mobile phone desktop can set a callback event for window focus change.

[0193] In some embodiments, after detecting the user's operation of returning to the desktop of the mobile phone, the view class of the dynamic icon in the mobile phone desktop can first determine whether the mobile phone belongs to the target device. If the mobile phone belongs to the target device, it means that the mobile phone has the function of not destroying the layer. Therefore, in order to update the dynamic icons on the desktop in a timely manner, the view class of the dynamic icon can set a callback event for window focus change. If the mobile phone does not belong to the target device, it means that the mobile phone does not have the function of not destroying the layer. Therefore, the mobile phone can continue to execute the dynamic icon update process of S1301 - S1309 above. Among them, the target device is an electronic device set with the function of not destroying the layer.

[0194] Specifically, if the mobile phone is an electronic device set with the function of not destroying the layer, then the configuration item of the mobile phone will be set to true to indicate that the mobile phone has the function of not destroying the layer. If the mobile phone is not an electronic device set with the function of not destroying the layer, then the configuration item of the mobile phone will be set to false to indicate that the mobile phone does not have the function of not destroying the layer. It can be understood that the configuration item of the mobile phone is set in advance, and the view class of the dynamic icon can determine whether the mobile phone belongs to the target device by obtaining the setting item to which the mobile phone belongs.

[0195] Among them, the above callback event for window focus change is the onWindowFocusChanged event, which is used to determine whether the active window (or the current window) has changed. The active window refers to the window that is currently interacting with the user, that is, the interface currently displayed on the mobile phone. That is to say, if the active window changes, that is, it is detected that the user has switched the current interface, the mobile phone can directly trigger the onWindowFocusChanged event.

[0196] It can be understood that if onWindowFocusChanged is true, it indicates that the display interface of the mobile phone is entering or returning to the desktop. Therefore, the mobile phone can determine that the focus content of the display interface has changed. If onWindowFocusChanged is false, it means that the desktop has been exited to the background, that is, the display interface of the mobile phone does not display the desktop. Therefore, the mobile phone can determine that the focus content of the display interface has not changed.

[0197] S1502. When the focus content of the display interface changes, the view class of the dynamic icon checks whether there is a dynamic icon on the desktop.

[0198] In some embodiments, after the callback event setting of the above window focus change is completed, the view class of the dynamic icon can determine whether the focus content of the display interface has changed. If the focus content of the display interface has changed, that is, the current window has obtained the focus, it indicates that the user has triggered an interface switching operation, that is, the display interface of the mobile phone has switched to the desktop. Therefore, the view class of the dynamic icon can further check whether there is a dynamic icon on the desktop to determine whether the dynamic icon needs to be updated. If the focus content of the display interface has not changed, that is, the current window has not obtained the focus, it indicates that the user has not triggered an interface switching operation, that is, the display interface of the mobile phone has not switched to the desktop. Therefore, the view class of the dynamic icon does not need to further check whether there is a dynamic icon on the desktop to reduce unnecessary resource waste.

[0199] Specifically, after determining that the focus content of the display interface has changed, the view class of the dynamic icon can check whether there is a dynamic icon on the desktop. If there is a dynamic icon on the desktop, it means that the dynamic icon updater needs to update the dynamic icon. Therefore, the view class of the dynamic icon can execute S1503. If there is no dynamic icon on the desktop, it means that the dynamic icon updater does not need to update the dynamic icon. Therefore, to avoid resource waste, the view class of the dynamic icon can not execute S1503, so that the utilization rate of mobile phone resources can be improved.

[0200] In some embodiments, the process by which the view class of the above dynamic icon checks whether there is a dynamic icon on the desktop can be implemented through check exist in updater.

[0201] S1503. When there is a dynamic icon on the desktop, the view class of the dynamic icon sends a cache data update instruction to the dynamic icon updater.

[0202] Specifically, after detecting a dynamic icon on the desktop, the view class of the dynamic icon can send a cache data update instruction (put dynamic icon) to the dynamic icon updater to instruct the dynamic icon updater to update the cache data of the dynamic icon in the dynamic icon set.

[0203] S1504. When the dynamic icon updater receives the cache data update instruction sent by the view class of the above dynamic icon, it updates the cache data of the dynamic icon to the dynamic icon set.

[0204] In some embodiments, after receiving the above cache data update instruction, the dynamic icon updater can update the cache data of the dynamic icon to the dynamic icon set. Specifically, the dynamic icon updater can update the dynamic icon set through the mDynamicIconList.put(key, value) function. Among them, key is the key name, which is used to call the target object (value).

[0205] S1505. The dynamic icon updater updates the dynamic icon according to the cache data of the above dynamic icon.

[0206] In some embodiments, after updating the cache data of the above dynamic icon to the dynamic icon set, the dynamic icon updater can update the display content of the dynamic icon according to the cache data of the dynamic icon, so that the display content of the dynamic icon is the correct content, improving the accuracy of the dynamic icon display, and further improving the user's browsing experience.

[0207] Next, in combination with the above Figure 5 shown structure and Figure 16 the dynamic icon update process shown, it will be introduced in detail how the desktop in the mobile phone updates the dynamic icon for the dynamic icon placed at the stacked position of the large folder, that is, for the display position of the calendar icon in the (c) interface shown above. Figure 14 shown (c) interface, the process of how the desktop in the mobile phone updates the dynamic icon.

[0208] S1601. In response to the user's return operation on the mobile phone desktop, if the dynamic icon in the large folder is visible, the view class of the dynamic icon in the mobile phone desktop sets a callback event for the window focus change.

[0209] In some embodiments, the view class of the dynamic icon on the mobile phone desktop can determine whether to set the callback event for window focus change by judging whether the dynamic icon in the large folder is visible. If the dynamic icon in the large folder is visible, it indicates that the user has triggered the desktop return operation, that is, the dynamic icons displayed on the desktop need to be updated. Therefore, the view class of the dynamic icon on the mobile phone desktop can set the callback event for window focus change to further determine whether the dynamic icons in the large folder need to be updated. Among them, the callback event for window focus change is the onWindowFocusChanged event. If the dynamic icon in the large folder is not visible, it indicates that the user has not triggered the desktop return operation, that is, the desktop is still in the background. Therefore, in order to reduce unnecessary resource waste, the view class of the dynamic icon on the mobile phone desktop can not set the callback event for window focus change to improve the utilization rate of mobile phone resources.

[0210] It should be noted that the process by which the view class of the above dynamic icon determines whether the dynamic icon in the large folder is visible can be achieved by judging whether the dynamic icon is located at the final position in the large folder (that is, the ninth stacking position). It can be understood that only the first preset number (such as 9) of application icons can be displayed in the large folder. That is to say, even if the dynamic icon is placed in the large folder, but the dynamic icon is not placed at the display position within the first preset number, that is, the dynamic icon is not placed at the first 9 display positions in the large folder, then the view class of the dynamic icon on the mobile phone desktop can determine that the dynamic icon in the large folder is not visible.

[0211] S1602. The view class of the dynamic icon checks whether there is a dynamic icon on the desktop.

[0212] In some embodiments, after the above callback event for window focus change is set, the view class of the dynamic icon can check whether there is a dynamic icon on the desktop. If there is a dynamic icon on the desktop, it indicates that the dynamic icon updater needs to update the dynamic icon. Therefore, the view class of the dynamic icon can execute S1603. If there is no dynamic icon on the desktop, it indicates that the dynamic icon updater does not need to update the dynamic icon. Therefore, in order to avoid resource waste, the view class of the dynamic icon can not execute S1603. In this way, the utilization rate of mobile phone resources can be improved.

[0213] In some embodiments, the process by which the view class of the above dynamic icon checks whether there is a dynamic icon on the desktop can be implemented through check exist in updater.

[0214] S1603. When there is a dynamic icon on the desktop, the view class of the dynamic icon sends an indication to update the cache data to the dynamic icon updater.

[0215] Specifically, after detecting that there are dynamic icons on the desktop, the view class of the dynamic icon can send a cache data update instruction (put dynamic icon) to the dynamic icon updater to instruct the dynamic icon updater to update the cache data of the dynamic icon in the dynamic icon set.

[0216] S1604. When the dynamic icon updater receives the cache data update instruction sent by the view class of the above dynamic icon, it updates the cache data of the dynamic icon to the dynamic icon set.

[0217] In some embodiments, after receiving the above cache data update instruction, the dynamic icon updater can update the cache data of the dynamic icon to the dynamic icon set. Specifically, the dynamic icon updater can update the dynamic icon set through the mDynamicIconList.put(key, value) function. Among them, key is the key name, which is used to call the target object (value).

[0218] S1605. The dynamic icon updater updates the dynamic icon at the final position in the large folder according to the cache data of the above dynamic icon.

[0219] In some embodiments, after updating the cache data of the above dynamic icon to the dynamic icon set, the dynamic icon updater can update the display content of the dynamic icon at the final position in the large folder according to the cache data of the dynamic icon, so that the display content of the dynamic icon is the correct content, improving the accuracy of the dynamic icon display, and further improving the user's browsing experience.

[0220] The following will combine the above Figure 5 shown structure and Figure 17 the dynamic icon update process shown, and will introduce in detail how the desktop in the mobile phone updates the dynamic icon for the dynamic icon placed in the small folder, that is, for the display position of the calendar icon in the (d) interface shown above. Figure 14 shown (d) interface in the calendar icon display position, the mobile phone desktop how to update the dynamic icon process.

[0221] S1701. In response to the user's return operation on the mobile phone desktop, if it is detected that the user expands the small folder, the view class of the dynamic icon on the mobile phone desktop magnifies and displays the dynamic icon in the small folder.

[0222] Specifically, after detecting that the user performs a desktop return operation on the mobile phone, if it is detected that the user performs an expansion operation on the small folder, it indicates that the user wants to browse the small folder. Therefore, the view class of the dynamic icons on the mobile phone desktop can magnify and display the dynamic icons in the small folder to facilitate the user to browse the application icons in the small folder. Among them, the application icons can include dynamic icons and / or static icons.

[0223] S1702. When the dynamic icons in the above small folder are visible, set the callback event for the change of the window focus of the view class of the dynamic icons on the mobile phone desktop.

[0224] It can be understood that when the application icons displayed in the above small folder include dynamic icons, the view class of the dynamic icons on the mobile phone desktop can determine that the dynamic icons in the small folder are visible. Therefore, the view class of the dynamic icons can set the callback event for the change of the window focus. That is to say, the view class of the dynamic icons on the mobile phone desktop can determine whether to set the callback event for the change of the window focus by judging whether the dynamic icons in the small folder are visible.

[0225] In some embodiments, if the dynamic icons in the small folder are visible, it indicates that the user has triggered the desktop return operation, that is, the dynamic icons displayed on the desktop need to be updated. Therefore, the view class of the dynamic icons on the mobile phone desktop can set the callback event for the change of the window focus to further determine whether to update the dynamic icons in the small folder. Among them, the callback event for the change of the window focus is the onWindowFocusChanged event. If the dynamic icons in the small folder are not visible, it indicates that the user has not triggered the desktop return operation, that is, the desktop is still in the background. Therefore, in order to reduce unnecessary resource waste, the view class of the dynamic icons on the mobile phone desktop can not set the callback event for the change of the window focus to improve the utilization rate of mobile phone resources.

[0226] S1703. The view class of the dynamic icons checks whether there are dynamic icons on the desktop.

[0227] In some embodiments, after the callback event for the change of the window focus is set as described above, the view class of the dynamic icons can check whether there are dynamic icons on the desktop. If there are dynamic icons on the desktop, it indicates that the dynamic icon updater needs to update the dynamic icons. Therefore, the view class of the dynamic icons can execute S1704. If there are no dynamic icons on the desktop, it indicates that the dynamic icon updater does not need to update the dynamic icons. Therefore, in order to avoid resource waste, the view class of the dynamic icons can not execute S1704. In this way, the utilization rate of mobile phone resources can be improved.

[0228] In some embodiments, the process by which the view class of the above dynamic icon checks whether there is a dynamic icon on the desktop can be implemented through "check exist in updater".

[0229] S1704. When there is a dynamic icon on the desktop, the view class of the dynamic icon sends a cache data update instruction to the dynamic icon updater.

[0230] Specifically, after detecting that there is a dynamic icon on the desktop, the view class of the dynamic icon can send a cache data update instruction (put dynamic icon) to the dynamic icon updater to instruct the dynamic icon updater to update the cache data of the dynamic icon in the dynamic icon set.

[0231] S1705. When the dynamic icon updater receives the cache data update instruction sent by the view class of the above dynamic icon, it updates the cache data of the dynamic icon to the dynamic icon set.

[0232] In some embodiments, after receiving the above cache data update instruction, the dynamic icon updater can update the cache data of the dynamic icon to the dynamic icon set. Specifically, the dynamic icon updater can update the dynamic icon set through the function "mDynamicIconList.put(key, value)". Among them, key is the key name, which is used to call the target object (value).

[0233] S1706. The dynamic icon updater updates the dynamic icons in the small folder according to the cache data of the above dynamic icon.

[0234] In some embodiments, after updating the cache data of the above dynamic icon to the dynamic icon set, the dynamic icon updater can update the display content of the dynamic icon in the small folder according to the cache data of the dynamic icon, so that the display content of the dynamic icon is the correct content, improving the accuracy of the dynamic icon display, and thus improving the user's browsing experience.

[0235] In one implementation, during the process of updating the display content of the above dynamic icon, the mobile phone desktop needs to send an icon update instruction to the dynamic icon updater to implement the update operation of the dynamic icon. And considering that the dynamic icons displayed on the desktop do not need to be updated in real time. For example, the calendar icon only needs to be updated at zero o'clock the next day, or when the user uses the mobile phone the next day. Here, the calendar icon is used as an example for the dynamic icon, and combined with the above Figure 5 shown structure and Figure 18 the dynamic icon update process shown, the process of how the desktop in the mobile phone updates the dynamic icon is introduced in detail.

[0236] S1801. When the display interface of the mobile phone is the desktop, the desktop of the mobile phone invokes a startup event.

[0237] Specifically, after the mobile phone displays the desktop, that is, after the desktop of the mobile phone is visible, the desktop can invoke the startup event (onStart). Among them, this startup event is a method that the mobile phone will invoke when the display interface (that is, the desktop) enters the foreground from the background, and it is used to represent that the display interface is in a visible state.

[0238] S1802. The desktop sends an icon update instruction to the dynamic icon updater.

[0239] Specifically, after invoking the above startup event, the desktop can send an icon update instruction to the dynamic icon updater to instruct the dynamic icon updater to update the display content of the dynamic icon, so that the display content on the updated dynamic icon is the correct content.

[0240] In some embodiments, the desktop can send the callUpdateIcon() method to the dynamic icon updater to notify the dynamic icon updater to update the dynamic icons on the desktop.

[0241] S1803. When the dynamic icon updater receives the icon update instruction sent by the desktop, it invokes an icon update event and sends an icon update message to the target object.

[0242] Specifically, after the dynamic icon updater receives the icon update instruction sent by the mobile phone desktop, it can invoke the icon update event. Exemplarily, the dynamic icon updater can implement the invocation of the icon update event through the updateIcon() method.

[0243] In some embodiments, the dynamic icon updater can send an icon update message to the target object (handler) through the updateIcon() method. Exemplarily, the dynamic icon updater can send this icon update message to the mDynamicUpdateRunnable child thread. Among them, the process of the dynamic icon updater sending the icon update message can be implemented through mDynamicUpdateHandler.sendEmptyMessage(DYNAMIC_UPDATE).

[0244] S1804. The dynamic icon updater updates the calendar icon in the target object.

[0245] In some embodiments, when the target object receives the above icon update message, the dynamic icon updater can update the display content of the dynamic icon in the target object. Specifically, the dynamic icon updater can update the display content of the dynamic icon in mDynamicUpdateHandler. Exemplarily, the process of the dynamic icon updater updating the dynamic icon can be implemented through updateDynamicIconBitmap().

[0246] In one implementation, the dynamic icon updater can determine whether the above dynamic icon set (mDynamicIconList) is empty. If the dynamic icon set is not empty, it indicates that there are dynamic icons on the desktop. Therefore, the dynamic icon updater can determine whether there is an application package name corresponding to the target application package name stored in the dynamic icon set. If there is an application package name corresponding to the target application package name stored in the dynamic icon set, the dynamic icon updater can update the display content of the dynamic icon. The target application package name is the application package name corresponding to the dynamic icon displayed on the mobile phone desktop when the display interface obtained by the getIntent() method is switched to the desktop.

[0247] Specifically, the dynamic icon updater can update the display content of the dynamic icon by executing icon.update(mBitmap).

[0248] In some embodiments, if the above dynamic icon set is empty, it indicates that there are no dynamic icons on the mobile phone desktop. Therefore, the dynamic icon updater does not need to update the dynamic icon to improve the utilization rate of mobile phone resources.

[0249] S1805. During the process of the dynamic icon updater of the mobile phone updating the calendar icon, it sends a calendar time update indication to the calendar-related tool class.

[0250] Specifically, during the process of the dynamic icon updater updating the dynamic icon, it can send a calendar time update indication (isUpdateCurrentCalenderDate) to the calendar-related tool class to instruct the calendar-related tool class to obtain the display date on the calendar icon and the system date, and determine whether the display date on the calendar icon is the same as the system date, providing a basis for the subsequent dynamic icon updater to determine whether it is necessary to update the dynamic icon.

[0251] S1806. When the calendar-related tool class receives the above calendar time update indication, it obtains the display date on the calendar icon and the system date.

[0252] Specifically, after receiving the calendar time update indication sent by the dynamic icon updater, the calendar-related tool class can obtain the display date on the calendar icon and the system date. In some embodiments, the calendar-related tool class can obtain the display date on the calendar icon and the system date through the getCurrentCalenderDate() method.

[0253] S1807. The calendar-related tool class determines whether the display date on the calendar icon is the same as the system date.

[0254] In some embodiments, after obtaining the display date on the calendar icon and the system date, the calendar-related tool class can determine whether the display date on the calendar icon is the same as the system date. If the display date on the calendar icon is the same as the system date, it means that the current date has not changed, that is, the dynamic icon updater does not need to update the display date on the calendar icon. Therefore, the calendar-related tool class can execute S1808 to reduce unnecessary power consumption losses and improve the utilization rate of mobile phone resources. If the display date on the calendar icon is different from the system date, it means that the current date has changed, that is, the dynamic icon updater needs to update the display date on the calendar icon. Therefore, in order to avoid the situation where the calendar icon displays the wrong date, the calendar-related tool class can execute S1809 to improve the accuracy of the calendar icon display.

[0255] S1808. When the display date on the calendar icon is the same as the system date, the calendar-related tool class sends a first update indication to the dynamic icon updater.

[0256] Specifically, after determining that the display date on the calendar icon is the same as the system date, the calendar-related tool class can send a first update indication to the dynamic icon updater to instruct the dynamic icon updater not to update the display date on the calendar icon.

[0257] In some embodiments, the calendar-related tool class can return a detection result of false to the dynamic icon updater to instruct the dynamic icon updater not to update the display date on the calendar icon.

[0258] S1809. When the dynamic icon updater receives the above first update indication, it does not update the display date on the calendar icon.

[0259] S1810. When the display date on the calendar icon is different from the system date, the calendar-related tool class sends a second update indication to the dynamic icon updater.

[0260] Specifically, after determining that the display date on the above calendar icon is the same as the system date, the calendar-related tool class can send a second update instruction to the dynamic icon updater to instruct the dynamic icon updater to update the display date on the calendar icon.

[0261] In some embodiments, the calendar-related tool class can return a detection result of true to the dynamic icon updater to instruct the dynamic icon updater to update the display date on the calendar icon.

[0262] S1811. When the dynamic icon updater receives the above second update instruction, it updates the display date on the calendar icon to the system date.

[0263] Specifically, after receiving the second update instruction sent by the calendar-related tool class, the dynamic icon updater can update the display date on the calendar icon to the system date. In this way, the probability of incorrect display of the calendar icon can be reduced, the accuracy of the calendar icon display can be improved, and thus the user's browsing experience can be enhanced. In addition, only when the display date on the calendar icon is different from the system date, the mobile phone updates the display date of the calendar icon. In this way, unnecessary power consumption losses can be reduced, and the utilization rate of mobile phone resources can be improved.

[0264] In some embodiments, the mobile phone may also not execute the above S1805 - S1811. That is to say, the mobile phone can directly update the display date on the calendar icon to the system date without determining whether the display date on the calendar icon is the same as the system date. That is, after each detection of an interface switching operation, the dynamic icon is redrawn and displayed to reduce the probability of incorrect display of the dynamic icon.

[0265] In some embodiments, the present application provides a computer-readable storage medium including computer instructions, which, when running on an electronic device, cause the electronic device to execute the method described above.

[0266] In some embodiments, the present application provides a computer program product, which, when running on an electronic device, causes the electronic device to execute the method described above.

[0267] Through the description of the above embodiments, those skilled in the art can clearly understand that for the convenience and simplicity of description, only the above division of each functional module is used as an example. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.

[0268] In several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling, direct coupling, or communication connection between each other can be through some interfaces. The indirect coupling or communication connection of the devices or units can be in electrical, mechanical, or other forms.

[0269] The units described as separate components may or may not be physically separated. The components displayed as units can be one physical unit or multiple physical units, that is, they can be located in one place, or they can be distributed to multiple different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0270] In addition, in each embodiment of this application, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.

[0271] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiments of this application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions for causing a device (which can be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the methods described in the various embodiments of this application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store program codes.

[0272] The above content is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be covered by the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.

Claims

1. A method for displaying an application icon, characterized in that: Applied to an electronic device, the electronic device supports color mode switching, the color mode is used to describe the color of the system background and system text in the interface; the desktop of the electronic device includes application icons, and the application icons include a first icon; The method comprises: At a first time point, the electronic device displays a desktop in a first color mode, the desktop at the first time point includes a first icon displaying first information, and the first information matches the first time point; The electronic device turns off the screen; At a second time point, in response to the first switching event, the electronic device switches to a second color mode; At a third time point, in response to a second switching event, the electronic device switches to the first color mode; wherein, between the second time point and the third time point, the electronic device remains in a screen-off state; At a fourth time point, in response to a first trigger operation of the user triggering the electronic device to display a desktop, if the electronic device has a layer non-destruction function, the electronic device sets a callback event for window focus change; wherein the layer non-destruction function includes that, when the electronic device does not display the desktop, the electronic device stores display information of application icons in the desktop, and the callback event for window focus change is used to detect whether the electronic device displays the desktop in the first color mode; when it is detected that the callback event for window focus change returns a first result, the electronic device displays the desktop in the first color mode, and updates the first icon so that the first icon includes second information, and the second information matches the fourth time point; At the fourth time point, in response to a first trigger operation of the user triggering the electronic device to display the desktop, if the electronic device does not have a layer non-destruction function, the electronic device detects whether the visibility of the first icon changes; after detecting that the visibility of the first icon changes, the electronic device displays the desktop in the first color mode and updates the first icon so that the first icon includes the second information; The first color mode is a dark color mode, and the second color mode is a light color mode; or, the first color mode is a light color mode, and the second color mode is a dark color mode.

2. The method according to claim 1, characterized in that The first icon includes an application icon of a calendar application, the first information includes the date and / or week to which the first time point belongs, and the second information includes the date and / or week to which the fourth time point belongs; and / or, The first icon includes an application icon of a clock application, the first information includes the first time point, and the second information includes the fourth time point.

3. The method according to claim 1 or 2, characterized in that: The application icons also include a second icon for a weather application; Among them, the desktop at the first time point also includes the second icon displaying third information, and the third information matches the weather at the location of the electronic device at the first time point; the desktop at the fourth time point also includes the second icon displaying fourth information, and the fourth information matches the weather at the location of the electronic device at the fourth time point.

4. The method according to claim 1, characterized in that In the case where the callback event of detecting the window focus change returns a first result, the electronic device displays the desktop in the first color mode and updates the first icon so that the first icon includes second information, including: In a case where the callback event of detecting the window focus change returns a first result, the electronic device displays the desktop in the first color mode; After detecting that the electronic device displays the desktop in the first color mode, the electronic device updates the first icon so that the first icon includes the second information.

5. The method according to claim 4, characterized in that Before the electronic device updates the first icon, the method further includes: The electronic device determines that the desktop at the fourth time point includes dynamic icons, and the dynamic icons include the first icon.

6. The method according to claim 5, characterized in that The method further comprises: The electronic device determines that the desktop at the fourth time point does not include a dynamic icon, and the electronic device does not update the first icon.

7. The method according to claim 5 or 6, characterized in that: The dynamic icon includes at least one of the following: a dynamic icon independently displayed on the desktop; and a dynamic icon displayed at the position of the first page in a folder of a first size on the desktop.

8. The method according to any one of claims 4 to 6, characterized in that: The method further comprises: When it is determined that the electronic device has a layer non-destruction function, the electronic device detects whether the electronic device displays a desktop in the first color mode.

9. The method according to any one of claims 4 to 6, characterized in that: The electronic device updating the first icon includes: When the display information of the first icon does not match the fourth time point, the electronic device updates the first icon; wherein, when the display information of the first icon matches the fourth time point, the electronic device does not update the first icon.

10. The method according to claim 1, characterized in that The method further comprises: At a fifth time point between the second time point and the third time point, in response to the first trigger operation of the user on the electronic device, the electronic device displays a desktop in the second color mode, and the desktop at the fifth time point includes the first icon displaying fifth information, and the fifth information matches the fifth time point.

11. The method according to claim 10, characterized in that In response to the first trigger operation of the user on the electronic device, the electronic device displays a desktop in the second color mode, and the desktop at the fifth time point includes the first icon displaying fifth information, including: In response to the first trigger operation of the user on the electronic device, the electronic device displays the desktop in the second color mode; In response to detecting the switching color mode, the electronic device updates the first icon so that the first icon includes the fifth information.

12. The method according to claim 1, characterized in that At the fourth time point, in response to a first trigger operation by a user on the electronic device to trigger display of a desktop, the method further includes: If the electronic device does not detect the switching color mode, the electronic device does not update the first icon in response to detecting the switching color mode.

13. An electronic device, characterized in that: The electronic device includes a display screen, a memory and one or more processors; the display screen, the memory and the processor are coupled; the display screen is used to display a first icon and / or a second icon, and the memory is used to store a computer program code, and the computer program code includes computer instructions; when the processor executes the computer instructions, the electronic device executes the method as described in any one of claims 1 to 12.

14. A computer-readable storage medium, characterized in that: The method comprises computer instructions, which, when executed on an electronic device, cause the electronic device to execute the method according to any one of claims 1 to 12.

15. A computer program product, characterized in that The method comprises computer instructions, which, when executed on an electronic device, cause the electronic device to execute the method according to any one of claims 1 to 12.

Citation Information

Patent Citations

  • Display method and electronic equipment

    CN114157755A

  • Display mode switching method, electronic equipment and readable storage medium

    CN116737292A