summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/shortcuts/DeepShortcutManager.java
diff options
context:
space:
mode:
authorCharles He <qiurui@google.com>2017-02-15 12:22:56 +0000
committerCharles He <qiurui@google.com>2017-02-21 20:23:50 +0000
commit3ff9047221820a01c6510503466f8c78b43fdc6d (patch)
treea1266392736619173f1f6092762b96b7b9422c58 /src/com/android/launcher3/shortcuts/DeepShortcutManager.java
parent7d093e75f698db323fe128cd76e0c0bb8492a059 (diff)
downloadandroid_packages_apps_Trebuchet-3ff9047221820a01c6510503466f8c78b43fdc6d.tar.gz
android_packages_apps_Trebuchet-3ff9047221820a01c6510503466f8c78b43fdc6d.tar.bz2
android_packages_apps_Trebuchet-3ff9047221820a01c6510503466f8c78b43fdc6d.zip
Launcher3: fix app shortcuts for suspended apps
This CL fixes app shortcuts for suspended packages. 1) When DO/PO suspends an app, its pinned shortcuts are instantly grayed out, but this is not persisted after the launcher restarts (e.g. device reboot). We now enforce the launcher to check the suspended state when loading the workspace, and gray out pinned shortcut icons accordingly. 2) When DO/PO suspends an app, its app shortcut popup is still available. We now temporarily disable the popup when the app is suspended, and persist the state across restarts. Bug: 32365540 Test: manual, by following the steps in the bug above Test: manual, by restarting the launcher package Change-Id: I983d7c17fa198beca23b66459b50bd67b447bdd2
Diffstat (limited to 'src/com/android/launcher3/shortcuts/DeepShortcutManager.java')
-rw-r--r--src/com/android/launcher3/shortcuts/DeepShortcutManager.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/android/launcher3/shortcuts/DeepShortcutManager.java b/src/com/android/launcher3/shortcuts/DeepShortcutManager.java
index 941391362..df7f6954d 100644
--- a/src/com/android/launcher3/shortcuts/DeepShortcutManager.java
+++ b/src/com/android/launcher3/shortcuts/DeepShortcutManager.java
@@ -65,7 +65,8 @@ public class DeepShortcutManager {
}
public static boolean supportsShortcuts(ItemInfo info) {
- return info.itemType == LauncherSettings.Favorites.ITEM_TYPE_APPLICATION;
+ return info.itemType == LauncherSettings.Favorites.ITEM_TYPE_APPLICATION
+ && !info.isDisabled();
}
public boolean wasLastCallSuccess() {