OSDN Git Service

Launcher3: fix app shortcuts for suspended apps
authorCharles He <qiurui@google.com>
Wed, 15 Feb 2017 12:22:56 +0000 (12:22 +0000)
committerCharles He <qiurui@google.com>
Tue, 21 Feb 2017 20:23:50 +0000 (20:23 +0000)
commit3ff9047221820a01c6510503466f8c78b43fdc6d
treea1266392736619173f1f6092762b96b7b9422c58
parent7d093e75f698db323fe128cd76e0c0bb8492a059
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
src/com/android/launcher3/LauncherModel.java
src/com/android/launcher3/compat/LauncherAppsCompat.java
src/com/android/launcher3/compat/LauncherAppsCompatVL.java
src/com/android/launcher3/compat/LauncherAppsCompatVO.java
src/com/android/launcher3/shortcuts/DeepShortcutManager.java
src/com/android/launcher3/util/PackageManagerHelper.java