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

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

Merge changes Ifb23a73a,If1854a77 into rvc-dev am: 9d3317b8 am: de55480c

Change-Id: I28a1f7d36b44f8a825c2d45c123305b3e9951cb1
parents e2a9af62 de55480c
Loading
Loading
Loading
Loading
+0 −13
Original line number Diff line number Diff line
@@ -20,21 +20,8 @@
<set xmlns:android="http://schemas.android.com/apk/res/android"
        android:shareInterpolator="false" android:zAdjustment="top">

    <alpha android:fromAlpha="1.0" android:toAlpha="0"
            android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
            android:interpolator="@interpolator/accelerate_quad"
            android:startOffset="250"
            android:duration="167"/>

    <translate android:fromYDelta="0" android:toYDelta="110%"
            android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
            android:interpolator="@interpolator/fast_out_linear_in"
            android:duration="225"/>

    <scale android:fromXScale="1.0" android:toXScale="1.0"
            android:fromYScale="1.0" android:toYScale="1.0"
            android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
            android:pivotX="50%p" android:pivotY="50%p"
            android:interpolator="@interpolator/fast_out_slow_in"
            android:duration="225" />
</set>
 No newline at end of file
+3 −15
Original line number Diff line number Diff line
@@ -5241,25 +5241,13 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo
     * the display naturally.
     */
    private void applyRotationAndFinishFixedRotation(int oldRotation, int newRotation) {
        if (mFixedRotationLaunchingApp == null) {
        final WindowToken rotatedLaunchingApp = mFixedRotationLaunchingApp;
        if (rotatedLaunchingApp == null) {
            applyRotation(oldRotation, newRotation);
            return;
        }

        // The display may be about to rotate seamlessly, and the animation of closing apps may
        // still animate in old rotation. So make sure the outdated animation won't show on the
        // rotated display.
        forAllActivities(a -> {
            if (a.nowVisible && a != mFixedRotationLaunchingApp
                    && a.getWindowConfiguration().getRotation() != newRotation) {
                final WindowContainer<?> w = a.getAnimatingContainer();
                if (w != null) {
                    w.cancelAnimation();
                }
            }
        });

        mFixedRotationLaunchingApp.finishFixedRotationTransform(
        rotatedLaunchingApp.finishFixedRotationTransform(
                () -> applyRotation(oldRotation, newRotation));
        mFixedRotationLaunchingApp = null;
    }
+0 −10
Original line number Diff line number Diff line
@@ -57,7 +57,6 @@ import static com.android.dx.mockito.inline.extended.ExtendedMockito.same;
import static com.android.dx.mockito.inline.extended.ExtendedMockito.spyOn;
import static com.android.dx.mockito.inline.extended.ExtendedMockito.times;
import static com.android.dx.mockito.inline.extended.ExtendedMockito.verify;
import static com.android.server.wm.SurfaceAnimator.ANIMATION_TYPE_APP_TRANSITION;
import static com.android.server.wm.WindowContainer.POSITION_TOP;
import static com.android.server.wm.WindowManagerService.UPDATE_FOCUS_NORMAL;

@@ -1068,13 +1067,6 @@ public class DisplayContentTests extends WindowTestsBase {
        mDisplayContent.computeScreenConfiguration(config);
        mDisplayContent.onRequestedOverrideConfigurationChanged(config);

        final ActivityRecord closingApp = new ActivityTestsBase.StackBuilder(mWm.mRoot)
                .setDisplay(mDisplayContent).setOnTop(false).build().getTopMostActivity();
        closingApp.nowVisible = true;
        closingApp.startAnimation(closingApp.getPendingTransaction(), mock(AnimationAdapter.class),
                false /* hidden */, ANIMATION_TYPE_APP_TRANSITION);
        assertTrue(closingApp.isAnimating());

        final ActivityRecord app = mAppWindow.mActivityRecord;
        mDisplayContent.prepareAppTransition(WindowManager.TRANSIT_ACTIVITY_OPEN,
                false /* alwaysKeepCurrent */);
@@ -1135,8 +1127,6 @@ public class DisplayContentTests extends WindowTestsBase {
        // The display should be rotated after the launch is finished.
        mDisplayContent.mAppTransition.notifyAppTransitionFinishedLocked(app.token);

        // The animation in old rotation should be cancelled.
        assertFalse(closingApp.isAnimating());
        // The fixed rotation should be cleared and the new rotation is applied to display.
        assertFalse(app.hasFixedRotationTransform());
        assertFalse(app2.hasFixedRotationTransform());