Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6eeb4d27 authored by Adnan Begovic's avatar Adnan Begovic
Browse files

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 03b202e6)
parent db6a4e70
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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