summaryrefslogtreecommitdiff
path: root/src/com
diff options
context:
space:
mode:
authorAli B <abittin@gmail.com>2021-06-24 19:37:39 +0300
committerGeorge Zacharia <george.zcharia@gmail.com>2024-10-25 03:24:18 +0200
commit0421ce5032fc975bc8a3ffcbd65ebf52e8d6c973 (patch)
tree5eec1f82b98b69a42b560fd415c55764de35c9a9 /src/com
parent1e41fab139c3fc93496bf1a4ed3e83c7a8513e3d (diff)
Launcher3: remove Uninstall option for app shortcutsHEADu14.0
Change-Id: If69432494d2fd3c01d194ff474060746dbcfdc3a
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/launcher3/popup/SystemShortcut.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/android/launcher3/popup/SystemShortcut.java b/src/com/android/launcher3/popup/SystemShortcut.java
index c70d043e6d..ad5cd272ff 100644
--- a/src/com/android/launcher3/popup/SystemShortcut.java
+++ b/src/com/android/launcher3/popup/SystemShortcut.java
@@ -6,6 +6,8 @@ import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCH
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_SYSTEM_SHORTCUT_DONT_SUGGEST_APP_TAP;
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_SYSTEM_SHORTCUT_WIDGETS_TAP;
import static com.android.launcher3.LauncherSettings.Favorites.ITEM_TYPE_APPLICATION;
+import static com.android.launcher3.LauncherSettings.Favorites.ITEM_TYPE_DEEP_SHORTCUT;
+import static com.android.launcher3.LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT;
import static com.android.launcher3.LauncherSettings.Favorites.ITEM_TYPE_TASK;
import android.app.ActivityOptions;
@@ -390,6 +392,8 @@ public abstract class SystemShortcut<T extends ActivityContext> extends ItemInfo
public static final Factory<ActivityContext> UNINSTALL = (activity, itemInfo, originalView) ->
itemInfo.getTargetComponent() == null ||
+ itemInfo.itemType == ITEM_TYPE_DEEP_SHORTCUT ||
+ itemInfo.itemType == ITEM_TYPE_SHORTCUT ||
PackageManagerHelper.isSystemApp((Context) activity,
itemInfo.getTargetComponent().getPackageName())
? null : new UnInstall(activity, itemInfo, originalView);