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

Commit faf59661 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Allow to use fixed rotation if recents is animating

The condition of visible wallpaper was added for transition between
lockscreen and home that show wallpaper in different orientation.
But that also affects when swiping to home if the recents activity
is not home activity (3rd party launcher). And it will cause
additional rotation animation which looks unpolished.

This restores the case to have the same behavior as R.

Bug: 196012011
Test: Use 3rd party launcher as default home and gesture navigation.
      Swipe to home from an app which has different orientation from
      the launcher. There should be no rotation animation.
Change-Id: I8a3b4617434c619463a96b9e3106d25654a55391
parent 8d26ea92
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1593,8 +1593,10 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
            // If the transition has not started yet, the activity must be the top.
            return false;
        }
        if (mLastWallpaperVisible && r.windowsCanBeWallpaperTarget()) {
            // Use normal rotation animation for orientation change of visible wallpaper.
        if (mLastWallpaperVisible && r.windowsCanBeWallpaperTarget()
                && mFixedRotationTransitionListener.mAnimatingRecents == null) {
            // Use normal rotation animation for orientation change of visible wallpaper if recents
            // animation is not running (it may be swiping to home).
            return false;
        }
        final int rotation = rotationForActivityInDifferentOrientation(r);