Loading core/java/android/view/WindowManager.java +9 −0 Original line number Diff line number Diff line Loading @@ -1580,6 +1580,15 @@ public interface WindowManager extends ViewManager { */ public static final int ROTATION_ANIMATION_JUMPCUT = 2; /** * Value for {@link #rotationAnimation} to specify seamless rotation mode. * This works like JUMPCUT but will fall back to CROSSFADE if rotation * can't be applied without pausing the screen. * * @hide */ public static final int ROTATION_ANIMATION_SEAMLESS = 3; /** * Define the exit and entry animations used on this window when the device is rotated. * This only has an affect if the incoming and outgoing topmost Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java +1 −1 Original line number Diff line number Diff line Loading @@ -461,7 +461,7 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL // happens to occur during the launch. ActivityOptions o = ActivityOptions.makeBasic(); o.setRotationAnimationHint( WindowManager.LayoutParams.ROTATION_ANIMATION_CROSSFADE); WindowManager.LayoutParams.ROTATION_ANIMATION_SEAMLESS); try { result = ActivityManagerNative.getDefault().startActivityAsUser( null, getContext().getBasePackageName(), Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +1 −1 Original line number Diff line number Diff line Loading @@ -3419,7 +3419,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, // force the crossfade animation if an orientation change // happens to occur during the launch. options.setRotationAnimationHint( WindowManager.LayoutParams.ROTATION_ANIMATION_CROSSFADE); WindowManager.LayoutParams.ROTATION_ANIMATION_SEAMLESS); } try { result = ActivityManagerNative.getDefault().startActivityAsUser( Loading services/core/java/com/android/server/policy/PhoneWindowManager.java +6 −4 Original line number Diff line number Diff line Loading @@ -2891,6 +2891,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { } switch (animationHint) { case ROTATION_ANIMATION_CROSSFADE: case ROTATION_ANIMATION_SEAMLESS: // Crossfade is fallback for seamless. anim[0] = R.anim.rotation_animation_xfade_exit; anim[1] = R.anim.rotation_animation_enter; break; Loading Loading @@ -7751,14 +7752,15 @@ public class PhoneWindowManager implements WindowManagerPolicy { return false; } final WindowState w = mTopFullscreenOpaqueWindowState; // We only enable seamless rotation if the top window has requested // it and is in the fullscreen opaque state. Seamless rotation // requires freezing various Surface states and won't work well // with animations, so we disable it in the animation case for now. if (mTopFullscreenOpaqueWindowState != null && mTopIsFullscreen && !mTopFullscreenOpaqueWindowState.isAnimatingLw() && mTopFullscreenOpaqueWindowState.getAttrs().rotationAnimation == ROTATION_ANIMATION_JUMPCUT) { if (w != null && mTopIsFullscreen && !w.isAnimatingLw() && ((w.getAttrs().rotationAnimation == ROTATION_ANIMATION_JUMPCUT) || (w.getAttrs().rotationAnimation == ROTATION_ANIMATION_SEAMLESS))) { return true; } return false; Loading Loading
core/java/android/view/WindowManager.java +9 −0 Original line number Diff line number Diff line Loading @@ -1580,6 +1580,15 @@ public interface WindowManager extends ViewManager { */ public static final int ROTATION_ANIMATION_JUMPCUT = 2; /** * Value for {@link #rotationAnimation} to specify seamless rotation mode. * This works like JUMPCUT but will fall back to CROSSFADE if rotation * can't be applied without pausing the screen. * * @hide */ public static final int ROTATION_ANIMATION_SEAMLESS = 3; /** * Define the exit and entry animations used on this window when the device is rotated. * This only has an affect if the incoming and outgoing topmost Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java +1 −1 Original line number Diff line number Diff line Loading @@ -461,7 +461,7 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL // happens to occur during the launch. ActivityOptions o = ActivityOptions.makeBasic(); o.setRotationAnimationHint( WindowManager.LayoutParams.ROTATION_ANIMATION_CROSSFADE); WindowManager.LayoutParams.ROTATION_ANIMATION_SEAMLESS); try { result = ActivityManagerNative.getDefault().startActivityAsUser( null, getContext().getBasePackageName(), Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +1 −1 Original line number Diff line number Diff line Loading @@ -3419,7 +3419,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, // force the crossfade animation if an orientation change // happens to occur during the launch. options.setRotationAnimationHint( WindowManager.LayoutParams.ROTATION_ANIMATION_CROSSFADE); WindowManager.LayoutParams.ROTATION_ANIMATION_SEAMLESS); } try { result = ActivityManagerNative.getDefault().startActivityAsUser( Loading
services/core/java/com/android/server/policy/PhoneWindowManager.java +6 −4 Original line number Diff line number Diff line Loading @@ -2891,6 +2891,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { } switch (animationHint) { case ROTATION_ANIMATION_CROSSFADE: case ROTATION_ANIMATION_SEAMLESS: // Crossfade is fallback for seamless. anim[0] = R.anim.rotation_animation_xfade_exit; anim[1] = R.anim.rotation_animation_enter; break; Loading Loading @@ -7751,14 +7752,15 @@ public class PhoneWindowManager implements WindowManagerPolicy { return false; } final WindowState w = mTopFullscreenOpaqueWindowState; // We only enable seamless rotation if the top window has requested // it and is in the fullscreen opaque state. Seamless rotation // requires freezing various Surface states and won't work well // with animations, so we disable it in the animation case for now. if (mTopFullscreenOpaqueWindowState != null && mTopIsFullscreen && !mTopFullscreenOpaqueWindowState.isAnimatingLw() && mTopFullscreenOpaqueWindowState.getAttrs().rotationAnimation == ROTATION_ANIMATION_JUMPCUT) { if (w != null && mTopIsFullscreen && !w.isAnimatingLw() && ((w.getAttrs().rotationAnimation == ROTATION_ANIMATION_JUMPCUT) || (w.getAttrs().rotationAnimation == ROTATION_ANIMATION_SEAMLESS))) { return true; } return false; Loading