--- a/sprd/packages/apps/Launcher3/src/com/android/launcher3/model/BgDataModel.java
+++ b/sprd/packages/apps/Launcher3/src/com/android/launcher3/model/BgDataModel.java
@@ -253,7 +253,8 @@ public class BgDataModel {
case LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT:
if (item.container == LauncherSettings.Favorites.CONTAINER_DESKTOP ||
item.container == LauncherSettings.Favorites.CONTAINER_HOTSEAT) {
- //modify by luoyalong 20211223 for repeat icon in launcher begin
+ //modify by luoyalong 20211223 for repeat icon in launcher begin
+
/*String workspaceItemsA=workspaceItems.toString();
String itemA=item.toString();
itemA=itemA.substring(itemA.indexOf("ComponentInfo{"));
@@ -273,7 +274,18 @@ public class BgDataModel {
workspaceItems.add(item);
}
}*/
- workspaceItems.add(item);
+ try{
+ String workspaceItemsA=workspaceItems.toString();
+ String itemA=item.toString();
+ itemA=itemA.substring(0, itemA.indexOf("screen="));
+ itemA=itemA.substring(itemA.indexOf("=ComponentInfo"));
+ Log.e("lylfolder5","itemA=="+itemA);
+ if(!workspaceItemsA.contains(itemA)){
+ workspaceItems.add(item);
+ }
+ }catch(Exception e){}
+ Log.e("lylfolder5","workspaceItems=="+workspaceItems);
+
//modify by luoyalong 20211223 for repeat icon in launcher end
sprd 11.0 修改桌面出现双图标问题
于 2023-05-04 11:41:28 首次发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)