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

Commit 2811a57f authored by Kyrylo Mikos's avatar Kyrylo Mikos
Browse files

WindowManagerService: fix application transitions in expanded mode.

Change-Id: If7d3fc3ab566dedc3a5b38cd0a6dc3185f494e20
parent 016664aa
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1202,4 +1202,11 @@ public interface WindowManagerPolicy {
     * @param enabled Whether touch exploration is enabled.
     */
    public void setTouchExplorationEnabled(boolean enabled);

    /**
     * Check if immersive mode hides navigation bar
     *
     * @return True if navbar can be hidden by immersive mode
     */
    public boolean isImmersiveMode(int vis);
}
+1 −1
Original line number Diff line number Diff line
@@ -5834,7 +5834,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
        }
    }

    private boolean isImmersiveMode(int vis) {
    public boolean isImmersiveMode(int vis) {
        final int flags = View.SYSTEM_UI_FLAG_IMMERSIVE | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
        return mNavigationBar != null
                && (vis & View.SYSTEM_UI_FLAG_HIDE_NAVIGATION) != 0
+19 −3
Original line number Diff line number Diff line
@@ -3208,8 +3208,15 @@ public class WindowManagerService extends IWindowManager.Stub
        // is running.
        if (okToDisplay()) {
            DisplayInfo displayInfo = getDefaultDisplayInfoLocked();
            final int width = displayInfo.appWidth;
            final int height = displayInfo.appHeight;
            final int width;
            final int height;
            if (mPolicy.isImmersiveMode(mLastStatusBarVisibility)) {
                width = displayInfo.logicalWidth;
                height = displayInfo.logicalHeight;
            } else {
                width = displayInfo.appWidth;
                height = displayInfo.appHeight;
            }
            if (DEBUG_APP_TRANSITIONS || DEBUG_ANIM) Slog.v(TAG, "applyAnimation: atoken="
                    + atoken);
            Animation a = mAppTransition.loadAnimation(lp, transit, enter, width, height);
@@ -8624,8 +8631,17 @@ public class WindowManagerService extends IWindowManager.Stub
                    drawSurface.release();
                    appAnimator.thumbnailLayer = topOpeningLayer;
                    DisplayInfo displayInfo = getDefaultDisplayInfoLocked();
                    final int width;
                    final int height;
                    if (mPolicy.isImmersiveMode(mLastStatusBarVisibility)) {
                        width = displayInfo.logicalWidth;
                        height = displayInfo.logicalHeight;
                    } else {
                        width = displayInfo.appWidth;
                        height = displayInfo.appHeight;
                    }
                    Animation anim = mAppTransition.createThumbnailAnimationLocked(
                            transit, true, true, displayInfo.appWidth, displayInfo.appHeight);
                            transit, true, true, width, height);
                    appAnimator.thumbnailAnimation = anim;
                    anim.restrictDuration(MAX_ANIMATION_DURATION);
                    anim.scaleCurrentDuration(mTransitionAnimationScale);