Loading core/java/android/window/flags/windowing_sdk.aconfig +11 −0 Original line number Diff line number Diff line Loading @@ -205,3 +205,14 @@ flag { purpose: PURPOSE_BUGFIX } } flag { namespace: "windowing_sdk" name: "fix_moving_unfocused_task" description: "Avoid moving the visible and unfocused multi-window mode Task to front" bug: "399860102" is_fixed_read_only: true metadata { purpose: PURPOSE_BUGFIX } } No newline at end of file services/core/java/com/android/server/wm/ActivityStarter.java +10 −0 Original line number Diff line number Diff line Loading @@ -274,6 +274,8 @@ class ActivityStarter { private static final int MOVE_TO_FRONT_AVOID_PI_ONLY_CREATOR_ALLOWS = 1; // Avoid a task move to front because of all other legacy reasons. private static final int MOVE_TO_FRONT_AVOID_LEGACY = 2; // Avoid a task move to front because it was requested from a visible multiple window. private static final int MOVE_TO_FRONT_AVOID_VISIBLE_MULTI_WINDOW = 3; private @MoveToFrontCode int mCanMoveToFrontCode = MOVE_TO_FRONT_ALLOWED; private boolean mFrozeTaskList; private boolean mTransientLaunch; Loading Loading @@ -1982,6 +1984,14 @@ class ActivityStarter { && r.mTransitionController.isTransientHide(targetTask)) { mCanMoveToFrontCode = MOVE_TO_FRONT_AVOID_LEGACY; } // To prevent interruption of the user's current focus, if a launch request // originates from activities within the same visible task, the task should not be // moved to the front, or an unfocused Task could be moved to top unexpectedly. if (com.android.window.flags.Flags.fixMovingUnfocusedTask() && !avoidMoveToFront() && sourceRecord != null && sourceRecord.getTask() == targetTask && targetTask.isVisible() && targetTask.inMultiWindowMode()) { mCanMoveToFrontCode = MOVE_TO_FRONT_AVOID_VISIBLE_MULTI_WINDOW; } // If the activity is started by sending a pending intent and only its creator has the // privilege to allow BAL (its sender does not), avoid move it to the front. Only do // this when it is not a new task and not already been marked as avoid move to front. Loading Loading
core/java/android/window/flags/windowing_sdk.aconfig +11 −0 Original line number Diff line number Diff line Loading @@ -205,3 +205,14 @@ flag { purpose: PURPOSE_BUGFIX } } flag { namespace: "windowing_sdk" name: "fix_moving_unfocused_task" description: "Avoid moving the visible and unfocused multi-window mode Task to front" bug: "399860102" is_fixed_read_only: true metadata { purpose: PURPOSE_BUGFIX } } No newline at end of file
services/core/java/com/android/server/wm/ActivityStarter.java +10 −0 Original line number Diff line number Diff line Loading @@ -274,6 +274,8 @@ class ActivityStarter { private static final int MOVE_TO_FRONT_AVOID_PI_ONLY_CREATOR_ALLOWS = 1; // Avoid a task move to front because of all other legacy reasons. private static final int MOVE_TO_FRONT_AVOID_LEGACY = 2; // Avoid a task move to front because it was requested from a visible multiple window. private static final int MOVE_TO_FRONT_AVOID_VISIBLE_MULTI_WINDOW = 3; private @MoveToFrontCode int mCanMoveToFrontCode = MOVE_TO_FRONT_ALLOWED; private boolean mFrozeTaskList; private boolean mTransientLaunch; Loading Loading @@ -1982,6 +1984,14 @@ class ActivityStarter { && r.mTransitionController.isTransientHide(targetTask)) { mCanMoveToFrontCode = MOVE_TO_FRONT_AVOID_LEGACY; } // To prevent interruption of the user's current focus, if a launch request // originates from activities within the same visible task, the task should not be // moved to the front, or an unfocused Task could be moved to top unexpectedly. if (com.android.window.flags.Flags.fixMovingUnfocusedTask() && !avoidMoveToFront() && sourceRecord != null && sourceRecord.getTask() == targetTask && targetTask.isVisible() && targetTask.inMultiWindowMode()) { mCanMoveToFrontCode = MOVE_TO_FRONT_AVOID_VISIBLE_MULTI_WINDOW; } // If the activity is started by sending a pending intent and only its creator has the // privilege to allow BAL (its sender does not), avoid move it to the front. Only do // this when it is not a new task and not already been marked as avoid move to front. Loading