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

Commit 4852d615 authored by Riddle Hsu's avatar Riddle Hsu Committed by Automerger Merge Worker
Browse files

Merge "Request transition for corner case of keyguard state" into udc-dev am:...

Merge "Request transition for corner case of keyguard state" into udc-dev am: 22060ac4 am: e8bd36a6

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



Change-Id: I4a1018e08b0c21d933e086612ca87d3a38aa7aea
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 39e344a9 e8bd36a6
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -5266,10 +5266,20 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
                mTransitionController.collect(this);
            } else {
                inFinishingTransition = mTransitionController.inFinishingTransition(this);
                if (!inFinishingTransition) {
                if (!inFinishingTransition && !mDisplayContent.isSleeping()) {
                    Slog.e(TAG, "setVisibility=" + visible
                            + " while transition is not collecting or finishing "
                            + this + " caller=" + Debug.getCallers(8));
                    // Force showing the parents because they may be hidden by previous transition.
                    if (visible) {
                        final Transaction t = getSyncTransaction();
                        for (WindowContainer<?> p = getParent(); p != null && p != mDisplayContent;
                                p = p.getParent()) {
                            if (p.mSurfaceControl != null) {
                                t.show(p.mSurfaceControl);
                            }
                        }
                    }
                }
            }
        }
+16 −5
Original line number Diff line number Diff line
@@ -2349,12 +2349,23 @@ class RootWindowContainer extends WindowContainer<DisplayContent>
            }

            // Prepare transition before resume top activity, so it can be collected.
            if (!displayShouldSleep && display.isDefaultDisplay
                    && !display.getDisplayPolicy().isAwake()
                    && display.mTransitionController.isShellTransitionsEnabled()
            if (!displayShouldSleep && display.mTransitionController.isShellTransitionsEnabled()
                    && !display.mTransitionController.isCollecting()) {
                display.mTransitionController.requestTransitionIfNeeded(TRANSIT_WAKE,
                        0 /* flags */, null /* trigger */, display);
                int transit = TRANSIT_NONE;
                if (!display.getDisplayPolicy().isAwake()) {
                    // Note that currently this only happens on default display because non-default
                    // display is always awake.
                    transit = TRANSIT_WAKE;
                } else if (display.isKeyguardOccluded()) {
                    // The display was awake so this is resuming activity for occluding keyguard.
                    transit = WindowManager.TRANSIT_KEYGUARD_OCCLUDE;
                }
                if (transit != TRANSIT_NONE) {
                    display.mTransitionController.requestStartTransition(
                            display.mTransitionController.createTransition(transit),
                            null /* startTask */, null /* remoteTransition */,
                            null /* displayChange */);
                }
            }
            // Set the sleeping state of the root tasks on the display.
            display.forAllRootTasks(rootTask -> {