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

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

Merge "Clear ZBoost when removing animation leash" into tm-dev am: 2e495889 am: e7a0be63

parents af2a5024 e7a0be63
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -3181,6 +3181,7 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
        mLastLayer = -1;
        mLastLayer = -1;
        mWmService.mSurfaceAnimationRunner.onAnimationLeashLost(mAnimationLeash, t);
        mWmService.mSurfaceAnimationRunner.onAnimationLeashLost(mAnimationLeash, t);
        mAnimationLeash = null;
        mAnimationLeash = null;
        mNeedsZBoost = false;
        reassignLayer(t);
        reassignLayer(t);
        updateSurfacePosition(t);
        updateSurfacePosition(t);
    }
    }
+5 −0
Original line number Original line Diff line number Diff line
@@ -88,6 +88,11 @@ public class AppWindowTokenAnimationTests extends WindowTestsBase {


        verify(mTransaction).setLayer(eq(mActivity.mAnimationBoundsLayer),
        verify(mTransaction).setLayer(eq(mActivity.mAnimationBoundsLayer),
                intThat(layer -> layer > topActivity.getLastLayer()));
                intThat(layer -> layer > topActivity.getLastLayer()));

        // The layer should be restored after the animation leash is removed.
        mActivity.onAnimationLeashLost(mTransaction);
        assertThat(mActivity.mNeedsZBoost).isFalse();
        assertThat(topActivity.getLastLayer()).isGreaterThan(mActivity.getLastLayer());
    }
    }


    @Test
    @Test