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

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

am b22d1002: am 730409c3: am 013d14f8: Merge "Make lock task check if focused...

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

* commit 'b22d1002':
  Make lock task check if focused better
parents ab2e9c7c b22d1002
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);