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

Commit 96b7a51d authored by Winson Chung's avatar Winson Chung
Browse files

Fixing NPE when there is no running activity.

Bug: 30668904
Test: Boot the device, kill launcher
Change-Id: I10236d33c7fbc1d20b5d4b097e0660596188eaf0
parent 4127c138
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -374,6 +374,10 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener
        MutableBoolean isHomeStackVisible = new MutableBoolean(true);
        if (!ssp.isRecentsActivityVisible(isHomeStackVisible)) {
            ActivityManager.RunningTaskInfo runningTask = ssp.getRunningTask();
            if (runningTask == null) {
                return;
            }

            RecentsTaskLoader loader = Recents.getTaskLoader();
            sInstanceLoadPlan = loader.createLoadPlan(mContext);
            sInstanceLoadPlan.preloadRawTasks(!isHomeStackVisible.value);