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

Commit 60174445 authored by Robin Lee's avatar Robin Lee Committed by Android (Google) Code Review
Browse files

Merge changes from topic "public-no-move-animation"

* changes:
  Activity.isAnimating reports window animations
  Make FLAG_NO_MOVE_ANIMATION public
parents 4c35cae2 f2dee9e0
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1857,6 +1857,7 @@ package android {
    field public static final int windowMinWidthMajor = 16843606; // 0x1010356
    field public static final int windowMinWidthMinor = 16843607; // 0x1010357
    field public static final int windowNoDisplay = 16843294; // 0x101021e
    field public static final int windowNoMoveAnimation;
    field public static final int windowNoTitle = 16842838; // 0x1010056
    field @Deprecated public static final int windowOverscan = 16843727; // 0x10103cf
    field public static final int windowReenterTransition = 16843951; // 0x10104af
@@ -53824,6 +53825,7 @@ package android.view {
    ctor public WindowManager.LayoutParams(int, int, int, int, int, int, int);
    ctor public WindowManager.LayoutParams(android.os.Parcel);
    method public boolean areWallpaperTouchEventsEnabled();
    method public boolean canPlayMoveAnimation();
    method public final int copyFrom(android.view.WindowManager.LayoutParams);
    method public String debug(String);
    method public int describeContents();
@@ -53836,6 +53838,7 @@ package android.view {
    method public boolean isHdrConversionEnabled();
    method public static boolean mayUseInputMethod(int);
    method public void setBlurBehindRadius(@IntRange(from=0) int);
    method public void setCanPlayMoveAnimation(boolean);
    method public void setColorMode(int);
    method public void setFitInsetsIgnoringVisibility(boolean);
    method public void setFitInsetsSides(int);
+0 −1
Original line number Diff line number Diff line
@@ -3306,7 +3306,6 @@ package android.view {
    method public final void setWindowContextToken(@NonNull android.os.IBinder);
    field public static final int ACCESSIBILITY_TITLE_CHANGED = 33554432; // 0x2000000
    field public static final int FLAG_SLIPPERY = 536870912; // 0x20000000
    field public static final int PRIVATE_FLAG_NO_MOVE_ANIMATION = 64; // 0x40
    field public CharSequence accessibilityTitle;
    field public int privateFlags;
  }
+26 −1
Original line number Diff line number Diff line
@@ -2785,10 +2785,10 @@ public interface WindowManager extends ViewManager {
        /**
         * Never animate position changes of the window.
         *
         * @see android.R.attr#Window_windowNoMoveAnimation
         * {@hide}
         */
        @UnsupportedAppUsage
        @TestApi
        public static final int PRIVATE_FLAG_NO_MOVE_ANIMATION = 0x00000040;

        /** Window flag: special flag to limit the size of the window to be
@@ -4210,6 +4210,31 @@ public interface WindowManager extends ViewManager {
            return mWallpaperTouchEventsEnabled;
        }

        /**
         * Set whether animations can be played for position changes on this window. If disabled,
         * the window will move to its new position instantly without animating.
         *
         * @attr ref android.R.attr#Window_windowNoMoveAnimation
         */
        public void setCanPlayMoveAnimation(boolean enable) {
            if (enable) {
                privateFlags &= ~PRIVATE_FLAG_NO_MOVE_ANIMATION;
            } else {
                privateFlags |= PRIVATE_FLAG_NO_MOVE_ANIMATION;
            }
        }

        /**
         * @return whether playing an animation during a position change is allowed on this window.
         * This does not guarantee that an animation will be played in all such situations. For
         * example, drag-resizing may move the window but not play an animation.
         *
         * @attr ref android.R.attr#Window_windowNoMoveAnimation
         */
        public boolean canPlayMoveAnimation() {
            return (privateFlags & PRIVATE_FLAG_NO_MOVE_ANIMATION) == 0;
        }

        /**
         * @return the {@link WindowInsets.Type}s that this window is avoiding overlapping.
         */
+5 −0
Original line number Diff line number Diff line
@@ -2548,6 +2548,11 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
            }
            params.privateFlags |= PRIVATE_FLAG_NO_MOVE_ANIMATION;
        }
        if (a.getBoolean(
                R.styleable.Window_windowNoMoveAnimation,
                false)) {
            params.privateFlags |= PRIVATE_FLAG_NO_MOVE_ANIMATION;
        }
        final int sysUiVis = decor.getSystemUiVisibility();
        final int statusLightFlag = View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR;
        final int statusFlag = a.getBoolean(R.styleable.Window_windowLightStatusBar, false)
+4 −0
Original line number Diff line number Diff line
@@ -2221,6 +2221,10 @@
        <!-- Elevation to use for the window. -->
        <attr name="windowElevation" format="dimension" />
        <!-- Flag indicating whether this window should skip movement animations.
             See also {@link android.view.WindowManager.LayoutParams#setCanPlayMoveAnimation} -->
        <attr name="windowNoMoveAnimation" format="boolean" />
        <!-- Whether to clip window content to the outline of the window background. -->
        <attr name="windowClipToOutline" format="boolean" />
Loading