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

Commit 652aae43 authored by Robert Carr's avatar Robert Carr
Browse files

Un-hide ROTATION_ANIMATION_SEAMLESS.

For N the Camera used ROTATION_ANIMATION_JUMPCUT
which was reinterpreted as seamless rotation if possible.
However this ended up being non ideal in app transition
scenarios where the rotation animation replaces the app
transition. Here we also can't seamlessly rotate, so the
window just suddenly appears with jumpcut. In fact we want
crossfade as a fallback animation and this is what distinguishes
ROTATION_ANIMATION_JUMPCUT and SEAMLESS. The problem was patched
over in N by having double-tap gestures fire camera intents
with a SEAMLESS ActivityOptions.rotationAnimationHint,
but it was too late to un-hide for consumption by apps. While here,
clean up some documentation that doesn't really parse.

Test: Manual, try the RotationAnimation activity in ApiDemos sample.
Bug: 28838855
Bug: 28823590
Change-Id: I17b5e9fa967df8ade0943337cd7b6c3956d3a499
parent 4ede0e9b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -44020,6 +44020,7 @@ package android.view {
    field public static final int ROTATION_ANIMATION_CHANGED = 4096; // 0x1000
    field public static final int ROTATION_ANIMATION_CROSSFADE = 1; // 0x1
    field public static final int ROTATION_ANIMATION_JUMPCUT = 2; // 0x2
    field public static final int ROTATION_ANIMATION_SEAMLESS = 3; // 0x3
    field public static final int ROTATION_ANIMATION_ROTATE = 0; // 0x0
    field public static final int SCREEN_BRIGHTNESS_CHANGED = 2048; // 0x800
    field public static final int SCREEN_ORIENTATION_CHANGED = 1024; // 0x400
+1 −0
Original line number Diff line number Diff line
@@ -47204,6 +47204,7 @@ package android.view {
    field public static final int ROTATION_ANIMATION_CHANGED = 4096; // 0x1000
    field public static final int ROTATION_ANIMATION_CROSSFADE = 1; // 0x1
    field public static final int ROTATION_ANIMATION_JUMPCUT = 2; // 0x2
    field public static final int ROTATION_ANIMATION_SEAMLESS = 3; // 0x3
    field public static final int ROTATION_ANIMATION_ROTATE = 0; // 0x0
    field public static final int SCREEN_BRIGHTNESS_CHANGED = 2048; // 0x800
    field public static final int SCREEN_ORIENTATION_CHANGED = 1024; // 0x400
+1 −0
Original line number Diff line number Diff line
@@ -44256,6 +44256,7 @@ package android.view {
    field public static final int ROTATION_ANIMATION_CHANGED = 4096; // 0x1000
    field public static final int ROTATION_ANIMATION_CROSSFADE = 1; // 0x1
    field public static final int ROTATION_ANIMATION_JUMPCUT = 2; // 0x2
    field public static final int ROTATION_ANIMATION_SEAMLESS = 3; // 0x3
    field public static final int ROTATION_ANIMATION_ROTATE = 0; // 0x0
    field public static final int SCREEN_BRIGHTNESS_CHANGED = 2048; // 0x800
    field public static final int SCREEN_ORIENTATION_CHANGED = 1024; // 0x400
+10 −10
Original line number Diff line number Diff line
@@ -1578,30 +1578,30 @@ public interface WindowManager extends ViewManager {
        public float buttonBrightness = BRIGHTNESS_OVERRIDE_NONE;

        /**
         * Value for {@link #rotationAnimation} to define the animation used to
         * specify that this window will rotate in or out following a rotation.
         * Value for {@link #rotationAnimation} which specifies that this
         * window will visually rotate in or out following a rotation.
         */
        public static final int ROTATION_ANIMATION_ROTATE = 0;

        /**
         * Value for {@link #rotationAnimation} to define the animation used to
         * specify that this window will fade in or out following a rotation.
         * Value for {@link #rotationAnimation} which specifies that this
         * window will fade in or out following a rotation.
         */
        public static final int ROTATION_ANIMATION_CROSSFADE = 1;

        /**
         * Value for {@link #rotationAnimation} to define the animation used to
         * specify that this window will immediately disappear or appear following
         * a rotation.
         * Value for {@link #rotationAnimation} which specifies that this window
         * will immediately disappear or appear following a rotation.
         */
        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
         * can't be applied without pausing the screen. For example, this is ideal
         * for Camera apps which don't want the viewfinder contents to ever rotate
         * or fade (and rather to be seamless) but also don't want ROTATION_ANIMATION_JUMPCUT
         * during app transition scenarios where seamless rotation can't be applied.
         */
        public static final int ROTATION_ANIMATION_SEAMLESS = 3;