Method for displaying shortcut icon and electronic device
By obtaining and storing shortcut information after an application update, the problem of incorrect shortcut icon display after an application update is solved, and the shortcut icon is correctly displayed before or after clicking to launch, thus improving the human-computer interaction experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HONOR DEVICE CO LTD
- Filing Date
- 2024-10-14
- Publication Date
- 2026-07-31
AI Technical Summary
After an application update, electronic devices may fail to display shortcut icons correctly, resulting in a decline in the human-computer interaction experience.
By acquiring and storing shortcut information after an application update, including application identifiers, shortcut identifiers, and icon mappings, the system can correctly display shortcut icons before or after launching the application.
This ensures that shortcut icons are displayed correctly after application updates, improving the human-computer interaction experience.
Smart Images

Figure CN120428895B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal technology, and in particular to a method for displaying shortcut icons and an electronic device. Background Technology
[0002] Electronic devices such as smartphones and tablets typically support long-pressing desktop icons to provide shortcuts. Taking a smartphone as an example, in response to a user's tap on a chat application on the desktop, the phone can display shortcuts such as "Start a Chat," "Add Friend," and "Scan QR Code." In this way, electronic devices can provide quick access to various sub-functions of applications, allowing users to directly reach the corresponding functions.
[0003] Furthermore, when providing shortcuts, electronic devices can also display shortcut icons (simply referred to as shortcut icons) to visually demonstrate the function of the shortcut.
[0004] However, after an application update, long-pressing the application's desktop icon may cause the electronic device to fail to display the shortcut icon correctly, such as displaying an incorrect shortcut icon or not displaying the shortcut icon at all. Summary of the Invention
[0005] This application provides a method for displaying shortcut icons and an electronic device that can correctly display shortcut icons even after application updates, thereby improving the human-computer interaction experience.
[0006] To achieve the above objectives, this application adopts the following technical solution:
[0007] Firstly, a method for displaying shortcut icons is provided. This method includes: displaying a first interface (e.g., interface 401 below), the first interface including a first desktop icon of the target application, such as desktop icon 4011 in interface 401. At a first moment, in response to a click operation on the first desktop icon, the target application is launched, as shown in the response process of interface 401-interface 402. At a second moment, the target application is updated, the second moment following the first moment. After updating the target application, a second interface is displayed, as shown in interface 501 below, the second interface including a second desktop icon of the target application, such as desktop icon 5011 in interface 501. At a third moment, in response to a first operation on the second desktop icon, a first shortcut icon of the target application is displayed. The first shortcut icon corresponds to a first shortcut of the target application, as shown in the response process of interface 501-interface 502. The first shortcut can be various shortcuts such as "Scan," "Add Friend," "Start Chat," and "Receive / Pay" in interface 502. The third moment occurs after the second moment, and no click operation on the second desktop icon was received between the second and third moments. In other words, the target application was not launched after the target application was updated.
[0008] In summary, by adopting this application, the shortcut icon can be displayed correctly even after the application has been updated and before the launch button has been clicked, thereby improving the human-computer interaction experience.
[0009] In one possible design approach of the first aspect, the aforementioned first operation includes: a long press operation, as shown in Scenario 1 below; or, a long press and drag operation of the border of the second desktop icon, as shown in Scenario 2 below.
[0010] In other words, the shortcut icon can be displayed correctly in various scenarios that trigger the display of shortcuts.
[0011] In one possible design approach of the first aspect, the first shortcut icon corresponds to the first shortcut of the target application before the update, such as the "Scan" icon in interface 502 being the same as the "Scan" icon in interface 404 before the update.
[0012] In one possible design of the first aspect, at a third moment, after displaying the first shortcut icon of the target application in response to the first operation on the second desktop icon, the method further includes: displaying a third interface, such as interface 505 below, which includes the second desktop icon of the target application, such as desktop icon 5011 in interface 505. At a fourth moment, in response to the first operation on the second desktop icon, displaying the second shortcut icon of the target application, the second shortcut corresponding to the first shortcut, as shown in the response process from interface 505 to interface 506. Between the third and fourth moments, the target application is launched in response to a click operation on the second desktop icon.
[0013] In other words, even if the target application has been updated and the target application has been launched after this update, the correct shortcut icon will still be displayed.
[0014] In one possible design approach of the first aspect, the second shortcut icon corresponds to the first shortcut of the updated target application, such as the "Scan" icon 5061 in interface 506 being different from the "Scan" icon before the update displayed in interfaces 404 and 502.
[0015] In other words, after updating the target application and launching the target application after this update, the updated shortcut icon will be displayed.
[0016] In one possible design of the first aspect, the method further includes: in response to a click operation on a first desktop icon, obtaining and storing first shortcut information of the target application, wherein the first shortcut information indicates the correspondence between shortcuts and shortcut icons of the target application.
[0017] The above-mentioned display of the first shortcut icon of the target application in response to the first operation on the second desktop icon at the third moment includes: querying and displaying the first shortcut icon of the target application based on the first shortcut information in response to the first operation on the second desktop icon at the third moment.
[0018] In other words, by querying the stored shortcut information, the shortcut icon can be displayed correctly after the target application is updated but before it is launched.
[0019] In one possible design approach of the first aspect, the first shortcut information includes the correspondence between the application identifier of the target application, the identifier of the shortcut of the target application, and the shortcut icon, wherein the shortcut of the target application includes the first shortcut. The above-mentioned querying and displaying the first shortcut icon of the target application based on the first shortcut information includes: querying and displaying the first shortcut icon corresponding to the application identifier of the target application and the identifier of the first shortcut.
[0020] In one possible design approach for the first aspect, the first shortcut information also includes the version number of the target application.
[0021] In one possible design of the first aspect, the method further includes: at a fifth moment between the third and fourth moments, in response to a click operation on the second desktop icon, acquiring and storing second shortcut information of the target application, wherein the second shortcut information indicates the correspondence between shortcuts and shortcut icons of the target application. For example, the second shortcut icon can be used to overlay the first shortcut icon to update the shortcut information.
[0022] The above-mentioned display of the second shortcut icon of the target application in response to the first operation on the second desktop icon at the fourth time includes: querying and displaying the second shortcut icon of the target application based on the second shortcut information in response to the first operation on the second desktop icon at the fourth time.
[0023] In other words, after updating the target application and clicking "Launch," the shortcut icon can be correctly displayed by querying the stored shortcut information. The specific implementation principle is similar to that described above for displaying the first shortcut icon, and will not be repeated here.
[0024] In one possible design approach of the first aspect, at a fourth moment, in response to the first operation on the second desktop icon, displaying the second shortcut icon of the target application includes: at the fourth moment, in response to the first operation on the second desktop icon, obtaining and displaying the second shortcut icon of the target application through an interface call.
[0025] In other words, after updating the target application and clicking to launch it, the shortcut icon can be obtained and displayed through API calls, thereby improving the display efficiency of the shortcut icon.
[0026] In one possible design approach for the first aspect, the interface calls include calls via the package management PM interface.
[0027] Secondly, embodiments of this application also provide an electronic device, which has multiple applications installed thereon. 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 memory stores computer program code, which includes computer instructions. When the computer instructions are executed by the processor, the electronic device performs the following steps: displaying a first interface, the first interface including a first desktop icon of a target application; launching the target application in response to a click operation on the first desktop icon at a first moment; updating the target application at a second moment, the second moment being after the first moment; displaying a second interface after updating the target application, the second interface including a second desktop icon of the target application; and displaying a first shortcut icon of the target application in response to a first operation on the second desktop icon at a third moment, the third moment being after the second moment, and no click operation on the second desktop icon was received between the second moment and the third moment, the first shortcut icon corresponding to a first shortcut of the target application.
[0028] In one possible design approach for the second aspect, the first operation includes: a long press operation, or a long press and drag operation of the border of the second desktop icon.
[0029] In one possible design approach for the second aspect, the first shortcut icon corresponds to the first shortcut of the target application before the update.
[0030] In one possible design of the second aspect, when the computer instructions are executed by the processor, the electronic device further performs the following steps: displaying a third interface, the third interface including a second desktop icon of the target application. At a fourth moment, in response to a first operation on the second desktop icon, displaying a second shortcut icon of the target application. Wherein, between the third and fourth moments, the target application has been launched in response to a click operation on the second desktop icon, and the second shortcut corresponds to the first shortcut.
[0031] In one possible design approach for the second aspect, the second shortcut icon corresponds to the first shortcut of the updated target application.
[0032] In one possible design of the second aspect, when the computer instructions are executed by the processor, the electronic device further performs the following steps: in response to a click operation on a first desktop icon, it acquires and stores first shortcut information of a target application, the first shortcut information indicating the correspondence between shortcuts and shortcut icons of the target application. At a third moment, in response to a first operation on a second desktop icon, it queries and displays the first shortcut icon of the target application based on the first shortcut information.
[0033] In one possible design of the second aspect, the first shortcut information includes a correspondence between the application identifier of the target application, the identifier of the shortcut of the target application, and the shortcut icon, wherein the shortcut of the target application includes the first shortcut. When the computer instruction is executed by the processor, the electronic device further performs the following steps: querying and displaying the first shortcut icon corresponding to the application identifier of the target application and the identifier of the first shortcut.
[0034] In one possible design approach for the second aspect, the first shortcut information also includes the version number of the target application.
[0035] In one possible design of the second aspect, when the computer instructions are executed by the processor, the electronic device further performs the following steps: at a fifth time between a third and a fourth time, in response to a click operation on the second desktop icon, acquiring and storing second shortcut information of the target application, the second shortcut information indicating the correspondence between shortcuts and shortcut icons of the target application. At the fourth time, in response to a first operation on the second desktop icon, querying and displaying the second shortcut icon of the target application based on the second shortcut information.
[0036] In one possible design of the second aspect, when the computer instructions are executed by the processor, the electronic device further performs the following steps: at a fourth moment, in response to the first operation on the second desktop icon, obtains and displays the second shortcut icon of the target application via an interface call.
[0037] In one possible design approach for the second aspect, the interface calls include calls via the package management PM interface.
[0038] Thirdly, embodiments of this application provide a chip system applied to an electronic device including a display screen and a memory; the chip system includes one or more interface circuits and one or more processors; the interface circuits and the processors are interconnected via lines; the interface circuits are used to receive signals from the memory of the electronic device and send the signals to the processors, the signals including computer instructions stored in the memory; when the processor executes the computer instructions, the electronic device performs the method as described in the first aspect and any possible design of the method.
[0039] Fourthly, this application provides a computer storage medium including computer instructions that, when executed on an electronic device, cause the electronic device to perform the method described in the first aspect and any possible design thereof.
[0040] Fifthly, this application provides a computer program product that, when run on a computer, causes the computer to perform the method described in the first aspect and any possible design thereof.
[0041] It is understood that the beneficial effects achieved by the electronic device described in the second aspect, the chip system described in the third aspect, the computer storage medium described in the fourth aspect, and the computer program product described in the fifth aspect can be referred to the beneficial effects in the first aspect and any of its possible design embodiments, which will not be repeated here. Attached Figure Description
[0042] Figure 1 This application provides a schematic diagram of a scenario for displaying shortcut icons.
[0043] Figure 2 A schematic diagram illustrating another scenario for displaying shortcut icons provided in an embodiment of this application;
[0044] Figure 3 A schematic diagram illustrating an abnormal display of a shortcut icon, provided in an embodiment of this application;
[0045] Figure 4 This is one of the interface interaction diagrams for displaying shortcut icons provided in the embodiments of this application;
[0046] Figure 5 The second interface interaction diagram for displaying shortcut icons provided in the embodiments of this application;
[0047] Figure 6 A hardware architecture diagram of a mobile phone provided in an embodiment of this application;
[0048] Figure 7 A software architecture diagram of a mobile phone provided in an embodiment of this application;
[0049] Figure 8 This is one of the schematic diagrams illustrating the display principle of the shortcut icon provided in the embodiments of this application;
[0050] Figure 9 A timing interaction diagram illustrating the storage and updating of shortcut information provided in the embodiments of this application;
[0051] Figure 10 The second schematic diagram of the display principle of the shortcut icon provided in the embodiments of this application;
[0052] Figure 11 One of the timing interaction diagrams for displaying shortcut icons provided in the embodiments of this application;
[0053] Figure 12 The third schematic diagram illustrating the display principle of shortcut icons provided in the embodiments of this application;
[0054] Figure 13 The second timing interaction diagram for the display of shortcut icons provided in the embodiments of this application;
[0055] Figure 14 This is a schematic diagram of the chip system provided in an embodiment of this application. Detailed Implementation
[0056] The technical solutions of the embodiments of this application are described below with reference to the accompanying drawings. In the description of the embodiments of this application, the terminology used in the following embodiments is for the purpose of describing specific embodiments only and is not intended to limit the application. As used in the specification and appended claims of this application, the singular expressions "a," "the," "the," "the," and "this" are intended to also include expressions such as "one or more," unless the context clearly indicates otherwise. It should also be understood that in the following embodiments of this application, "at least one" and "one or more" refer to one or more (including two). The term "and / or" is used to describe the relationship between related objects, indicating that three relationships can exist; for example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship.
[0057] References to "one embodiment" or "some embodiments" in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized. The term "connection" includes direct connections and indirect connections, unless otherwise stated. "First" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated.
[0058] In the embodiments of this application, the words "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of the words "exemplarily" or "for example" is intended to present the relevant concepts in a specific manner.
[0059] The method for displaying shortcut icons provided in this application can be applied to scenarios where shortcut icons are displayed in electronic devices.
[0060] The electronic devices involved in the embodiments of this application can also be referred to as terminals, user equipment (UE), mobile stations (MS), mobile terminals (MT), etc. Electronic devices can be mobile phones, smart TVs, wearable devices, tablets, computers with wireless transceiver capabilities, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, or wireless terminals in smart homes, etc. The embodiments of this application do not limit the specific technologies or device forms used in the electronic devices. The following mainly uses a mobile phone as an example to illustrate the embodiments of this application.
[0061] Here are some typical scenarios for displaying shortcut icons.
[0062] Scenario 1: In response to a long press on a desktop icon, the phone displays a shortcut icon.
[0063] See Figure 1 The phone can display interface 101, which is the phone's desktop. Interface 101 includes desktop icons for multiple applications. In response to a user's long-press operation on any desktop icon in interface 101, the phone can display a shortcut menu for the application corresponding to that desktop icon. The shortcut menu includes at least one shortcut icon. Taking the desktop icon 1011 of the chat application in interface 101 as an example, in response to a user's long-press operation on desktop icon 1011 in interface 101, the phone can display interface 102. Interface 102 includes a shortcut menu 1021 for the chat application. The shortcut menu 1021 includes shortcuts and their icons such as "Receive / Pay," "Start a Chat," "Add Friend," and "Scan QR Code," such as icon 1022 for "Receive / Pay," icon 1023 for "Start a Chat," icon 1024 for "Add Friend," and icon 1025 for "Scan QR Code."
[0064] Scenario 2: In response to a long press and drag operation on a desktop icon border, the phone displays a shortcut icon.
[0065] In response to a user's long press on any desktop icon, the phone can also highlight the border of that desktop icon. Then, in response to a user's drag operation on that border, such as dragging it up or down or dragging it left or right, the phone can display that desktop icon and its shortcut icon in a folder.
[0066] Taking the chat application's desktop icon 1011 in interface 101 as an example, in response to the user's long-press operation on the desktop icon 1011 in interface 101, see... Figure 2 The phone can display interface 201. Based on the previous interface 102, interface 201 highlights the border 2011 with desktop icons 1011. In response to the user's dragging operation of the border 2011 downwards and then to the right, the phone can display interface 202, which includes a folder 2020. The folder 2020 not only includes desktop icons 1011, but also icons for "Scan" 2021, "Start Chat" 2022, and "Add Friend" 2023, which can also display shortcut icons.
[0067] It should be noted that in the above scenario, the shortcut icons within the folder can remain permanently displayed on the desktop. Subsequently, in response to the user collapsing the folder, the phone can hide the shortcut icons within the folder and instead display the desktop icons independently.
[0068] Furthermore, in response to a user's action on any shortcut icon in Scenario 2 (such as a long press), the phone can also display a shortcut menu similar to that in Scenario 1, thus displaying the shortcut icon. In other words, shortcut icons from Scenario 1 and Scenario 2 can be displayed simultaneously.
[0069] See also Figure 2 Taking the "Start Chat" icon 2022 in interface 202 as an example, in response to the user's long press operation on the "Start Chat" icon 2022 in interface 202, the phone can display interface 203, which includes a shortcut menu 2031. The shortcut menu 2031 includes shortcut icons, which are similar to the shortcut menu 1021 in interface 102 mentioned above, and will not be described again here.
[0070] Scenario 3: Add a shortcut icon to the desktop, and the shortcut icon will be displayed when the phone shows the desktop.
[0071] Shortcut icons can also be added to the phone's home screen. For example, the interface 101 above includes not only home screen icons for multiple applications, but also a "scan" icon 1012 for the chat application, meaning a shortcut icon for the chat application is added to the home screen. Correspondingly, when the phone displays interface 101, it will display icon 1012, that is, the shortcut icon.
[0072] It should be noted that scenarios 1-3 above are only typical examples, and actual implementation is not limited to these.
[0073] In the scenarios described above where shortcut icons are displayed, mobile phones (especially those using...) (For phones with a framed interface) shortcut icons may not display correctly. This includes two scenarios: shortcut icons not displaying at all, and shortcut icons displaying incorrect icons.
[0074] See Figure 3 In Honor phones, on interface 301, the icons for "Scan" and "Start Chat" in folder 3011 and quick menu 3012 are not displayed (represented by a cracked image symbol in the image, the same applies below), and the "Add Friend" icon is displayed incorrectly (represented by black fill in the image, the same applies below). Additionally, the "Receive / Pay" icon in quick menu 3012 is also not displayed.
[0075] See Figure 3 Interface 302 in some other applications On the mobile phone with the frame, the icon for shortcut 1 in interface 302 is displayed incorrectly (3021).
[0076] Analysis revealed that the main reasons for the incorrect display of shortcut icons are as follows: Some applications use dynamic shortcuts. Dynamic shortcut icons refer to shortcut icons whose identity document (ID) changes dynamically. The resource ID can be updated in each version of the application. Furthermore, code obfuscation techniques are used when compiling the installation packages (such as APKs) of these applications, making it difficult to obtain the updated, true resource ID. In this case, after an application update, and before the application has been launched by clicking its desktop icon (hereinafter referred to as "launch by clicking"), the phone may be unable to obtain the correct shortcut icon using the obfuscated resource ID in the installation package.
[0077] It should be noted that after an application is launched, when the shortcut icon needs to be displayed, the desktop can obtain the mapping between the application's shortcut icon and the new resource ID, such as through a Package Manager (PM) callback, thus ensuring the correct display of the shortcut icon. Therefore, the inability to display the shortcut icon correctly usually occurs after an application update but before it has been launched.
[0078] For example, after the chat application is updated, the resource ID of the "Scan" icon changes to 2, and in the installation package, "2" is obfuscated as "AAA". Before the app is launched after this update, in response to the user's long press operation on the chat application's desktop icon, the phone can obtain the obfuscated "AAA" from the installation package. It is highly unlikely that the correct "Scan" icon can be obtained through "AAA".
[0079] To address the aforementioned issues, this application provides a method for displaying shortcut icons. After a target application is launched, its shortcut information can be obtained and stored. This shortcut information indicates the correspondence between the shortcut identifier and the shortcut icon. Subsequently, after the target application is updated, the shortcut icon can be displayed based on the stored shortcut information, thus ensuring that the correct shortcut icon is displayed even after the target application has been updated but before it is launched.
[0080] The target application can be an application that uses dynamic shortcuts and employs code obfuscation techniques during the compilation and installation of its package. Of course, in practice, the target application can also be any application on the phone, thus unifying the display logic of shortcut icons across all applications on the phone.
[0081] Furthermore, shortcut information includes the following: the identifier of the target application (such as the application package name), the identifier of the shortcut (such as ID or name), and the correspondence between the shortcut icons. For example, the shortcut information for a chat application is shown in Table 1 below:
[0082] Table 1
[0083]
[0084] Correspondingly, after the target application is updated, in response to a long press operation on the target application's desktop icon, the corresponding shortcut icon can be obtained from the stored shortcut information using the target application's identifier and the shortcut's ID, and then displayed.
[0085] For example, in response to a user's long-press action on the desktop icon of a chat application, the target chat application whose shortcut icon needs to be displayed can be identified. Then, the chat application's package name and the IDs of the shortcuts in each position in the shortcut menu can be used to query the shortcut. For instance, if the first shortcut in the shortcut menu is "Scan," then icon 1 can be retrieved using the chat application's package name and the ID of "Scan," and thus icon 1 can be displayed in the first shortcut position in the shortcut menu... and so on, each shortcut icon can be obtained and displayed.
[0086] This prevents the shortcut icon from failing to display correctly due to changes or confusion in the resource ID of the shortcut icon.
[0087] In practice, shortcut information is not limited to the above. For example, shortcut information may also include the application version number, icon class name, etc. This application does not impose specific limitations on this.
[0088] This application embodiment will, in conjunction with the above-described scenario 1 (i.e., displaying a shortcut icon in response to a long press operation), provide a detailed description of the mobile phone's interface interaction process after adopting the shortcut icon display method.
[0089] In some embodiments, before the first launch of the target application after it has been installed on the phone, the phone may not respond to a long press operation on the target application's desktop icon.
[0090] See Figure 4 After the chat application is installed, the phone can display interface 401, which includes the chat application's desktop icon 4011. Before the chat application is launched for the first time, the phone may not respond to a long press operation on the desktop icon 4011.
[0091] Understandably, before the first click to launch, the phone cannot obtain the shortcut information of the target application and cannot display the correct shortcut icon. Therefore, the phone can avoid displaying the incorrect shortcut icon by not responding.
[0092] In practice, before launching the target application for the first time after installation on the phone, the user may not perform a long press operation on the target application's desktop icon, and correspondingly, the aforementioned unresponsive process may not occur.
[0093] After the target application is installed on the phone, the phone can launch the target application in response to the user's click on the target application's desktop icon; that is, the target application is launched by clicking.
[0094] See also Figure 4 In response to the user's click on desktop icon 4011, the phone can display interface 402, which is the application interface of the chat application, and the chat application is launched.
[0095] After the target application is launched, including after the first launch or the second, third, etc., until the next update of the target application, the phone can correctly display the shortcut icon of the target application in response to the user's long press operation on the desktop icon of the target application.
[0096] See also Figure 4After returning to the desktop from interface 402 (referred to as interface 403, which is the same as interface 401), if the phone displays interface 403 in response to the user's swipe operation from the bottom of interface 402, and then in response to the user's long press operation on the desktop icon 4011 of the chat application in interface 403, the phone can display interface 404, which includes the shortcut icon of the chat application.
[0097] Subsequently, in response to the update event, the mobile phone can update the target application. The update event can be one triggered manually by the user or one that occurs automatically when the phone detects a new version; this application does not impose specific limitations on this.
[0098] See Figure 5 After updating the chat application, the phone can display interface 501, which is the phone's home screen. Interface 501 includes the chat application's home screen icon 5011. Home screen icon 5011 is different from the previously mentioned home screen icon 4011; that is, the home screen icon changes after the chat application update. It should be noted that in practice, the home screen icon may remain unchanged after an application update; the change shown in the image is only to distinguish when an application update has occurred.
[0099] After updating the target application and before launching it after the update, the phone can correctly display the shortcut icon of the target application in response to the user's long press operation on the desktop icon of the target application, which can improve the human-computer interaction experience compared to conventional technology.
[0100] See also Figure 5 In response to a user's long press on the chat application's desktop icon 5011 in interface 501, the phone can display interface 502 (the same as interface 404 mentioned earlier), where the shortcut icons for the chat application are displayed correctly. However, in conventional technologies, such as interface 301 mentioned earlier, the icons might be displayed incorrectly.
[0101] After the target application is updated, the phone can also launch the target application in response to the user's click on the target application's desktop icon; that is, the target application is launched after the update.
[0102] See also Figure 5 After de-displaying the shortcut menu 5021 in interface 502, if the phone de-displays the shortcut menu 5021 in response to a user's click on an area outside of the shortcut menu 5021 in interface 502, the phone can display interface 503 (same as interface 501). In response to a user's click on the desktop icon 5011 of the chat application in interface 503, the phone can display interface 504, which is the application interface of the chat application, indicating that the chat application was launched after being updated.
[0103] After updating the target application and launching it following the update, the phone can correctly display the shortcut icon of the target application in response to the user's long press operation on the desktop icon of the target application.
[0104] Furthermore, application updates can include changes to shortcuts. That is, shortcuts may change before and after an application update. Specifically, this could include changes to the resource ID of the shortcut icon, changes to the shortcut icon style, the addition of a new shortcut icon, or the deletion of a shortcut icon. After updating the target application but before launching it, the shortcut icon displayed on the phone, such as the one in interface 502, may not be the latest version but rather the one from before the application update. After updating the target application and launching it, the shortcut icon displayed on the phone will be the latest version.
[0105] See also Figure 5 After returning to the desktop from interface 504 (referred to as interface 505), if the phone displays interface 505 in response to the user's swipe-up operation from the bottom of interface 504, and then displays interface 506 in response to the user's long-press operation on the desktop icon 5011 of the chat application in interface 505. Interface 506 includes shortcut icons for the chat application, but the "Scan" icon 5061 in interface 506 is different from the "Scan" icon 5022 in the previous interface 502; interface 506 displays the latest shortcut icon.
[0106] It should be noted that interface 506 above shows the situation where the style of the shortcut icon has changed. In addition, if a new shortcut icon is added, interface 506 may include shortcut icons not included in interface 502; if a shortcut icon is deleted, interface 506 may not include some of the shortcut icons shown in interface 502.
[0107] Additionally, if the shortcut icon remains unchanged, the shortcut icon in interface 505 will be the same as the shortcut room icon in interface 502.
[0108] At this point, it should be noted that the above... Figure 5 This only shows the interface interaction process after one update of the target application. In reality, after each update of the target application, you can follow the steps below. Figure 5 Similar interactive processes will not be elaborated upon in this article.
[0109] The following section will further explain the specific implementation of the above interface interaction process in conjunction with the phone's hardware and software structure.
[0110] See Figure 6The mobile phone may include a processor 110, internal memory 121, universal serial bus (USB) interface 130, charging management module 140, power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, speaker, receiver, microphone, headphone jack, sensor 180, camera 193, display screen 194, etc.
[0111] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the mobile phone. In other embodiments of this application, the mobile phone may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0112] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, memory, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.
[0113] In one specific implementation, the mobile phone can use the processor 110 to execute the shortcut icon display method, so that the shortcut icon is still displayed correctly after the application is updated.
[0114] The wireless communication function of a mobile phone can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor, and baseband processor.
[0115] The mobile phone implements its display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0116] The display screen 194 is used to display images, videos, etc. In one specific implementation, the mobile phone can display desktop icons, shortcut icons, etc. on the display screen 194.
[0117] Mobile phones can achieve shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.
[0118] The software system of a mobile phone can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application does not specifically limit this. Furthermore, the mobile phone's operating system can be... Or other operating systems. The following examples will primarily use the layered architecture of the Android system as an example to illustrate the software architecture of the mobile phone.
[0119] A layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. See also the documentation for some embodiments. Figure 7 The Android system can include an application layer and an application framework layer. Of course, the Android system may also include the Android runtime, system libraries, kernel layer, etc., which are not shown in the diagram.
[0120] The application layer can accommodate applications (APPs) such as calling, memos, browser, contacts, camera, gallery, calendar, map, Bluetooth, music, video, and chat. Only a portion of these are shown in the diagram.
[0121] Some or all of these applications can provide shortcut icons. The target application is some or all of the applications in the application layer.
[0122] In addition, the application layer also includes desktop applications. Desktop applications can be used to display desktop icons and shortcut icons.
[0123] The application framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer.
[0124] The application framework layer may include system services such as window manager, resource manager, and notification manager, which are not shown in the figure.
[0125] The application framework layer can also include a Package Manager Service (PMS). PMS can be used to manage application installation packages, such as scanning and installation. Additionally, PMS can be used to manage shortcut icon display.
[0126] Furthermore, PMS can include shortcut management (such as android.content.pm.ShortcutManager) and shortcut service (android.server.pm.ShortcutService).
[0127] The shortcut management feature is used to manage changes to shortcuts. For example, shortcut management can notify the shortcut service when a shortcut is changed. Furthermore, shortcut management can identify and differentiate the scenarios in which shortcut changes occur, such as changes related to installing a target application or launching a target application.
[0128] The Shortcuts service is used for managing registered services. Registered services include target services that register events related to changes in package shortcuts (such as `packageShortcutsChanged`). When a target service needs to listen for these events, it can register a listener with the Shortcuts service. Subsequently, the Shortcuts service can notify the registered target services when a shortcut changes.
[0129] The application framework layer can also include a desktop application service (android.server.pm.LauncherAppsService), which is a target service. This means the desktop application service can register with the shortcut service to listen for shortcut change events, allowing it to detect shortcut changes promptly. Furthermore, the desktop application service can notify the desktop application of shortcut changes, enabling the desktop application to perform appropriate actions, such as storing shortcut information to ensure the correct display of shortcut icons.
[0130] The shortcut icon display method provided in this application embodiment can be implemented in a mobile phone with the above-described hardware and software structure.
[0131] After a target application is installed and launched for the first time, the phone (e.g., a desktop application) can obtain and store the application's shortcut information, such as storing it in a shortcut icon database. Subsequently, each time the target application is updated and launched after that update, the phone (e.g., a desktop application) can obtain and update the stored shortcut information. In other words, the phone can store shortcut information in a timely manner. Given this, the phone (e.g., a desktop application) can retrieve the shortcut icon by querying the stored information. Thus, even after the target application has been updated but before it is launched, the shortcut icon can still be displayed correctly by querying the stored information.
[0132] See Figure 8After installing the target application version 1.0 (denoted as V1.0 in the image) and launching it for the first time (denoted as Launch 1 in the image), if the phone receives a user's click on the desktop icon 4011 in the previous interface 401, the phone can store the shortcut information corresponding to version 1.0 in the shortcut icon database. Before the target application is updated to version 2.0 (denoted as V2.0 in the image) and launched (denoted as Launch 2 in the image), in response to a long press operation on the target application's desktop icon (denoted as Long Press 20 in the image), the phone can query the shortcut information of the target application from the shortcut icon database. It can find and display the shortcut icon corresponding to version 1.0, as shown in the shortcut icon in the previous interface 502, thus ensuring that the shortcut icon is correctly displayed after the target application is updated and before launching it after this update. After the target application is updated to version 2.0 and launched (e.g., Launch 2), the phone can update the shortcut information corresponding to version 1.0 in the shortcut icon database to the shortcut information corresponding to version 2.0. Subsequently, after the target application is updated to version 3.0, the process can be similar to that of version 2.0... and so on. The phone can ensure that the shortcut icon is displayed correctly after each update of the target application and before clicking to launch it after this update.
[0133] For example, a mobile phone can adopt Figure 9 The process shown enables the storage and updating of shortcut information.
[0134] S901. When the shortcut of the target application changes, in response to the click operation on the desktop icon of the target application, the target application sends a first notification to the shortcut management.
[0135] Understandably, in response to a click on the desktop icon of the target application, the target application will first launch, as shown in the response process of interface 401-interface 402 and interface 503-interface 504 above, which will not be repeated here.
[0136] The changes to the shortcut of the target application mainly include the following two situations:
[0137] The first type involves changes after the initial launch, as described above. Figure 8 The scenario corresponding to clicking "Start 1" is as follows: After the first click of "Start," all shortcuts for the target application are new; in this case, the change is equivalent to adding all shortcuts for the target application.
[0138] The second method involves updating the target application and then clicking "Start," as described above. Figure 8Clicking "Launch 2" corresponds to the following scenario. After updating the target application, the shortcuts may change compared to the previous version. These changes include at least one of the following: addition, update, and removal. Adding refers to adding a shortcut icon compared to the previous version. Updating refers to updating the shortcut icon and / or the shortcut icon's resource ID compared to the previous version, such as a change in the shortcut icon's style or resource ID. Removing refers to deleting the shortcut icon compared to the previous version.
[0139] It should be noted that in other cases besides the two mentioned above, such as the second, third, etc., clicks to launch after the first launch and before the next update target application, or the second, third, etc., clicks to launch between two update target applications, the shortcut usually does not change, so the first notification does not need to be sent.
[0140] S902: When the shortcut management detects that the target application has been clicked and launched, it adds a first identifier to the first notification and generates a second notification.
[0141] The first identifier is used to identify when an application is launched by clicking. By adding the first identifier, it is easier to identify when the target application is launched by clicking and to store and update the shortcut information accordingly. For details, please refer to the explanations in S906 and S907 below.
[0142] In one specific implementation, the target application can also include a trigger event when sending the first notification to the shortcut manager. For example, in the case of a click-to-launch, the trigger event would be clicking the target application's desktop icon. In this way, the shortcut manager can identify whether the target application has been launched based on the trigger event.
[0143] Specifically, if the triggering event is clicking the target application's desktop icon, it can be detected that the target application has been launched. If the triggering event is not clicking the target application's desktop icon, it can be detected that the target application has not been launched. For example, when installing a target application, if the shortcut changes, the target application will also send a notification to the shortcut management system to announce the shortcut change. In this case, the triggering event is not clicking the target application's desktop icon, so it can be detected that the target application has not been launched.
[0144] S903, Shortcut Management sends a second notification to the Shortcut Service.
[0145] S904, the shortcut service sends a second notification to the desktop application service.
[0146] For example, when the shortcut service receives the second notification, it detects an event indicating a change in the package shortcut (such as packageShortcutsChanged). The shortcut service can then notify the target service that has registered to listen for this event, so that the target service can be aware that the shortcut of the target application has changed.
[0147] For example, if the desktop application service registers a listener for packageShortcutsChanged, the shortcut service will notify the desktop application service after receiving the second notification, so that the desktop application service is aware that the shortcut of the target application has changed.
[0148] S905, Desktop Application Service sends a second notification to Desktop Application.
[0149] For example, when the desktop application service receives the second notification, it can be understood as receiving a callback from the PM regarding a shortcut change (such as onShortcutChanged), which further notifies the desktop application so that the desktop application can be aware that the shortcut of the target application has changed.
[0150] S906: The desktop application detects a situation where the application was launched by clicking based on the first identifier.
[0151] Normally, both clicking to launch and installing trigger a callback to change the PM's shortcut. In this embodiment, for the click-to-launch scenario, the shortcut information of the target application is obtained and stored in the database. Therefore, the desktop application can first detect whether it is a click-to-launch scenario. If a first identifier is obtained, it indicates that it is a click-to-launch scenario, and the application can continue to execute S907 to complete the storage of the shortcut information.
[0152] Additionally, if the first identifier is not obtained, it indicates that the application is installed. In this case, since the target application is not started, the desktop application cannot obtain accurate shortcut information, making it difficult to store shortcut information. Therefore, S907 below will not be executed.
[0153] S907: Desktop applications obtain and store shortcut information for the target application.
[0154] For example, the second notification carries the application identifier of the target application, such as the application package name. Based on this application identifier, the desktop application can obtain the shortcut information of the target application.
[0155] In one specific implementation, the desktop application can obtain shortcut information of the target application through the PM interface. It should be noted that since this happens after the target application is launched, accurate shortcut information can be obtained through the PM interface, such as the updated, real (unobfuscated) resource ID.
[0156] After obtaining the shortcut information of the target application, the desktop application stores the shortcut information in the database for later display of the shortcut icon.
[0157] In this scenario, if the desktop application finds shortcut information for the target application in the database, it can update that shortcut information in the database, such as overwriting the existing shortcut information with the newly retrieved information. This mainly occurs after updating the target application, where the desktop application has already written the target application's shortcut information to the database during a previous launch, thus ensuring the database already contains that shortcut information.
[0158] If a desktop application finds that the database does not contain shortcut information for the target application, it can directly write the shortcut information for the target application to the database. This mainly occurs when the target application is launched for the first time after installation, in which case the database has not yet written the shortcut information for the target application, and therefore does not contain it.
[0159] In some scenarios, the shortcut icon of the target application can be permanently displayed on the phone's desktop, such as the shortcut icon in the folder in scenario 2 above, and the shortcut icon in scenario 3. After obtaining the shortcut information of the target application, the desktop application can also execute the following S908 to ensure that the shortcut icon of the target application permanently displayed on the desktop is correct.
[0160] S908: Desktop applications refresh the shortcut icons that are permanently displayed on the desktop based on the shortcut information of the target application.
[0161] For example, a "Scan" icon for a chat application is permanently displayed on the desktop, such as icon 1012 in interface 101 above. After obtaining the shortcut information of the chat application, the desktop application can refresh the "Scan" icon from that shortcut information to the position of the "Scan" icon on the desktop.
[0162] In this way, the desktop application can promptly update the persistently displayed shortcut icon after the target application's shortcut is changed. While ensuring that the target application's shortcut icon is correctly displayed on the desktop, it can also pre-refresh the shortcut icon so that the shortcut icon can be quickly displayed when the desktop is displayed later.
[0163] It should be noted that if there is no shortcut icon for the target application that is permanently displayed on the desktop, the above S908 can be omitted.
[0164] Of course, desktop applications can also use the method described below (see below). Figures 10-13 (As shown) This enables the display of a persistent shortcut icon.
[0165] Using the above Figure 9 As shown in the process, the mobile phone can promptly store the latest shortcut information into the database.
[0166] In some embodiments, whenever a shortcut icon needs to be displayed, as shown in Scenario 1-Scenario 3, the mobile phone can query a database, such as a shortcut icon database, to obtain shortcut information and use it to display the shortcut icon.
[0167] See Figure 10 In the preceding text Figure 8 Building upon the previous setup, after the initial launch (e.g., launching 1), in response to a long press on the target application's desktop icon (referred to as long press 11 in the image), the phone can query the shortcut information of the target application from the shortcut icon database. It will find and display the shortcut icon corresponding to version 1.0, as shown in interface 404 above. Therefore, from the initial launch until the next update of the target application, the shortcut icon can also be displayed by querying the database. After updating to version 2.0 and launching (e.g., launching 2), in response to a long press on the target application's desktop icon (referred to as long press 21 in the image), the phone can query the shortcut information of the target application from the shortcut icon database. It will find and display the shortcut icon corresponding to version 2.0, as shown in interface 506 above. Therefore, after updating the target application and launching, the shortcut icon can also be displayed by querying the database.
[0168] In this way, the phone can uniformly query the database to ensure that shortcut icons are displayed correctly.
[0169] Taking scenario 1 above as an example, the mobile phone can use Figure 11 The process shown demonstrates how to display shortcut icons.
[0170] S1101, In response to a long press on the desktop icon of the target application, the desktop application displays the shortcut menu of the target application.
[0171] For example, the long press operation can be a user's long press operation on the desktop icon 5011 in the interface 501 above, and the shortcut menu can be the shortcut menu 5021 in the interface 502.
[0172] For example, the long press operation can be a user's long press operation on the desktop icon 5011 in the interface 505 above, and the shortcut menu can be the shortcut menu in the interface 506.
[0173] S1102. Desktop application queries the shortcut information of the target application and obtains the shortcut icon of the target application.
[0174] S1103. Desktop applications display a shortcut icon for the target application in the shortcut menu.
[0175] In one specific implementation, only some shortcut icons of the target application are displayed in the shortcut menu. The desktop application can obtain the corresponding icon from the shortcut icons of the target application based on the identifier of the shortcut icon to be displayed in the shortcut menu, such as the class name, and then display it.
[0176] In one specific implementation, the shortcut icons to be displayed in the shortcut menu have a strict order. The desktop application can obtain the corresponding icon from the target application's shortcut icons based on the identifier of the shortcut icon to be displayed in each position in the shortcut menu, such as the class name, and display it in the corresponding position in the shortcut menu.
[0177] use Figure 11 In the S1101 process, there is no distinction between long-press operations after clicking to launch and long-press operations before clicking to launch. This ensures that the correct display of shortcut icons is achieved by uniformly querying the database.
[0178] The long-press action after clicking to launch includes: the long-press action from the first click to the next update of the target app, and the long-press action after the first click to launch from the next update of the target app. The same applies below.
[0179] The long press before launching refers to the long press operation performed after updating the target application and before the next update, before launching it. It should be noted that before the first launch, the phone does not respond to long presses on the target application's home screen icon; therefore, "before launching" typically does not include the initial launch. The same applies below.
[0180] In some embodiments, after clicking "Launch," the phone can directly obtain and display the shortcut icon of the target application via an interface, such as the PM interface. Before clicking "Launch," the phone can query a database to obtain the shortcut information of the target application and use it to display the shortcut icon, ensuring that the shortcut icon is correctly displayed from the time the target application is updated until the time of clicking "Launch" after this update.
[0181] Among these methods, obtaining shortcut icons via API is more efficient than querying a database. Therefore, obtaining shortcut icons via API after clicking "Start" can improve the efficiency of displaying shortcut icons.
[0182] See Figure 12 In the preceding text Figure 8 Building upon the previous method, after the initial launch (e.g., launching 1), in response to a long press on the target application's desktop icon (referred to as long press 11 in the image), the phone can directly retrieve and display the target application's shortcut icon via an interface, as shown in interface 404 above. This improves the efficiency of displaying shortcut icons from the initial launch until the next update of the target application. After updating to version 2.0 and launching (e.g., launching 2), in response to a long press on the target application's desktop icon (referred to as long press 21 in the image), the phone can query the shortcut information of the target application from the shortcut icon database, retrieve the shortcut icon corresponding to version 2.0, and display it, as shown in interface 506 above. This allows the display of shortcut icons after updating the target application and launching it, also by querying the shortcut information in the database.
[0183] In this way, the phone can not only ensure that the shortcut icon is displayed correctly before clicking to launch, but also improve the efficiency of displaying the shortcut icon after clicking to launch.
[0184] Taking scenario 1 from the previous text as an example, the mobile phone can use Figure 13 The process shown demonstrates how to display shortcut icons.
[0185] S1301, In response to a long press operation on the desktop icon of the target application, the desktop application displays the shortcut menu of the target application.
[0186] S1302. Before clicking "Start", the desktop application queries the shortcut information of the target application and obtains the shortcut icon of the target application.
[0187] For example, a user's long-press operation on the desktop icon 5011 in the interface 501 above is a case before clicking "Start".
[0188] S1303. After clicking "Start", the desktop application obtains the shortcut icon of the target application through the PM interface.
[0189] For example, a user's long-press operation on the desktop icon 5011 in the interface 505 above is a case after clicking "Start".
[0190] Therefore, it should be noted that the specific implementation for detecting whether the situation belongs to "before" or "after" the click to launch is not limited in the embodiments of this application. Those skilled in the art can flexibly choose according to actual needs. For example, a desktop application can record the click timestamp of the target application's desktop icon and the update timestamp of the target application, and detect whether the situation belongs to "before" or "after" the click to launch by comparing the timestamps.
[0191] S1304. Desktop applications display a shortcut icon for the target application in the shortcut menu.
[0192] It should be noted that, regarding Figure 13 For details not provided in the implementation description, please refer to the preceding text. Figure 11 The relevant explanations will not be repeated here.
[0193] use Figure 13 The process, in S1302 and S1303, distinguishes between long press operations after clicking to start and long press operations before clicking to start, so that different methods can be used to obtain shortcut icons for different situations.
[0194] This application also provides an electronic device, which may include a display screen, a memory, and one or more processors (such as a CPU, GPU, NPU, etc.). The display screen, memory, and processor are coupled. The memory is used to store computer program code, which includes computer instructions. When the processor executes the computer instructions, the electronic device can perform various functions or steps performed by the device in the above method embodiments.
[0195] like Figure 14 As shown in the illustration, this application also provides a chip system. The chip system 1400 includes at least one processor 1401 and at least one interface circuit 1402. The at least one processor 1401 and the at least one interface circuit 1402 are interconnected via lines. The processor 1401 is used to support an electronic device in implementing the various steps in the above method embodiments, and the at least one interface circuit 1402 can be used to receive signals from other devices (e.g., memory) or to send signals to other devices (e.g., a communication interface). The chip system may include a chip and may also include other discrete devices.
[0196] This application also provides a computer storage medium including instructions that, when executed on the electronic device, cause the electronic device to perform the steps in the above method embodiments.
[0197] This application also provides a computer program product including instructions that, when executed on the electronic device, cause the electronic device to perform the steps in the method embodiments described above.
[0198] The technical effects of the chip system, computer storage medium, and computer program product are similar to those in the preceding method embodiments.
[0199] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0200] Those skilled in the art will recognize that the modules and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0201] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and modules described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0202] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or modules may be electrical, mechanical, or other forms.
[0203] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located on one device or distributed across multiple devices. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0204] In addition, the functional modules in the various embodiments of this application can be integrated into one device, or each module can exist physically separately, or two or more modules can be integrated into one device.
[0205] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software programs, implementation can be entirely or partially in the form of a computer program product. This computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer storage medium or transmitted from one computer storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer storage medium can be any available medium accessible to a computer or a data storage device including one or more servers, data centers, etc., that can be integrated with the medium. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).
[0206] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method of displaying a shortcut icon, characterized by, Applied to electronic devices, the method includes: Display a first interface, which includes a first desktop icon of the target application; At the first moment, in response to the click operation on the first desktop icon, the target application is launched, the first shortcut information of the target application is obtained and stored, and the first shortcut information indicates the correspondence between the shortcuts and shortcut icons of the target application; At a second time point, the target application is updated, the second time point being after the first time point; After the target application is updated, a second interface is displayed, which includes a second desktop icon for the target application. At the third moment, in response to the first operation on the second desktop icon, the first shortcut icon of the target application is queried and displayed based on the first shortcut information; the third moment is after the second moment, and no click operation on the second desktop icon is received between the second moment and the third moment, and the first shortcut icon corresponds to the first shortcut of the target application; Shortcuts refer to quick access points to various sub-functions of an application displayed on an electronic device in response to a long press on a desktop icon.
2. The method according to claim 1, characterized in that, The first operation includes: a long press operation, or a long press and drag operation of the border of the second desktop icon.
3. The method according to claim 1, characterized in that, The first shortcut icon corresponds to the first shortcut of the target application before the update.
4. The method according to any one of claims 1-3, characterized in that, At the third moment, in response to the first operation on the second desktop icon, after querying and displaying the first shortcut icon of the target application based on the first shortcut information, the method further includes: A third interface is displayed, which includes the second desktop icon of the target application; At the fourth moment, in response to the first operation on the second desktop icon, a second shortcut icon for the target application is displayed; During the period between the third and fourth moments, the target application was launched in response to a click on the second desktop icon, and the second shortcut corresponds to the first shortcut.
5. The method according to claim 4, characterized in that, The second shortcut icon corresponds to the first shortcut of the updated target application.
6. The method according to claim 1, characterized in that, The first shortcut information includes the application identifier of the target application, the identifier of the shortcut of the target application, and the correspondence between the shortcut icon and the shortcut icon. The shortcut of the target application includes the first shortcut. The querying and displaying of the first shortcut icon of the target application based on the first shortcut information includes: Query the application identifier of the target application and the identifier of the first shortcut, and display the corresponding first shortcut icon.
7. The method according to claim 6, characterized in that, The first shortcut information also includes the version number of the target application.
8. The method according to claim 4, characterized in that, The method further includes: At a fifth moment between the third and fourth moments, in response to a click operation on the second desktop icon, the second shortcut information of the target application is obtained and stored, wherein the second shortcut information indicates the correspondence between the shortcuts and shortcut icons of the target application; In the fourth moment, in response to the first operation on the second desktop icon, displaying the second shortcut icon of the target application includes: At the fourth moment, in response to the first operation on the second desktop icon, the second shortcut icon of the target application is queried and displayed based on the second shortcut information.
9. The method according to claim 4, characterized in that, In the fourth moment, in response to the first operation on the second desktop icon, displaying the second shortcut icon of the target application includes: At the fourth moment, in response to the first operation on the second desktop icon, the second shortcut icon of the target application is obtained and displayed through an interface call.
10. The method according to claim 9, characterized in that, The interface calls include calls made through the package management PM interface.
11. An electronic device, characterized in that, The device includes one or more processors and a memory coupled to the processors; the memory stores computer program code, which includes instructions; when the instructions are executed by the processor, the electronic device performs the method of any one of claims 1-10.
12. A computer-readable storage medium, characterized in that, Includes instructions that, when executed on an electronic device, cause the electronic device to perform the method of any one of claims 1-10.
13. A computer program product, characterized in that, Includes instructions that, when executed on an electronic device, cause the electronic device to perform the method of any one of claims 1-10.