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

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

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

* commit '730409c3':
  Make lock task check if focused better
parents 1aa2876c 730409c3
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);