Loading core/java/android/view/WindowManagerPolicy.java +7 −0 Original line number Diff line number Diff line Loading @@ -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); } policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -5847,7 +5847,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 Loading services/java/com/android/server/wm/WindowManagerService.java +19 −3 Original line number Diff line number Diff line Loading @@ -3217,8 +3217,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); Loading Loading @@ -8663,8 +8670,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); Loading Loading
core/java/android/view/WindowManagerPolicy.java +7 −0 Original line number Diff line number Diff line Loading @@ -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); }
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -5847,7 +5847,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 Loading
services/java/com/android/server/wm/WindowManagerService.java +19 −3 Original line number Diff line number Diff line Loading @@ -3217,8 +3217,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); Loading Loading @@ -8663,8 +8670,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); Loading