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

Commit d416d886 authored by Filip Gruszczynski's avatar Filip Gruszczynski Committed by Android (Google) Code Review
Browse files

Merge "Set focused activity when moving task fullscreen."

parents 45610acb 013b12f6
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -3228,9 +3228,16 @@ public final class ActivityStackSupervisor implements DisplayListener {
            // Apps may depend on onResume()/onPause() being called in pairs.
            if (wasResumed) {
                stack.mResumedActivity = r;
            }
            // move the stack in which we are placing the task to the front.
                // Move the stack in which we are placing the task to the front. We don't use
                // ActivityManagerService.setFocusedActivityLocked, because if the activity is
                // already focused, the call will short-circuit and do nothing.
                stack.moveToFront(reason);
            } else {
                // We need to not only move the stack to the front, but also have the activity
                // focused. This will achieve both goals.
                mService.setFocusedActivityLocked(r, reason);
            }

        }

        return stack;