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

Commit 3ada97b0 authored by Jason Monk's avatar Jason Monk Committed by Android (Google) Code Review
Browse files

Merge "Fix crash in starting lock task"

parents c9468503 a4e946bb
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -7768,7 +7768,8 @@ public final class ActivityManagerService extends ActivityManagerNative
                // Since we lost lock on task, make sure it is still there.
                task = mStackSupervisor.anyTaskForIdLocked(task.taskId);
                if (task != null) {
                    if ((mFocusedActivity == null) || (task != mFocusedActivity.task)) {
                    if (!isSystemInitiated
                            && ((mFocusedActivity == null) || (task != mFocusedActivity.task))) {
                        throw new IllegalArgumentException("Invalid task, not in foreground");
                    }
                    mStackSupervisor.setLockTaskModeLocked(task, isSystemInitiated);