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

Commit 730409c3 authored by Jason Monk's avatar Jason Monk Committed by Android Git Automerger
Browse files

am 013d14f8: Merge "Make lock task check if focused better" into lmp-mr1-dev

* commit '013d14f8':
  Make lock task check if focused better
parents 962c5ab8 013d14f8
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -8852,7 +8852,8 @@ public final class ActivityManagerService extends ActivityManagerNative
                task = mStackSupervisor.anyTaskForIdLocked(task.taskId);
                if (task != null) {
                    if (!isSystemInitiated
                            && ((mFocusedActivity == null) || (task != mFocusedActivity.task))) {
                            && ((mStackSupervisor.getFocusedStack() == null)
                                    || (task != mStackSupervisor.getFocusedStack().topTask()))) {
                        throw new IllegalArgumentException("Invalid task, not in foreground");
                    }
                    mStackSupervisor.setLockTaskModeLocked(task, !isSystemInitiated);