删除系统自带应用程序,包括窗口小部件

对于名称不清楚的,可以通过打印信息查看。


diff --git a/packages/apps/Launcher2/src/com/android/launcher2/AllAppsList.java b/packages/apps/Launcher2/src/com/android/launcher2/AllAppsLi

index 051b0bd..2c43833 100644
--- a/packages/apps/Launcher2/src/com/android/launcher2/AllAppsList.java
+++ b/packages/apps/Launcher2/src/com/android/launcher2/AllAppsList.java
@@ -63,6 +63,12 @@ class AllAppsList {
         if (findActivity(data, info.componentName)) {
             return;
         }
+        //"com.android.calculator2".equals(info.componentName.getPackageName()) 
+        if("com.google.android.maps.driveabout.app.DestinationActivity".equals(info.componentName.getClassName()))
+        {
+           return;
+        }
         data.add(info);
         added.add(info);
     }

(END) 


diff --git a/packages/apps/Launcher2/src/com/android/launcher2/AppsCustomizePagedView.java b/packages/apps/Launcher2/src/com/android/launcher
index 65b89b9..13c9dc9 100644
--- a/packages/apps/Launcher2/src/com/android/launcher2/AppsCustomizePagedView.java
+++ b/packages/apps/Launcher2/src/com/android/launcher2/AppsCustomizePagedView.java
@@ -537,7 +537,9 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
                 int minSpanX = Math.min(spanXY[0], minSpanXY[0]);
                 int minSpanY = Math.min(spanXY[1], minSpanXY[1]);
                 if (minSpanX <= LauncherModel.getCellCountX() &&
-                        minSpanY <= LauncherModel.getCellCountY()) {
+//                        minSpanY <= LauncherModel.getCellCountY()) {
+                        minSpanY <= LauncherModel.getCellCountY() &&
+                       (!"com.google.android.finsky.widget.consumption.NowPlayingWidgetProvider".equals(widget.provider.getClassName()))) {
                     mWidgets.add(widget);
                 } else {
                     Log.e(TAG, "Widget " + widget.provider + " can not fit on this device (" +
(END) 

你可能感兴趣的:(删除系统自带应用程序,包括窗口小部件)