diff options
author | Charles He <qiurui@google.com> | 2017-02-15 12:22:56 +0000 |
---|---|---|
committer | Charles He <qiurui@google.com> | 2017-02-21 20:23:50 +0000 |
commit | 3ff9047221820a01c6510503466f8c78b43fdc6d (patch) | |
tree | a1266392736619173f1f6092762b96b7b9422c58 /src/com/android/launcher3/compat/LauncherAppsCompatVO.java | |
parent | 7d093e75f698db323fe128cd76e0c0bb8492a059 (diff) | |
download | android_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/compat/LauncherAppsCompatVO.java')
-rw-r--r-- | src/com/android/launcher3/compat/LauncherAppsCompatVO.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/com/android/launcher3/compat/LauncherAppsCompatVO.java b/src/com/android/launcher3/compat/LauncherAppsCompatVO.java index 0610726a7..377907aa9 100644 --- a/src/com/android/launcher3/compat/LauncherAppsCompatVO.java +++ b/src/com/android/launcher3/compat/LauncherAppsCompatVO.java @@ -17,6 +17,7 @@ package com.android.launcher3.compat; import android.content.Context; +import android.content.pm.ApplicationInfo; import android.content.pm.LauncherActivityInfo; import android.content.pm.LauncherApps; import android.os.UserHandle; @@ -34,6 +35,11 @@ public class LauncherAppsCompatVO extends LauncherAppsCompatVL { } @Override + public ApplicationInfo getApplicationInfo(String packageName, UserHandle user) { + return mLauncherApps.getApplicationInfo(packageName, 0, user); + } + + @Override public List<ShortcutConfigActivityInfo> getCustomShortcutActivityList() { List<ShortcutConfigActivityInfo> result = new ArrayList<>(); |