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

Commit 22060ac4 authored by Riddle Hsu's avatar Riddle Hsu Committed by Android (Google) Code Review
Browse files

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

parents 9890f5e4 8eadecca
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 -> {