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

Commit 4036ab3b authored by Ming-Shin Lu's avatar Ming-Shin Lu Committed by Automerger Merge Worker
Browse files

Merge "Fix AlwaysOnTop stack Z ordering issue" into rvc-dev am: af992089 am: 1ac59ab7

Change-Id: I030d94e1ab9a65b0fd4a8d62719c6e3fc24919a7
parents d33d3ac5 1ac59ab7
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -2279,6 +2279,15 @@ public class AppTransition implements Dump {
        return transit == TRANSIT_TASK_CHANGE_WINDOWING_MODE;
    }

    static boolean isClosingTransit(int transit) {
        return transit == TRANSIT_ACTIVITY_CLOSE
                || transit == TRANSIT_TASK_CLOSE
                || transit == TRANSIT_WALLPAPER_CLOSE
                || transit == TRANSIT_WALLPAPER_INTRA_CLOSE
                || transit == TRANSIT_TRANSLUCENT_ACTIVITY_CLOSE
                || transit == TRANSIT_CRASHING_ACTIVITY_CLOSE;
    }

    /**
     * @return whether the transition should show the thumbnail being scaled down.
     */
+1 −2
Original line number Diff line number Diff line
@@ -936,8 +936,7 @@ public class RecentsAnimationController implements DeathRecipient {
        @Override
        public void startAnimation(SurfaceControl animationLeash, Transaction t,
                @AnimationType int type, OnAnimationFinishedCallback finishCallback) {
            // Restore z-layering, position and stack crop until client has a chance to modify it.
            t.setLayer(animationLeash, mTask.getPrefixOrderIndex());
            // Restore position and stack crop until client has a chance to modify it.
            t.setPosition(animationLeash, mLocalBounds.left, mLocalBounds.top);
            mTmpRect.set(mLocalBounds);
            mTmpRect.offsetTo(0, 0);
+1 −2
Original line number Diff line number Diff line
@@ -424,8 +424,7 @@ class RemoteAnimationController implements DeathRecipient {
                @AnimationType int type, OnAnimationFinishedCallback finishCallback) {
            ProtoLog.d(WM_DEBUG_REMOTE_ANIMATIONS, "startAnimation");

            // Restore z-layering, position and stack crop until client has a chance to modify it.
            t.setLayer(animationLeash, mRecord.mWindowContainer.getPrefixOrderIndex());
            // Restore position and stack crop until client has a chance to modify it.
            if (mRecord.mStartBounds != null) {
                t.setPosition(animationLeash, mRecord.mStartBounds.left, mRecord.mStartBounds.top);
                t.setWindowCrop(animationLeash, mRecord.mStartBounds.width(),
+2 −1
Original line number Diff line number Diff line
@@ -2191,7 +2191,8 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
                        getSurfaceAnimationRunner());

                resultAdapters = new Pair<>(adapter, null);
                mNeedsZBoost = a.getZAdjustment() == Animation.ZORDER_TOP;
                mNeedsZBoost = a.getZAdjustment() == Animation.ZORDER_TOP
                        || AppTransition.isClosingTransit(transit);
                mTransit = transit;
                mTransitFlags = getDisplayContent().mAppTransition.getTransitFlags();
            } else {
+0 −2
Original line number Diff line number Diff line
@@ -120,7 +120,6 @@ public class RemoteAnimationControllerTest extends WindowTestsBase {
            assertEquals(mMockLeash, app.leash);
            assertEquals(win.mWinAnimator.mLastClipRect, app.clipRect);
            assertEquals(false, app.isTranslucent);
            verify(mMockTransaction).setLayer(mMockLeash, app.prefixOrderIndex);
            verify(mMockTransaction).setPosition(mMockLeash, app.position.x, app.position.y);
            verify(mMockTransaction).setWindowCrop(mMockLeash, 100, 50);

@@ -278,7 +277,6 @@ public class RemoteAnimationControllerTest extends WindowTestsBase {
            assertEquals(mMockThumbnailLeash, app.startLeash);
            assertEquals(win.mWinAnimator.mLastClipRect, app.clipRect);
            assertEquals(false, app.isTranslucent);
            verify(mMockTransaction).setLayer(mMockLeash, app.prefixOrderIndex);
            verify(mMockTransaction).setPosition(
                    mMockLeash, app.startBounds.left, app.startBounds.top);
            verify(mMockTransaction).setWindowCrop(mMockLeash, 200, 200);