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

Commit 26674453 authored by Louis Chang's avatar Louis Chang Committed by Automerger Merge Worker
Browse files

Merge "Ensure activity visibility gets updated before executing transition"...

Merge "Ensure activity visibility gets updated before executing transition" into tm-dev am: 1b43c023

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17730634



Change-Id: I9c355a4d88d42e87ff1fcb3ce2851bfa43f8472f
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 8a0bd59c 1b43c023
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -1034,20 +1034,20 @@ class TaskFragment extends WindowContainer<WindowContainer> {
        // If the top activity is the resumed one, nothing to do.
        if (mResumedActivity == next && next.isState(RESUMED)
                && taskDisplayArea.allResumedActivitiesComplete()) {
            // Ensure the visibility gets updated before execute app transition.
            taskDisplayArea.ensureActivitiesVisible(null /* starting */, 0 /* configChanges */,
                    false /* preserveWindows */, true /* notifyClients */);
            // Make sure we have executed any pending transitions, since there
            // should be nothing left to do at this point.
            executeAppTransition(options);
            // For devices that are not in fullscreen mode (e.g. freeform windows), it's possible
            // we still want to check if the visibility of other windows have changed (e.g. bringing
            // a fullscreen window forward to cover another freeform activity.)
            if (taskDisplayArea.inMultiWindowMode()) {
                if (taskDisplayArea.mDisplayContent != null

            // In a multi-resumed environment, like in a freeform device, the top
            // activity can be resumed, but it might not be the focused app.
            // Set focused app when top activity is resumed
            if (taskDisplayArea.inMultiWindowMode() && taskDisplayArea.mDisplayContent != null
                    && taskDisplayArea.mDisplayContent.mFocusedApp != next) {
                taskDisplayArea.mDisplayContent.setFocusedApp(next);
            }
                taskDisplayArea.ensureActivitiesVisible(null /* starting */, 0 /* configChanges */,
                        false /* preserveWindows */, true /* notifyClients */);
            }
            ProtoLog.d(WM_DEBUG_STATES, "resumeTopActivity: Top activity "
                    + "resumed %s", next);
            return false;