* commit '730409c332e19c34f7c309fbe054532eec88bdbc': Make lock task check if focused better
This commit is contained in:
@@ -8852,7 +8852,8 @@ public final class ActivityManagerService extends ActivityManagerNative
|
|||||||
task = mStackSupervisor.anyTaskForIdLocked(task.taskId);
|
task = mStackSupervisor.anyTaskForIdLocked(task.taskId);
|
||||||
if (task != null) {
|
if (task != null) {
|
||||||
if (!isSystemInitiated
|
if (!isSystemInitiated
|
||||||
&& ((mFocusedActivity == null) || (task != mFocusedActivity.task))) {
|
&& ((mStackSupervisor.getFocusedStack() == null)
|
||||||
|
|| (task != mStackSupervisor.getFocusedStack().topTask()))) {
|
||||||
throw new IllegalArgumentException("Invalid task, not in foreground");
|
throw new IllegalArgumentException("Invalid task, not in foreground");
|
||||||
}
|
}
|
||||||
mStackSupervisor.setLockTaskModeLocked(task, !isSystemInitiated);
|
mStackSupervisor.setLockTaskModeLocked(task, !isSystemInitiated);
|
||||||
|
|||||||
Reference in New Issue
Block a user