diff options
author | Adnan Begovic <adnan@cyngn.com> | 2015-09-11 14:15:10 -0700 |
---|---|---|
committer | Adnan Begovic <adnan@cyngn.com> | 2015-09-11 17:58:32 -0700 |
commit | 6eeb4d27f1c64109f3d929ff87eba6f0b92b3ead (patch) | |
tree | 940599a384a89726606c3229b1f5db3fb34a1503 | |
parent | db6a4e70d0c8dc063f5a2831e3f8e16def16a41c (diff) | |
download | android_packages_apps_Trebuchet-6eeb4d27f1c64109f3d929ff87eba6f0b92b3ead.tar.gz android_packages_apps_Trebuchet-6eeb4d27f1c64109f3d929ff87eba6f0b92b3ead.tar.bz2 android_packages_apps_Trebuchet-6eeb4d27f1c64109f3d929ff87eba6f0b92b3ead.zip |
Trebuchet: Make sure callbacks are available on user change.
When switching from Owner -> Guest profile, the callbacks for
LauncherModel may not be supplied by the incoming restricted
user.
Change-Id: I15c49f3f30fea9397bee5ae8bde4b0c7f585ae07
TICKET: CYNGNOS-997
(cherry picked from commit 03b202e6b17e0b6be94eb70606e2bcb9a4f6e090)
-rw-r--r-- | src/com/android/launcher3/LauncherModel.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/launcher3/LauncherModel.java b/src/com/android/launcher3/LauncherModel.java index bd8559561..f67d6d86d 100644 --- a/src/com/android/launcher3/LauncherModel.java +++ b/src/com/android/launcher3/LauncherModel.java @@ -1871,7 +1871,7 @@ public class LauncherModel extends BroadcastReceiver long containerIndex = item.screenId; if (item.container == LauncherSettings.Favorites.CONTAINER_HOTSEAT) { // Return early if we detect that an item is under the hotseat button - if (mCallbacks == null || + if (mCallbacks == null || mCallbacks.get() == null || mCallbacks.get().isAllAppsButtonRank((int) item.screenId)) { deleteOnInvalidPlacement.set(true); Log.e(TAG, "Error loading shortcut into hotseat " + item |