diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2015-02-26 12:34:42 -0800 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2015-02-26 12:35:09 -0800 |
commit | c9acdd51c40c1b397adae6ba62c4acd01914b473 (patch) | |
tree | f74dbd85f26408a56b2a823556a9bf3377bcb4ae /src/com/android/launcher3/DeleteDropTarget.java | |
parent | 560616da70648bed04c00aa804503ec72ace1337 (diff) | |
download | android_packages_apps_Trebuchet-c9acdd51c40c1b397adae6ba62c4acd01914b473.tar.gz android_packages_apps_Trebuchet-c9acdd51c40c1b397adae6ba62c4acd01914b473.tar.bz2 android_packages_apps_Trebuchet-c9acdd51c40c1b397adae6ba62c4acd01914b473.zip |
Removed disableAllApps flag
Change-Id: I50ba511b8493bca2506ab6010f141c093bfa7499
Diffstat (limited to 'src/com/android/launcher3/DeleteDropTarget.java')
-rw-r--r-- | src/com/android/launcher3/DeleteDropTarget.java | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/src/com/android/launcher3/DeleteDropTarget.java b/src/com/android/launcher3/DeleteDropTarget.java index ebe874f38..1ada1a912 100644 --- a/src/com/android/launcher3/DeleteDropTarget.java +++ b/src/com/android/launcher3/DeleteDropTarget.java @@ -144,13 +144,11 @@ public class DeleteDropTarget extends ButtonDropTarget { return true; } - if (!LauncherAppState.isDisableAllApps() && - item.itemType == LauncherSettings.Favorites.ITEM_TYPE_FOLDER) { + if (item.itemType == LauncherSettings.Favorites.ITEM_TYPE_FOLDER) { return true; } - if (!LauncherAppState.isDisableAllApps() && - item.itemType == LauncherSettings.Favorites.ITEM_TYPE_APPLICATION && + if (item.itemType == LauncherSettings.Favorites.ITEM_TYPE_APPLICATION && item instanceof AppInfo) { AppInfo appInfo = (AppInfo) info; return (appInfo.flags & AppInfo.DOWNLOADED_FLAG) != 0; @@ -158,12 +156,7 @@ public class DeleteDropTarget extends ButtonDropTarget { if (item.itemType == LauncherSettings.Favorites.ITEM_TYPE_APPLICATION && item instanceof ShortcutInfo) { - if (LauncherAppState.isDisableAllApps()) { - ShortcutInfo shortcutInfo = (ShortcutInfo) info; - return (shortcutInfo.flags & AppInfo.DOWNLOADED_FLAG) != 0; - } else { - return true; - } + return true; } } return false; @@ -173,8 +166,7 @@ public class DeleteDropTarget extends ButtonDropTarget { @Override public void onDragStart(DragSource source, Object info, int dragAction) { boolean isVisible = true; - boolean useUninstallLabel = !LauncherAppState.isDisableAllApps() && - isAllAppsApplication(source, info); + boolean useUninstallLabel = isAllAppsApplication(source, info); boolean useDeleteLabel = !useUninstallLabel && source.supportsDeleteDropTarget(); // If we are dragging an application from AppsCustomize, only show the control if we can @@ -277,12 +269,6 @@ public class DeleteDropTarget extends ButtonDropTarget { } private boolean isUninstallFromWorkspace(DragObject d) { - if (LauncherAppState.isDisableAllApps() && isDragSourceWorkspaceOrFolder(d) - && (d.dragInfo instanceof ShortcutInfo)) { - ShortcutInfo shortcut = (ShortcutInfo) d.dragInfo; - // Only allow manifest shortcuts to initiate an un-install. - return !InstallShortcutReceiver.isValidShortcutLaunchIntent(shortcut.intent); - } return false; } |