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

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

Merge "Avoid setting stale surface visibility from back transition" into main

parents fd70b324 881b6679
Loading
Loading
Loading
Loading
+1 −11
Original line number Diff line number Diff line
@@ -997,11 +997,9 @@ class BackNavigationController {
    /**
     * Handle the pending animation when the running transition finished, all the visibility change
     * has applied so ready to start pending predictive back animation.
     * @param targets The final animation targets derived in transition.
     * @param finishedTransition The finished transition target.
    */
    void onTransitionFinish(ArrayList<Transition.ChangeInfo> targets,
            @NonNull Transition finishedTransition) {
    void onTransitionFinish(@NonNull Transition finishedTransition) {
        if (isMonitoringPrepareTransition(finishedTransition)) {
            if (mAnimationHandler.mPrepareCloseTransition == null) {
                clearBackAnimations(true /* cancel */);
@@ -1049,14 +1047,6 @@ class BackNavigationController {
            return;
        }

        // Ensure the final animation targets which hidden by transition could be visible.
        for (int i = 0; i < targets.size(); i++) {
            final WindowContainer wc = targets.get(i).mContainer;
            if (wc.mSurfaceControl != null) {
                wc.prepareSurfaces();
            }
        }

        // The pending builder could be cleared due to prepareSurfaces
        // => updateNonSystemOverlayWindowsVisibilityIfNeeded
        // => setForceHideNonSystemOverlayWindowIfNeeded
+1 −1
Original line number Diff line number Diff line
@@ -1589,7 +1589,7 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
        cleanUpInternal();

        // Handle back animation if it's already started.
        mController.mAtm.mBackNavigationController.onTransitionFinish(mTargets, this);
        mController.mAtm.mBackNavigationController.onTransitionFinish(this);
        mController.mFinishingTransition = null;
        mController.mSnapshotController.onTransitionFinish(mType, mTargets);
        // Resume snapshot persist thread after snapshot controller analysis this transition.