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

Commit 93664500 authored by wilsonshih's avatar wilsonshih
Browse files

Workaround to force show TaskFragment while back gesture animating.

Unlike Task and ActivityRecord, the TaskFragment won't show it's
surface during animating, and the surface can be hide after close
transition in Transitions#setupStartState.

Bug: 271599041
Test: verify the TaskFragment can show during back gesture animation.
Change-Id: I9a3d56d3e6c0cc9f735d82f99fd1fc04c329d690
parent 34ab67a0
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -862,8 +862,16 @@ class BackNavigationController {
                WindowContainer target, boolean isOpen) {
            final BackWindowAnimationAdaptor adaptor =
                    new BackWindowAnimationAdaptor(target, isOpen);
            target.startAnimation(target.getPendingTransaction(), adaptor, false /* hidden */,
                    ANIMATION_TYPE_PREDICT_BACK);
            final SurfaceControl.Transaction pt = target.getPendingTransaction();
            target.startAnimation(pt, adaptor, false /* hidden */, ANIMATION_TYPE_PREDICT_BACK);
            // Workaround to show TaskFragment which can be hide in Transitions and won't show
            // during isAnimating.
            if (isOpen && target.asActivityRecord() != null) {
                final TaskFragment fragment = target.asActivityRecord().getTaskFragment();
                if (fragment != null) {
                    pt.show(fragment.mSurfaceControl);
                }
            }
            return adaptor;
        }