Application icon processing method and electronic device

By intercepting icon layer images in electronic devices and judging transparency, detecting and replacing hidden icons, the advertising problem caused by users accidentally installing suspicious applications is solved, improving user experience and device performance.

CN118568724BActive Publication Date: 2025-10-10HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411061930.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-05
Publication Date
2025-10-10
Estimated Expiration
2044-08-05

AI Technical Summary

Technical Problem

When users use electronic devices, they may accidentally install suspicious applications, resulting in frequent screen saver and pop-up ads, which affects power consumption and user experience. Suspicious applications prevent uninstallation by hiding icons, and existing technologies have difficulty in effectively detecting hidden icons.

Method used

By obtaining the icon position and intercepting the layer image, the visual transparency condition is combined to determine whether the icon is invisible. The transparency threshold is set to determine whether the icon is a hidden icon, and then replaced with a conspicuous icon and prompt the user.

Benefits of technology

This enables effective detection and management of hidden application icons in electronic devices, improves user experience, and reduces power consumption and lag.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118568724B_ABST
    Figure CN118568724B_ABST
Patent Text Reader

Abstract

The application provides a processing method of an application icon and an electronic device. The method comprises the following steps: firstly, in the case that it is detected that the first application is updated, the position of the first icon in the desktop of the electronic device is acquired, wherein the first icon is the updated icon of the first application; then, based on the position of the first icon, the layer where the first icon is located is intercepted to obtain the screenshot of the first icon; finally, in the case that the screenshot of the first icon meets the preset visual transparency condition, it is determined that the first icon is a hidden icon. Thus, the visual sense of the user is mainly considered, and the transparent visual condition is preset according to whether the icon is invisible enough in the eyes of the user. Therefore, when the application attempts to update the icon, the position of the application icon is photographed, and whether the icon is invisible enough is determined in combination with the transparent visual condition, so that the detection of the hidden application icon in the electronic device is realized.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of electronic devices, and in particular to a processing method of application icons and an electronic device. BACKGROUND

[0002] In the process of using an electronic device (such as a mobile phone), a user may unintentionally install a suspicious application due to a mistaken touch when browsing a webpage or an advertisement, and the like. After that, the mobile phone may frequently display various advertisement screensavers, advertisement pop-up windows, and the like, which not only affects the power consumption of the mobile phone, but also may cause the mobile phone to become laggy, thereby affecting the user experience.

[0003] Currently, a suspicious application may attempt to hide itself by performing some operations to prevent itself from being discovered and uninstalled by a user, such as changing a desktop icon to be transparent, so that the user cannot find the suspicious application on the desktop of the mobile phone and cannot uninstall the suspicious application.

[0004] Therefore, how to detect a hidden icon in an electronic device is a problem that needs to be considered. SUMMARY

[0005] The present application provides a processing method of application icons and an electronic device, which can detect a hidden application icon in an electronic device to a large extent.

[0006] In a first aspect, an embodiment of the present application provides a processing method of application icons, which is applied to an electronic device and includes: in a case where it is detected that a first application has an icon update, obtaining a position of a first icon in a desktop of the electronic device, wherein the first icon is an updated icon of the first application; based on the position of the first icon, intercepting a layer where the first icon is located to obtain a screenshot of the first icon; and in a case where the screenshot of the first icon satisfies a preset visual transparency condition, determining that the first icon is a hidden icon, wherein the satisfaction of the visual transparency condition represents that the first icon is invisible on the desktop of the electronic device.

[0007] In the technical solution of the present application, the visual transparency condition is preset based on whether an icon is invisible enough to human eyes, so that when an application attempts to update an icon, whether the icon is invisible enough can be determined by taking a screenshot of the position of the application icon and combining the visual transparency condition, thereby achieving detection of a hidden application icon in an electronic device.

[0008] Optionally, in a possible implementation manner of the first aspect, before determining the first icon as the hidden icon in the case that the screenshot of the first icon satisfies the preset visual transparency condition, the method further includes: determining the transparency corresponding to each pixel point in the screenshot of the first icon; and determining that the screenshot of the first icon satisfies the visual transparency condition in the case that the proportion of the first pixel points in the total number of pixel points is greater than or equal to a preset proportion threshold, wherein the first pixel points are pixel points in the screenshot of the first icon with a transparency greater than or equal to a preset first transparency threshold. In this way, from the visual perspective, when most of the pixel points in the screenshot of an icon have a high transparency, the icon can be considered as a transparent icon, and the icon is a hidden icon. Therefore, in order to quantify the judgment standard of the hidden icon, the specific judgment standard of the visual transparency condition is set, that is, the icon screenshot in which the proportion of the first pixel points in the total number of pixel points is greater than or equal to the preset proportion threshold is determined as satisfying the visual transparency condition.

[0009] Optionally, in another possible implementation manner of the first aspect, the screenshot of the first icon is obtained by intercepting the layer in which the first icon is located based on the position of the first icon, and the method includes: intercepting the layer in which the first icon is located to obtain a first image, wherein the first image is a complete image of the layer in which the first icon is located; and cutting the first image based on the position of the first icon to obtain the screenshot of the first icon. In this way, the desktop of the electronic device is composed of a plurality of different layers, and each layer is responsible for a part of the image, such as a floating window, wallpaper, icon, navigation bar and the like, and all the layers are superimposed to obtain the content seen by the user. Based on this, only the layer in which the icon is located needs to be intercepted to obtain an image only with the information of the first icon, which is convenient for subsequent analysis of the transparency of the icon screenshot.

[0010] Optionally, in still another possible implementation manner of the first aspect, the first image is obtained by intercepting the layer in which the first icon is located, and the method includes: traversing all the layers displayed on the desktop of the electronic device, and adding all the layers to a first structure; and rendering the layer in which the first icon is located in the first structure to a buffer to generate the first image.

[0011] Optionally, in a further possible implementation manner of the first aspect, the first structure is a clientCompositionLayers structure. The clientCompositionLayers structure is used to describe information related to the composition of graphical layers (such as windows, graphical elements or other visual components), and the clientCompositionLayers structure can be used to manage and render multiple graphical layers, allowing developers to control the display properties of each layer and helping to achieve complex visual effects. After all the layers are added to the clientCompositionLayers structure, all the layers in the clientCompositionLayers structure are rendered into a buffer, thereby generating a screenshot.

[0012] Optionally, in a further possible implementation manner of the first aspect, the first image is cut based on the position of the first icon to obtain the screenshot of the first icon, including: determining a display area of the first icon on the desktop according to the position of the first icon; and cutting the first image according to the display area of the first icon on the desktop to obtain the screenshot of the first icon. After the position of the first icon is obtained, the display area of the first icon on the desktop can be determined according to the position, and the display area can be a pixel coordinate range. By cutting the display area in the first image, a screenshot containing only the first icon can be finally obtained.

[0013] Optionally, in a further possible implementation manner of the first aspect, before the position of the first icon on the desktop of the electronic device is obtained, the method further includes: obtaining resource information (resource) of the first application; determining a pre-configured transparency value of the first icon from the resource information; and correspondingly, obtaining the position of the first icon on the desktop of the electronic device includes: in a case where the pre-configured transparency value of the first icon is less than a preset second transparency threshold, obtaining the position of the first icon on the desktop of the electronic device. Compared with the manner of judging the hidden icon by vision, the detection manner of the icon attribute itself can also be used, that is, the transparency of the whole icon configured in the resource of the new icon is directly detected. If the transparency is high, it indicates that the icon is a hidden icon. Although the detection manner of the icon attribute itself has certain limitations in the detection of hidden icons, it is relatively simple to execute and can be used as a preliminary screening method before the manner of judging the hidden icon by vision, thereby improving the detection efficiency of the hidden icon.

[0014] Optionally, in another possible implementation of the first aspect, the method further includes: determining that the first icon is a hidden icon when the transparency value pre-configured for the first icon is greater than or equal to a preset second transparency threshold. Based on the attributes configured for the icon itself, if an icon is configured with a high transparency, then the icon can be considered relatively transparent and is a hidden icon. Therefore, in order to quantify the criteria for determining whether a hidden icon is a hidden icon, a specific numerical value is pre-set, that is, when the transparency value pre-configured for the first icon is greater than or equal to the specific numerical value, the icon is determined to be a hidden icon.

[0015] Optionally, in another possible implementation of the first aspect, the method further includes: if the first icon is a hidden icon, replacing the first icon with a preset icon, wherein the preset icon does not meet the visual transparency condition. When a hidden icon is detected, a default, more conspicuous preset icon may be used to replace the updated hidden icon, pending user processing.

[0016] Optionally, in another possible implementation of the first aspect, if the first icon is a hidden icon, after replacing the first icon with a preset icon, the method further includes: displaying a prompt message on the desktop of the electronic device, wherein the prompt message is used to inform the user that the icon update of the first application has been blocked. When the first icon is replaced with the preset icon, a pop-up window may also be displayed to notify the application that the icon has changed and has become a hidden icon, waiting for the user to handle it.

[0017] Optionally, in another possible implementation of the first aspect, the desktop of the electronic device is arranged in a grid, and the position of the first icon includes the horizontal and vertical positions of the grid within the desktop where the first icon is located. For example, an electronic device running an Android operating system has a desktop arranged in a grid. Therefore, for any Android application icon, its grid position within the desktop grid can be obtained.

[0018] In a second aspect, an embodiment of the present application provides a device for processing an application icon, which includes a unit composed of software and / or hardware for executing the method for processing an application icon of the first aspect.

[0019] In a third aspect, an embodiment of the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the electronic device can implement any one of the methods of the first aspect described above.

[0020] In a fourth aspect, an embodiment of the present application provides a chip system, which is applied to an electronic device. The chip system includes one or more processors, and the one or more processors are used to call computer instructions to enable the electronic device to execute any one of the methods of the above-mentioned first aspect.

[0021] Optionally, the chip system also includes a memory, which is electrically connected to the processor.

[0022] Optionally, the chip system may further include a communication interface.

[0023] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, which includes instructions. When the instructions are executed on an electronic device, the electronic device can execute any one of the methods of the first aspect above.

[0024] In a sixth aspect, an embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed by an electronic device, the electronic device can implement any one of the methods of the first aspect above. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0026] Figure 1 It is a schematic diagram of an application icon hiding scenario;

[0027] Figure 2 This is a flowchart of a method for processing an application icon provided in an embodiment of the present application;

[0028] Figure 3 This is a schematic diagram of a desktop grid layout provided by an embodiment of the present application;

[0029] Figure 4 This is a schematic diagram of a display of layer overlay provided by an embodiment of the present application;

[0030] Figure 5 This is a flowchart of an application icon processing method provided in an embodiment of the present application;

[0031] Figure 6 This is a block diagram of a software system of an electronic device provided in an embodiment of the present application;

[0032] Figure 7This is a timing interaction diagram of a method for processing an application icon provided in an embodiment of the present application;

[0033] Figure 8 This is a structural diagram of a device for processing application icons provided in an embodiment of the present application;

[0034] Figure 9 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0035] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.

[0036] When using electronic devices (such as mobile phones), such as browsing the web or viewing advertisements, users may inadvertently install suspicious applications through accidental touches. This can cause frequent screensaver and pop-up ads, which not only impact battery life but can even cause the phone to freeze, impacting the user experience. Currently, suspicious applications attempt to hide themselves from users by making their desktop icons transparent, for example, making them invisible and impossible to uninstall.

[0037] Reference Figure 1 , is a schematic diagram of an application's icon hiding scenario. Figure 1 As shown in (a), the desktop of the electronic device is displayed as a blank page. The electronic device can respond to the user's long press and click operation on a certain position on the desktop and display the following Figure 1 The share and uninstall controls shown in (b) above. If these controls appear on the desktop, it indicates that an application actually exists at that location, but the suspicious application is using some methods to hide itself, such as making its desktop icon transparent, to prevent users from discovering and uninstalling it.

[0038] Figure 1 The electronic device in the text takes a mobile phone as an example. It should be understood that in the embodiments of the present application, the electronic device can be a mobile phone, a tablet computer, a wearable device, an in-vehicle device, an augmented reality (AR) / virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), etc. The embodiments of the present application do not limit the specific type of electronic device.

[0039] In some conventional solutions, the self-attribute of the icon (such as icon transparency, icon foreground, background transparency, etc.) is detected to determine whether the icon is hidden. However, suspicious applications may use various methods to hide icons, such as using a 1-pixel Portable Network Graphics (PNG) file as an icon, or using a transparent color icon, etc. Such hidden icons can only be detected by a detection method corresponding to the method used to hide the icon, and cannot be directly determined by detecting the self-attribute of the icon. Meanwhile, with the continuous development of technology, there may be new icon hiding methods in the future. In this case, the detection method based on the self-attribute of the icon will always lag behind the developers of suspicious applications.

[0040] Therefore, an embodiment of the present application provides a processing method of an application icon, which mainly starts from the visual sense of a user, and sets a transparent visual condition in advance according to whether the icon is invisible enough to the human eye. In this way, when an application attempts to update an icon, the position of the application icon can be captured, and whether the icon is invisible enough can be determined by combining the transparent visual condition, so as to detect the hidden application icon in the electronic device.

[0041] Reference Figure 2 Fig. 1 shows a flowchart of a processing method of an application icon provided by an embodiment of the present application. The following describes each step shown in Fig. 1. Figure 2

[0042] In step 201, the position of a first icon in the desktop of an electronic device is acquired when it is detected that a first application has icon update.

[0043] The first application is any application in the desktop of the electronic device that has icon update, and the first icon is the icon of the first application after update. In the scenarios of application installation, update, enabling components, disabling components, etc., the icon of the application may change. For example, a social media application introduces a new brand image in a new version, and the developer may update the application icon to be consistent with the new brand logo.

[0044] It should be noted that for a given application (in this embodiment, the application that has icon update), the position of the application on the desktop can be acquired. The following describes two ways to acquire the position of the first icon.

[0045] In one embodiment, the desktop of the electronic device is arranged in a grid form, and the position of the first icon includes the horizontal grid position and the vertical grid position of the first icon in the desktop. For example, an electronic device running an Android operating system has a desktop arranged in a grid form. Referring to Fig. 2, the desktop of the electronic device is arranged in a grid form, and the position of the first icon in the desktop includes the horizontal grid position and the vertical grid position of the first icon in the desktop. Figure 3 ,​ Figure 3 A schematic diagram of a desktop grid layout is shown in FIG. Figure 3 As shown, for any Android application icon, its grid position on the desktop grid can be obtained. Each electronic device's desktop applications correspond to a launcher database (launcher.database, launcher.db) file. This file stores the grid position of each application icon and information about the application itself. For example, the information contained in the launcher.db file can be found in Table 1.

[0046] Table 1

[0047]

[0048] Table 1 shows at least some information contained in a launcher.db file, including application name (title), screen (screen) index, grid horizontal position (cellX), grid vertical position (cellY), number of cells occupied in the horizontal direction (spanX), number of cells occupied in the vertical direction (spanY). Figure 3 The application icons on the desktop of the electronic device correspond one to one. Figure 3 As shown in Table 1, taking the clock application as an example, the clock application is on the desktop, its horizontal position in the grid of the second screen is 0, its vertical position is 0, and the number of cells occupied in the horizontal and vertical directions is 1.

[0049] In another embodiment, the specific coordinates of each grid on the desktop can also be obtained through the launcher.getworkspace().getChildAt(screenID) method. Specifically, the launcher.getworkspace().getChildAt(screenID) method is used to obtain the layout view (CellLayout) of the specified screen (screenID). CellLayout is a custom view class. The CellLayout class is typically used to implement the application icon grid on the desktop. The CellLayout class is responsible for managing the arrangement and position of icons, as well as switching between different screens. Each CellLayout represents a screen or page, containing multiple grids (cells), each of which can hold an application icon.

[0050] Step 202: Based on the position of the first icon, the layer where the first icon is located is captured to obtain a screenshot of the first icon.

[0051] It should be noted that the desktop of an electronic device is composed of many different layers. Each layer is responsible for a part of the image, such as floating windows, wallpapers, icons, navigation bars, etc. All layers are superimposed to obtain the content that the user sees. Figure 4 , Figure 4 A schematic diagram of layer overlay display is shown. Figure 4 As shown, Figure 4 (a) in the middle is the layer where the floating window is located. Figure 4 (b) in the middle is the layer where the icon is located. Figure 4 The middle (c) is the layer where the wallpaper is located. Figure 4 The three layers (a), (b) and (c) are superimposed to obtain the content that the user sees, such as Figure 4 Based on this, if we can directly take a screenshot from the layer where the icon is located, the resulting image will only contain the information of the first icon, which will facilitate the subsequent analysis of the transparency of the icon screenshot.

[0052] In one embodiment, the layer where the first icon is located can be firstly captured to obtain a first image, wherein the first image is a complete image of the layer where the first icon is located. Then, the first image can be cropped according to the position of the first icon to obtain a screenshot of only the first icon.

[0053] The following describes the screenshot process using the Android system as an example: A screenshot request is typically initiated through the captureScreenCommon method in the SurfaceFlinger service, which handles the basic logic of capturing a screenshot, including obtaining the current screen content. Within captureScreenCommon, the renderScreenImplLocked method is called, which renders the screen content in a locked state to ensure that no other threads can modify the displayed content during the rendering process. Next, within renderScreenImplLocked, the traverseLayer function is called to traverse all currently displayed layers. As traverseLayer traverses each layer, it adds the layer to the clientCompositionLayers structure. The clientCompositionLayers structure records all layers to be rendered and describes information related to the composition of graphics layers (such as windows, graphic elements, or other visual components). The clientCompositionLayers structure can be used to manage and render multiple graphics layers, allowing developers to control the display properties of each layer and help achieve complex visual effects. The getRenderEngine().drawlayers method is then called, which uses the Open Graphics Library (OpenGL) to render all layers in the clientCompositionLayers structure into a buffer, which ultimately contains the image data for the current screen. After rendering, the image data in the buffer can be converted to an image file, such as a PNG or JPEG (Joint Photographic Experts Group) format, to generate the final screenshot.

[0054] It should be noted that in the layer rendering process in the screenshot process, you can choose to render all layers or you can choose to render a single layer. Therefore, if only the layers related to the icon in the structure are rendered into the buffer in the screenshot process, then a screenshot of the layer where the icon is located will be generated. Therefore, as a possible implementation method of the present application, the above-mentioned interception of the layer where the first icon is located to obtain the first image may include: traversing all layers displayed on the desktop of the electronic device, and adding all layers to the first structure; rendering the layer where the first icon is located in the first structure into the buffer to generate the first image.

[0055] In one embodiment, the first structure may be a clientCompositionLayers structure.

[0056] In one embodiment, the above-mentioned cutting of the first image based on the position of the first icon to obtain a screenshot of the first icon may include: determining the display area of ​​the first icon on the desktop according to the position of the first icon; and cutting the first image according to the display area of ​​the first icon on the desktop to obtain a screenshot of the first icon.

[0057] It should be noted that after obtaining the position of the first icon, the display area of ​​the first icon on the desktop can be determined based on the position. The display area can be a pixel coordinate range. By cutting the display area in the first image, a screenshot containing only the first icon can be obtained. Figure 3 Taking the desktop shown as an example, assuming you want to cut the icon of the clock application, first take a screenshot of the layer where the icon is located. The first image obtained contains icons of multiple applications such as clock, calendar, gallery, memo, file management, email, music, calculator, video, sports and health, weather, browser, smart life, settings, recorder and application store. Then, based on the position of the clock icon (cellX=0, cellY=0), you can determine the display area corresponding to the clock icon (the dotted box where the clock icon is located). After determining the display area, you can further cut the first image to get a screenshot containing only the clock icon.

[0058] Step 203: If the screenshot of the first icon meets a preset visual transparency condition, determine that the first icon is a hidden icon.

[0059] Wherein, satisfying the visual transparency condition indicates that the first icon is invisible on the desktop of the electronic device.

[0060] In the embodiment of the present application, unlike the traditional detection method based on the icon's own properties, the visual transparency condition is pre-set based on the user's visual sense and whether the icon is sufficiently invisible to the human eye. In this way, no matter which method is used to modify the icon, as long as the visual transparency condition is met, it means that the icon is a hidden icon.

[0061] In one embodiment, the transparency corresponding to each pixel in the screenshot of the first icon can be first determined. For the sake of convenience, the pixel in the screenshot of the first icon whose transparency is greater than or equal to the preset first transparency threshold is referred to as the first pixel. When the proportion of the number of first pixels in the icon screenshot to the total number of pixels is greater than or equal to the preset ratio threshold, it is determined that the screenshot of the first icon meets the visual transparency condition. Therefore, from a visual perspective, when the transparency of most pixels in the screenshot of an icon is a high value, it can be considered that the icon is relatively transparent and the icon is a hidden icon. Therefore, in order to quantify the judgment criteria for hidden icons, a specific judgment criteria for visual transparency conditions is set, that is, icon screenshots in which the proportion of the number of first pixels to the total number of pixels is greater than or equal to the preset ratio threshold are determined to meet the visual transparency condition.

[0062] It should be noted that in display files, transparency information is typically represented by the alpha component. Graphics development and processing tools (such as the GIMP Toolkit and GTK, a suite of cross-platform graphics toolkits) typically generate RGBA (red, green, blue, and alpha, representing all computer colors using a combination of red, green, blue, and alpha) alpha components with transparency. A larger alpha value indicates greater transparency.

[0063] For example, assuming an A value of 100 indicates complete transparency and an A value of 0 indicates complete opacity, then an A value of 90 can be considered relatively transparent, and an A value of 10 is slightly transparent. If a large portion (for example, more than half) of the pixels in the entire icon have A values ​​corresponding to completely transparent or relatively transparent (i.e., between 90 and 100), then the icon can be considered a hidden icon. The following is a more specific example. An icon screenshot contains 200 pixels, which corresponds to 200 A values. The preset first transparency threshold is 90, and the preset ratio threshold is 0.5. If there are more than 200×0.5=100 pixels whose A values ​​are greater than or equal to the first transparency threshold of 90, that is, more than 100 pixels are at least relatively transparent, then the icon screenshot is considered a hidden icon.

[0064] It should be understood that the preset first transparency threshold and the preset ratio threshold can be set in combination with actual application scenarios and requirements, and the embodiments of the present application do not limit this.

[0065] Step 204: If the first icon is a hidden icon, replace the first icon with a preset icon.

[0066] Among them, if it is detected that the updated icon is a hidden icon, the default more conspicuous preset icon can be used to replace the hidden icon, waiting for the user to handle it. The preset icon does not meet the visual transparency condition, such as the default green robot icon of the Android system.

[0067] In one embodiment, when the first icon is replaced with the preset icon, a pop-up window may be displayed simultaneously to notify the application that the icon has changed and has become a hidden icon, waiting for the user to process it. That is, a prompt message is displayed on the desktop of the electronic device, wherein the prompt message is used to inform the user that the icon update of the first application has been blocked. For example, a pop-up window may be displayed on the desktop of the electronic device to notify the user that "an application attempted to change to a transparent icon, but was blocked by the system."

[0068] In another embodiment, when the first icon is detected as a hidden icon, the first application can also be determined as a suspicious application. The electronic device can regularly summarize the detected suspicious applications and prompt the user so that the user can uninstall the suspicious applications in a unified manner.

[0069] The method for processing application icons provided in the above embodiment of the present application first obtains the position of the first icon on the desktop of the electronic device when it is detected that the icon of the first application has been updated, wherein the first icon is the icon after the first application is updated; then, based on the position of the first icon, the layer where the first icon is located is intercepted to obtain a screenshot of the first icon; finally, when the screenshot of the first icon meets a preset visual transparency condition, the first icon is determined to be a hidden icon, wherein meeting the visual transparency condition indicates that the first icon is invisible on the desktop of the electronic device. Therefore, mainly starting from the user's visual sense, the transparent visual condition is pre-set based on whether the icon is sufficiently invisible to the human eye. In this way, when the application attempts to update the icon, it can take a screenshot of the location of the application icon and judge whether the icon is sufficiently invisible in combination with the transparent visual condition, thereby realizing the detection of hidden application icons in the electronic device.

[0070] Compared with the aforementioned method of visually judging hidden icons, a detection method for the icon's own attributes can also be used, that is, directly detecting the overall transparency value (alpha value) of the icon configured in the resource of the new icon (i.e., the first icon). If the transparency is low, the scheme described in the aforementioned embodiment can be continued to perform further detection. Although this detection method for the icon's own attributes has certain limitations in the detection of hidden icons, it is relatively simple to implement and can be used as a preliminary screening method before the aforementioned step 201, which can improve the detection efficiency of hidden icons. That is, as a possible implementation method of the present application, before executing the aforementioned embodiment, the resource information (resource) of the first application can also be obtained; from the resource, the pre-configured transparency value of the first icon can be determined; accordingly, when the pre-configured transparency value of the first icon is less than the preset second transparency threshold, step 201 and subsequent steps can be continued.

[0071] Of course, if the overall transparency of the icon configured in the resource of the new icon is high, it means that the icon is a hidden icon. Subsequently, the measures described in the above embodiment can be taken to replace the hidden icon with a preset icon, and to use a pop-up window to notify the user. That is, as another possible implementation of the present application, when the pre-configured transparency value of the first icon is greater than or equal to the preset second transparency threshold, the first icon is determined to be a hidden icon.

[0072] Among them, starting from the properties configured by the icon itself, if the transparency of an icon is high, then it can be considered that the icon is relatively transparent and the icon is a hidden icon. For example, assuming that a transparency value of 100 represents complete transparency and a transparency value of 0 represents complete opacity, the second transparency threshold can be 90. When the transparency value configured in the resource of the icon is greater than or equal to 90, the icon is determined to be a hidden icon. For another example, if the transparency value configured in the resource of an icon is the maximum value of 100, then the icon can be directly considered to be a hidden icon.

[0073] It should be understood that in order to quantify the criteria for determining whether a hidden icon is a hidden icon, a specific numerical value is pre-set, that is, the second transparency threshold can be set in combination with actual application scenarios and needs, and the embodiments of the present application do not impose any restrictions on this. In one embodiment, when the pre-configured transparency value of the first icon is greater than or equal to the second transparency threshold, the first icon is determined to be a hidden icon.

[0074] Figure 5 The following is an example flow chart of a method for processing an application icon provided by an embodiment of the present application. Figure 5 The steps shown are introduced.

[0075] Step 501: Detect that an application icon is updated.

[0076] Among them, the application icon may change in scenarios such as application installation, update, component activation, and component disabling.

[0077] Step 502: Obtain the transparency value (alpha value) corresponding to the resource information (resource) of the updated application icon.

[0078] Step 503 , determining whether the transparency value exceeds a second transparency threshold, if so, executing step 507 , if not, executing step 504 .

[0079] Here, a traditional method of detecting the icon's own properties is first used, that is, directly detecting the transparency value configured in the resource of the new icon. If the transparency value is greater than or equal to the second transparency threshold, it indicates that the icon's overall transparency is high, and step 507 is executed. If the transparency value is less than the second transparency threshold, it indicates that the icon's overall transparency is low, and the method of hiding the icon by using the icon's alpha value may not be used. The subsequent detection process continues and executes step 504. The new icon here is the icon after the application icon is changed, that is, the first icon mentioned above.

[0080] For example, assuming that a transparency value of 100 indicates complete transparency and a transparency value of 0 indicates complete opacity, the second transparency threshold may be 90. When the transparency value configured in the icon's resource is greater than or equal to 90, the icon is determined to be a hidden icon. For another example, if the transparency value configured in an icon's resource is the maximum value of 100, the icon may be directly considered a hidden icon.

[0081] Step 504: Obtain the position of the first icon on the desktop of the electronic device.

[0082] Step 505 : Based on the position of the first icon, the layer corresponding to the icon is captured to obtain an icon screenshot.

[0083] In one embodiment, the layer where the first icon is located can be firstly captured to obtain a first image, wherein the first image is a complete image of the layer where the first icon is located. Then, the first image can be cropped according to the position of the first icon to obtain a screenshot of only the first icon.

[0084] It should be noted that in the layer rendering process in the screenshot process, you can choose to render all layers or you can choose to render a single layer. Therefore, if only the layers related to the icon in the structure are rendered into the buffer in the screenshot process, then a screenshot of the layer where the icon is located will be generated. Therefore, as a possible implementation method of the present application, the above-mentioned interception of the layer where the first icon is located to obtain the first image may include: traversing all layers displayed on the desktop of the electronic device, and adding all layers to the first structure; rendering the layer where the first icon is located in the first structure into the buffer to generate the first image.

[0085] In one embodiment, the above-mentioned cutting of the first image based on the position of the first icon to obtain a screenshot of the first icon may include: determining the display area of ​​the first icon on the desktop according to the position of the first icon; and cutting the first image according to the display area of ​​the first icon on the desktop to obtain a screenshot of the first icon.

[0086] It should be noted that after obtaining the position of the first icon, the display area of ​​the first icon on the desktop can be determined based on the position. The display area can be a pixel coordinate range. By cutting the display area in the first image, a screenshot containing only the first icon can be obtained.

[0087] Step 506 , determining whether the icon screenshot meets the visual transparency condition, if so, executing step 507 , if not, executing step 509 .

[0088] From a visual perspective, when the transparency of most pixels in an icon screenshot is relatively high, the icon can be considered relatively transparent and is a hidden icon. Therefore, in order to quantify the criteria for determining hidden icons, a specific criterion for visual transparency is set. That is, if the ratio of the number of first pixels (pixels with a transparency greater than or equal to a preset first transparency threshold) to the total number of pixels in the icon screenshot is greater than or equal to a preset ratio threshold, the icon screenshot is determined to meet the visual transparency condition, and step 507 is then executed. Conversely, if the ratio of the number of first pixels to the total number of pixels in the icon screenshot is less than the preset ratio threshold, the visual transparency condition is not met, and step 509 is then executed.

[0089] Step 507: Determine whether the first icon is a hidden icon.

[0090] Step 508: Replace the first icon with a preset icon, display a prompt message on the desktop, and end the process.

[0091] Among them, if it is detected that the updated icon is a hidden icon, the default more conspicuous preset icon can be used to replace the hidden icon, waiting for the user to handle it. The preset icon does not meet the visual transparency condition, such as the default green robot icon of the Android system.

[0092] In one embodiment, when the first icon is replaced with the preset icon, a pop-up window may be displayed simultaneously to notify the application that the icon has changed and has become a hidden icon, waiting for the user to process it. That is, a prompt message is displayed on the desktop of the electronic device, wherein the prompt message is used to inform the user that the icon update of the first application has been blocked. For example, a pop-up window may be displayed on the desktop of the electronic device to notify the user that "an application attempted to change to a transparent icon, but was blocked by the system."

[0093] Step 509: Determine whether the first icon is a non-hidden icon, and the process ends.

[0094] The application icon processing method provided in the above embodiment of the present application, when an application icon is updated, first uses a simple traditional detection method, that is, the detection method for the icon's own attributes in steps 502-503, to perform a preliminary detection. Although this detection method has certain limitations in detecting hidden icons, it is relatively simple to implement and helps improve detection efficiency. For more accurate detection, if the traditional detection method fails to detect, the visual detection scheme based on vision is further adopted in steps 504-506. It mainly takes into account the user's visual sense and pre-sets the transparent visual condition based on whether the icon is sufficiently invisible to the human eye. In this way, when the application attempts to update the icon, it can take a screenshot of the location of the application icon and determine whether the icon is sufficiently invisible based on the transparent visual condition, thereby realizing the detection of hidden application icons in the electronic device. This detection method can detect all possible icon hiding situations. The above embodiment combines efficiency and accuracy. If a hidden icon is detected by the two detection methods, the application icon can be replaced with a fixed visible icon, and a pop-up window notifies the user that the application icon has changed and has become a transparent icon, waiting for the user to handle it.

[0095] In some embodiments, the above-mentioned application icon processing method can be applied to applications including Figure 6 On electronic devices with the software system shown, see Figure 6 The layered architecture of electronic devices divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other via software interfaces. In some embodiments, the Android system is divided into four layers: from top to bottom, the application layer, the application framework layer, the Android runtime layer, the system layer, and the kernel layer.

[0096] The application layer can include a series of application packages. As shown in Figure 6 the application packages can include first applications, camera, gallery, calendar, call, map, navigation, wireless local area network (WLAN), Bluetooth, music, video, short message, etc.

[0097] In addition, as shown in Figure 6 the application layer can also include a desktop launcher (Launcher). The Launcher is a desktop system application of the electronic device, which is a system-level application.

[0098] The application framework layer provides application programming interfaces (APIs) and programming frameworks for the applications of the application layer. The application framework layer includes some pre-defined functions. As shown in Figure 6 the application framework layer can include an application package management service (PackageManagerService, PKMS for short), a surface composition service (SurfaceFlinger), etc.

[0099] Among them, the installation, update, start / stop component, etc. of any application will cause the behavior of the icon to change, which will call a corresponding API in the PackageManagerService. The request for screenshots is usually initiated through the captureScreenCommon method in the SurfaceFlinger service, which is responsible for handling the basic logic of screenshots, including obtaining the content of the current screen.

[0100] In addition, the application framework layer can include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, etc. Figure 6(not shown in the figure). The window manager is used to manage window programs. The window manager can obtain the display size, determine whether there is a status bar, lock the screen, take screenshots, etc. The content provider is used to store and obtain data and make this data accessible to applications. This data can include video, images, audio, dialed and received calls, browsing history and bookmarks, phone books, etc. The view system includes visual controls, such as controls for displaying text and controls for displaying images. The view system can be used to build the display interface of the application. The display interface can be composed of one or more views, such as a view that displays a text message notification icon, a view that displays text, and a view that displays images. The phone manager is used to provide communication functions for electronic devices, such as managing call status (including answering, hanging up, etc.). The resource manager provides various resources to applications, such as localized strings, icons, images, layout files, video files, etc. The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can automatically disappear after a short period of time without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. A notification manager can also be a notification that appears in the system's top status bar as an icon or scrolling text bar, such as a notification from an application running in the background. A notification manager can also be a notification that appears on the screen as a dialog window, such as a text message in the status bar, a beep, a vibration on an electronic device, a flashing indicator light, etc.

[0101] The Android runtime consists of core libraries and a virtual machine (VM). The Android runtime is responsible for scheduling and management of the Android system. The core library consists of two parts: one for Java-based functions and the other for the Android core library. The application layer and application framework layer run in the VM. The VM executes Java files from the application layer and application framework layer as binary files. The VM is responsible for performing functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.

[0102] The system layer can include multiple functional modules, such as: surface manager, media libraries, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc. The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications. The media library supports playback and recording of a variety of common audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding 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. The 2D graphics engine is a drawing engine for 2D drawing.

[0103] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, camera driver, audio driver, and sensor driver.

[0104] In the above Figure 6 Based on the software architecture shown, Figure 7 A timing interaction diagram of a method for processing an application icon provided by an embodiment of the present application is shown below. Figure 7 The steps shown are introduced.

[0105] Step 701: The application icon changes.

[0106] It should be noted that any new installation, update, startup, disabling of components, and other behaviors of an application that will cause the icon to change will call a corresponding API in the application package management service (PackageManagerService).

[0107] In step 702 , the application package management service calls different functions in the desktop launcher (Launcher) according to the application behavior corresponding to the icon change to respond to the icon change.

[0108] PackageManagerService is a core service in the Android system, responsible for managing the lifecycle and state of applications, including installation, uninstallation, updates, and queries. After receiving the API call described in step 701, PackageManagerService calls different functions based on the API. However, because these functions are all icon-related, they all call the packageUpdatedTask function in the Launcher. This function primarily handles tasks required after an application update.

[0109] For example, when the icon change corresponds to an install application behavior, the PackageManagerService can call the packageadd function API in the Launcher based on the install application behavior. When the application behavior is an application upgrade, the PackageManagerService can call the update function API in the Launcher based on the application upgrade application behavior. When the application behavior is an icon update, the PackageManagerService can call the setcomponentenable function API in the Launcher based on the icon update application behavior.

[0110] At step 703, the desktop launcher calls different functions based on the information transmitted by the application package management service to display the new icon on the desktop.

[0111] Here, the new icon is the icon after the change of the application icon, i.e., the first icon described above.

[0112] It should be noted that the information transmitted by the PackageManagerService when calling the function includes the specific application behavior of the icon change. The Launcher can call different functions of the packageUpdateTask based on the packageManagerService, and then the desktop application Launcher displays the new icon on the desktop through loadworkspace or bindworkspace. The loadworkspace and bindworkspace are used to manage and display the icons and other related user interface elements of the application, and can ensure that the desktop interface correctly reflects the current application state when the application state changes (such as installation, update, or uninstallation).

[0113] At step 704, the desktop launcher queries the launcher database (launcher.db) file based on the information transmitted by the application package management service to obtain the resource information of the application icon.

[0114] Here, after the new icon is displayed, the Launcher determines which application displays the new icon based on the information (package / component) transmitted by the packageManagerService, and queries the launcher.db to obtain the resource information of the icon corresponding to the application.

[0115] At step 705, the desktop launcher reads the resource information of the application.

[0116] Step 706 , the desktop launcher obtains resource information and determines whether the transparency value exceeds a second transparency threshold. If so, the process jumps to step 713 , otherwise, the process jumps to step 707 .

[0117] Among them, the traditional method of detecting the icon's own properties is first adopted, that is, directly detecting the configured transparency in the resource of the new icon. If the transparency is greater than or equal to the second transparency threshold, it means that the overall transparency of the icon is high, and step 713 is executed; if the transparency is less than the second transparency threshold, it means that the overall transparency of the icon is low, and it may not be a way to hide the icon by configuring the alpha value of the icon. Continue to execute the subsequent vision-based detection process and execute step 707.

[0118] Step 707: The desktop launcher obtains the location of the first icon according to the information passed in by the application package management service.

[0119] Among them, Launcher searches for the icon that has been updated from launcher.db according to the information passed in by packageManagerService, and obtains the position of the icon on the desktop, that is, the horizontal position cellX and the vertical position cellY of the grid.

[0120] In step 708 , the desktop launcher determines the display area of ​​the icon on the desktop based on the position of the first icon, and sends a screenshot instruction of the layer where the icon is located to the surface compositing service (SurfaceFlinger).

[0121] Among them, Launcher obtains the display area of ​​the icon on the screen where the icon changes according to the position of the icon and the obtained cellLayout class. The display area can be a pixel coordinate range, and then sends a screenshot instruction of the layer where the icon is located to the SurfaceFlinger service.

[0122] Step 709 : The surface composition service takes a screenshot of the layer where the icon is located based on the request received from the desktop launcher, and transmits the screenshot back to the desktop launcher.

[0123] Screenshot requests are typically initiated through the captureScreenCommon method in the SurfaceFlinger service, which handles the basic logic of taking screenshots, including obtaining the current screen content. After receiving the screenshot command from the Launcher, the SurfaceFlinger service captures the layer corresponding to the icon and returns the screenshot result to the Launcher.

[0124] In step 710 , the desktop launcher cuts the screenshot of the layer where the icon is located based on the display area to obtain an icon screenshot.

[0125] Among them, the Launcher cuts the screenshot of the layer where the icon is located based on the screenshot of the layer where the icon is located returned in step 709 and the pixel coordinate range obtained in step 708. The cut screenshot only has the visual effect of the changed icon.

[0126] In step 711 , the Launcher determines whether the icon screenshot meets the visual transparency condition. If so, step 713 is executed; otherwise, step 712 is executed.

[0127] From a visual perspective, when the transparency of most pixels in an icon screenshot is relatively high, the icon can be considered relatively transparent and is a hidden icon. Therefore, in order to quantify the criteria for determining hidden icons, a specific judgment standard for visual transparency conditions is set. That is, if the ratio of the number of first pixels (pixels with a transparency greater than or equal to a preset first transparency threshold) to the total number of pixels in the icon screenshot is greater than or equal to a preset ratio threshold, the icon screenshot is determined to meet the visual transparency condition, and step 506 is then executed. Conversely, if the ratio of the number of first pixels to the total number of pixels in the icon screenshot is less than the preset ratio threshold, the visual transparency condition is not met, and step 508 is then executed.

[0128] Step 712: If the visual transparency condition is not met, the process ends.

[0129] In step 713, if the visual transparency condition is met, the desktop launcher replaces the new icon in step 703 with a preset icon and displays a prompt message on the desktop.

[0130] Among them, if it is detected that the updated icon is a hidden icon, the default more conspicuous preset icon can be used to replace the hidden icon, waiting for the user to handle it. The preset icon does not meet the visual transparency condition, such as the default green robot icon of the Android system.

[0131] In one embodiment, when the first icon is replaced with the preset icon, a pop-up window may be displayed simultaneously to notify the application that the icon has changed and has become a hidden icon, waiting for the user to process it. That is, a prompt message is displayed on the desktop of the electronic device, wherein the prompt message is used to inform the user that the icon update of the first application has been blocked. For example, a pop-up window may be displayed on the desktop of the electronic device to notify the user that "an application attempted to change to a transparent icon, but was blocked by the system."

[0132] Therefore, when an application icon is updated, a preliminary detection is first performed using a detection method based on the icon's own attributes. Although this detection method has certain limitations in detecting hidden icons, it is relatively simple to implement and helps improve detection efficiency. In order to perform more accurate detection, if the traditional detection method fails to detect it, a vision-based detection solution is further adopted. This mainly starts from the user's visual senses and pre-sets transparent visual conditions based on whether the icon is sufficiently invisible to the human eye. In this way, when the application tries to update the icon, it can take a screenshot of the location of the application icon and judge whether the icon is sufficiently invisible based on the transparent visual conditions, thereby realizing the detection of hidden application icons in electronic devices. This detection method can detect all possible icon hiding situations. The above embodiment combines efficiency and accuracy. If a hidden icon is detected by the two detection methods, the icon of the application can be replaced with a fixed visible icon, and a pop-up window will notify the user that the application icon has changed and has become a transparent icon, waiting for the user to process it.

[0133] The above mainly introduces the method of the embodiment of the present application in conjunction with the accompanying drawings. It should be understood that although the various steps in the flowcharts involved in the various embodiments described above are shown in sequence, these steps are not necessarily performed in sequence in the order shown in the figures. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be performed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above may include multiple steps or multiple stages, and these steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of the steps or stages in other steps. The device of the embodiment of the present application is introduced below in conjunction with the accompanying drawings.

[0134] Reference Figure 8 , is a structural diagram of a device for processing application icons provided in an embodiment of the present application. For ease of explanation, only the parts related to the embodiment of the present application are shown. Figure 8 As shown, the application icon processing device 800 includes an acquisition unit 801 and a processing unit 802. The application icon processing device 800 can be integrated into an electronic device. For another example, the application icon processing device 800 can also be used to execute Figure 2 、 Figure 5 or Figure 7 The process shown.

[0135] The application icon processing device 800 can be used to execute any of the above application icon processing methods. For example, the acquisition unit 801 can be used to execute step 201, the processing unit 802 can be used to execute steps 202-203, and the processing unit 802 can also be used to execute step 204.

[0136] The application icon processing device provided in the embodiment of the present application first obtains the position of the first icon on the desktop of the electronic device when it detects that an icon update has occurred in the first application, wherein the first icon is the icon after the first application is updated; then, based on the position of the first icon, the layer where the first icon is located is intercepted to obtain a screenshot of the first icon; finally, when the screenshot of the first icon meets a preset visual transparency condition, the first icon is determined to be a hidden icon, wherein meeting the visual transparency condition indicates that the first icon is invisible on the desktop of the electronic device. Therefore, mainly starting from the user's visual sense, the transparent visual condition is pre-set based on whether the icon is sufficiently invisible to the human eye. In this way, when the application attempts to update the icon, it can take a screenshot of the location of the application icon and judge whether the icon is sufficiently invisible in combination with the transparent visual condition, thereby realizing the detection of hidden application icons in the electronic device.

[0137] It should be noted that the above explanation of the embodiment of the method for processing application icons is also applicable to the application icon processing device 800 of this embodiment, and will not be repeated here.

[0138] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0139] Figure 9 FIG is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application. Figure 9As shown, the electronic device 900 may include a processor (central processing unit, CPU) 910, an external memory interface 920, an internal memory 921, a universal serial bus (USB) interface 930, a charging management module 940, a power management module 941, a battery 942, an antenna 1, an antenna 2, a mobile communication module 950, a wireless communication module 960, an audio module 970, a speaker 970A, a receiver 970B, a microphone 970C, an earphone interface 970D, a sensor module 980, a button 990, a motor 991, an indicator 992, a camera 993, a display screen 994, and a subscriber identification module (SIM) card interface 995, etc. The sensor module 980 may include a pressure sensor 980A, a gyroscope sensor 980B, an air pressure sensor 980C, a magnetic sensor 980D, an acceleration sensor 980E, a distance sensor 980F, a proximity sensor 980G, a fingerprint sensor 980H, a temperature sensor 980J, a touch sensor 980K, an ambient light sensor 980L, a bone conduction sensor 980M, etc. It should be understood that the steps in the aforementioned method embodiments are executed by the processor 910 of the electronic device.

[0140] It should be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 900. In other embodiments of the present application, the electronic device 900 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0141] For example, Figure 9 The processor 910 shown may include one or more processing units. For example, the processor 910 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). The different processing units may be independent devices or integrated into one or more processors.

[0142] The controller may be the nerve center and command center of the electronic device 900. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0143] Processor 910 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 910 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 910. If processor 910 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 910 latency, and thus improves system efficiency.

[0144] In some embodiments, a MIPI interface can be used to connect the processor 910 to peripheral devices such as the display 994 and the camera 993. MIPI interfaces include the camera serial interface (CSI) and the display serial interface (DSI). The processor 910 and the display 994 communicate via the DSI interface to implement the display function of the electronic device 900.

[0145] In some embodiments, the GPIO interface can be configured via software. The GPIO interface can be configured as a control signal or a data signal. The GPIO interface can be used to connect the processor 910 to the camera 993, display 994, wireless communication module 960, audio module 970, sensor module 980, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0146] It is understood that the interface connection relationship between the modules illustrated in the embodiment of the present application is merely an illustrative illustration and does not constitute a structural limitation on the electronic device 900. In other embodiments of the present application, the electronic device 900 may also adopt a different interface connection method from the above embodiment, or a combination of multiple interface connection methods.

[0147] Electronic device 900 implements display functionality through a GPU, display screen 994, and an application processor. The GPU is a microprocessor for image processing that connects display screen 994 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 910 may include one or more GPUs that execute program instructions to generate or modify display information.

[0148] The display screen 994 is used to display images, videos, etc. The display screen 994 includes a display panel. In some embodiments, the electronic device 900 may include one or N display screens 994, where N is a positive integer greater than one.

[0149] The internal memory 921 can be used to store computer executable program code, which includes instructions. The processor 910 executes various functional applications and data processing of the electronic device 900 by running the instructions stored in the internal memory 921. The internal memory 921 may include a program storage area and a data storage area. The program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 900 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 921 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0150] Pressure sensor 980A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 980A can be located on display screen 994. There are many types of pressure sensors 980A, such as resistive, inductive, and capacitive. A capacitive pressure sensor can include at least two parallel plates made of conductive material. When force is applied to pressure sensor 980A, the capacitance between the electrodes changes. Electronic device 900 determines the intensity of the pressure based on this change in capacitance. When a touch operation is applied to display screen 994, electronic device 900 detects the intensity of the touch operation using pressure sensor 980A. Electronic device 900 can also calculate the location of the touch based on the detection signal from pressure sensor 980A. In some embodiments, touch operations applied to the same touch location but with different touch intensities can correspond to different operation instructions. For example, when a touch operation with an intensity less than a first pressure threshold is applied to a short message application icon, an instruction to view short messages is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to a short message application icon, an instruction to create a new short message is executed.

[0151] The touch sensor 980K is also called a "touch panel." The touch sensor 980K can be provided on the display screen 994. The touch sensor 980K and the display screen 994 form a touch screen, also called a "touch screen." The touch sensor 980K is used to detect touch operations applied thereto or in the vicinity thereof. The touch sensor can transmit the detected touch operations to the application processor to determine the type of touch event. Visual output related to the touch operations can be provided through the display screen 994. In other embodiments, the touch sensor 980K can also be provided on the surface of the electronic device 900, at a location different from that of the display screen 994.

[0152] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of this application. Their specific functions and technical effects can be found in the method embodiment section and will not be repeated here.

[0153] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0154] An embodiment of the present application further provides an electronic device, comprising: one or more processors, a memory, and a computer program stored in the memory and executable on the one or more processors, wherein the one or more processors execute the computer program, enabling the electronic device to implement the steps of any of the aforementioned methods. An embodiment of the present application further provides a computer-readable storage medium storing the computer program, wherein the computer program, when executed by the electronic device, implements the steps of each of the aforementioned method embodiments.

[0155] The computer-readable medium may include at least any entity or device capable of carrying computer program code to a camera / electronic device, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunications signals, and software distribution media. Examples include USB flash drives, external hard drives, magnetic disks, or optical disks. In some jurisdictions, due to legislation and patent practice, computer-readable media cannot include electrical carrier signals or telecommunications signals.

[0156] The present application provides a computer program product comprising a computer program that, when executed by an electronic device, implements the steps of each of the above method embodiments. The computer program comprises computer program code, which may be in source code form, object code form, an executable file, or some intermediate form.

[0157] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.

[0158] Those skilled in the art will appreciate that the units and algorithm steps of each example 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 performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel 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.

[0159] In the embodiments provided in this application, it should be understood that the disclosed devices / equipment and methods can be implemented in other ways. For example, the device / equipment embodiments described above are merely schematic. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0160] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0161] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.

[0162] It will also be understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0163] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0164] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in other embodiments" appearing in various places in 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 "including," "comprising," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.

[0165] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.

Claims

1. A method for processing an application icon, characterized in that: Applied to electronic equipment, the method includes: When detecting that an icon update of the first application occurs, obtaining resource information of the first application; Determining, from the resource information, a pre-configured transparency value of a first icon on the desktop of the electronic device, wherein the first icon is an updated icon of the first application, and the pre-configured transparency value of the first icon is a transparency value corresponding to the entire first icon; When the pre-configured transparency value of the first icon is greater than or equal to a preset second transparency threshold, determining that the first icon is a hidden icon; When the pre-configured transparency value of the first icon is less than the preset second transparency threshold, the following steps are performed: Obtaining a position of the first icon, where the position of the first icon includes a horizontal position and a vertical position of the first icon in a grid on the desktop; Determine a grid position corresponding to the first icon on the desktop based on the horizontal position of the grid and the vertical position of the grid; intercepting the layer where the first icon is located to obtain a first image, wherein the first image is a complete image of the layer where the first icon is located; cropping the first image based on the grid position to obtain a first screenshot containing only the first icon, wherein the first screenshot is an image corresponding to the grid position where the first icon is located, and a display size of the first screenshot is larger than an icon size corresponding to the first icon; Determine the transparency of each pixel in the first screenshot; When the ratio of the number of first pixels to the total number of pixels is greater than or equal to a preset ratio threshold, determining that the first icon meets a visual transparency condition, wherein the visual transparency condition is used to indicate that the first icon is in a visually invisible state on the desktop, and the first icon is the hidden icon when the visual transparency condition is met, wherein the first pixel is a pixel in the first screenshot whose transparency is greater than or equal to a preset first transparency threshold; When the ratio of the number of the first pixels to the total number of pixels is less than the preset ratio threshold, it is determined that the first icon is a non-hidden icon.

2. The method for processing application icons according to claim 1, wherein: The intercepting the layer where the first icon is located to obtain the first image includes: Traversing all layers displayed on the desktop of the electronic device and adding all the layers to a first structure; The layer where the first icon is located in the first structure is rendered into a buffer to generate the first image.

3. The method for processing application icons according to claim 2, wherein: The first structure is a composite layer structure.

4. The method for processing application icons according to claim 1, wherein: The clipping of the first image based on the position of the first icon to obtain a screenshot of the first icon includes: determining a display area of ​​the first icon on the desktop according to the position of the first icon; The first image is cropped according to a display area of ​​the first icon on the desktop to obtain a screenshot of the first icon.

5. The method for processing an application icon according to any one of claims 1 to 4, characterized in that: The method further comprises: In the case that the first icon is a hidden icon, the first icon is replaced with a preset icon, wherein the preset icon does not meet the visual transparency condition.

6. The method for processing application icons according to claim 5, characterized in that: In the case where the first icon is a hidden icon, after replacing the first icon with a preset icon, the method further includes: A prompt message is displayed on the desktop of the electronic device, wherein the prompt message is used to prompt the user that the icon update of the first application has been blocked.

7. The method for processing an application icon according to any one of claims 1 to 4, characterized in that: The desktop of the electronic device is arranged in a grid pattern, and the position of the first icon includes a horizontal position and a vertical position of the grid in the desktop where the first icon is located.

8. An electronic device, characterized in that: The electronic device includes: one or more processors, and a memory; The memory is coupled to the one or more processors, and the memory is used to store computer program code, where the computer program code includes computer instructions. The one or more processors call the computer instructions to enable the electronic device to execute the method according to any one of claims 1 to 7.

9. A chip system, characterized in that: The chip system is applied to an electronic device, and the chip system includes one or more processors, and the one or more processors are used to call computer instructions so that the electronic device executes the method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium comprises instructions, which, when executed on an electronic device, enable the electronic device to perform the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method, device and mobile terminal for generating application icons

    CN106201212A

  • Malicious application judgment method and device, equipment and medium

    CN115659332A