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

Commit 92f7a52e authored by Robin Lee's avatar Robin Lee
Browse files

Make FLAG_NO_MOVE_ANIMATION public

Bug: 226453118
Test: CtsWindowManagerDeviceTestCases
Change-Id: Icd2458b05d5783a2025bc3d1fbb60ee837e0c512
parent 5bc4f546
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -1856,6 +1856,7 @@ package android {
    field public static final int windowMinWidthMajor = 16843606; // 0x1010356
    field public static final int windowMinWidthMajor = 16843606; // 0x1010356
    field public static final int windowMinWidthMinor = 16843607; // 0x1010357
    field public static final int windowMinWidthMinor = 16843607; // 0x1010357
    field public static final int windowNoDisplay = 16843294; // 0x101021e
    field public static final int windowNoDisplay = 16843294; // 0x101021e
    field public static final int windowNoMoveAnimation;
    field public static final int windowNoTitle = 16842838; // 0x1010056
    field public static final int windowNoTitle = 16842838; // 0x1010056
    field @Deprecated public static final int windowOverscan = 16843727; // 0x10103cf
    field @Deprecated public static final int windowOverscan = 16843727; // 0x10103cf
    field public static final int windowReenterTransition = 16843951; // 0x10104af
    field public static final int windowReenterTransition = 16843951; // 0x10104af
@@ -53779,6 +53780,7 @@ package android.view {
    ctor public WindowManager.LayoutParams(int, int, int, int, int, int, int);
    ctor public WindowManager.LayoutParams(int, int, int, int, int, int, int);
    ctor public WindowManager.LayoutParams(android.os.Parcel);
    ctor public WindowManager.LayoutParams(android.os.Parcel);
    method public boolean areWallpaperTouchEventsEnabled();
    method public boolean areWallpaperTouchEventsEnabled();
    method public boolean canPlayMoveAnimation();
    method public final int copyFrom(android.view.WindowManager.LayoutParams);
    method public final int copyFrom(android.view.WindowManager.LayoutParams);
    method public String debug(String);
    method public String debug(String);
    method public int describeContents();
    method public int describeContents();
@@ -53791,6 +53793,7 @@ package android.view {
    method public boolean isHdrConversionEnabled();
    method public boolean isHdrConversionEnabled();
    method public static boolean mayUseInputMethod(int);
    method public static boolean mayUseInputMethod(int);
    method public void setBlurBehindRadius(@IntRange(from=0) int);
    method public void setBlurBehindRadius(@IntRange(from=0) int);
    method public void setCanPlayMoveAnimation(boolean);
    method public void setColorMode(int);
    method public void setColorMode(int);
    method public void setFitInsetsIgnoringVisibility(boolean);
    method public void setFitInsetsIgnoringVisibility(boolean);
    method public void setFitInsetsSides(int);
    method public void setFitInsetsSides(int);
+0 −1
Original line number Original line Diff line number Diff line
@@ -3299,7 +3299,6 @@ package android.view {
    method public final void setWindowContextToken(@NonNull android.os.IBinder);
    method public final void setWindowContextToken(@NonNull android.os.IBinder);
    field public static final int ACCESSIBILITY_TITLE_CHANGED = 33554432; // 0x2000000
    field public static final int ACCESSIBILITY_TITLE_CHANGED = 33554432; // 0x2000000
    field public static final int FLAG_SLIPPERY = 536870912; // 0x20000000
    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 CharSequence accessibilityTitle;
    field public int privateFlags;
    field public int privateFlags;
  }
  }
+26 −1
Original line number Original line Diff line number Diff line
@@ -2752,10 +2752,10 @@ public interface WindowManager extends ViewManager {
        /**
        /**
         * Never animate position changes of the window.
         * Never animate position changes of the window.
         *
         *
         * @see android.R.attr#Window_windowNoMoveAnimation
         * {@hide}
         * {@hide}
         */
         */
        @UnsupportedAppUsage
        @UnsupportedAppUsage
        @TestApi
        public static final int PRIVATE_FLAG_NO_MOVE_ANIMATION = 0x00000040;
        public static final int PRIVATE_FLAG_NO_MOVE_ANIMATION = 0x00000040;


        /** Window flag: special flag to limit the size of the window to be
        /** Window flag: special flag to limit the size of the window to be
@@ -4177,6 +4177,31 @@ public interface WindowManager extends ViewManager {
            return mWallpaperTouchEventsEnabled;
            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.
         * @return the {@link WindowInsets.Type}s that this window is avoiding overlapping.
         */
         */
+5 −0
Original line number Original line Diff line number Diff line
@@ -2537,6 +2537,11 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
            }
            }
            params.privateFlags |= PRIVATE_FLAG_NO_MOVE_ANIMATION;
            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 sysUiVis = decor.getSystemUiVisibility();
        final int statusLightFlag = View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR;
        final int statusLightFlag = View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR;
        final int statusFlag = a.getBoolean(R.styleable.Window_windowLightStatusBar, false)
        final int statusFlag = a.getBoolean(R.styleable.Window_windowLightStatusBar, false)
+4 −0
Original line number Original line Diff line number Diff line
@@ -2221,6 +2221,10 @@
        <!-- Elevation to use for the window. -->
        <!-- Elevation to use for the window. -->
        <attr name="windowElevation" format="dimension" />
        <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. -->
        <!-- Whether to clip window content to the outline of the window background. -->
        <attr name="windowClipToOutline" format="boolean" />
        <attr name="windowClipToOutline" format="boolean" />
Loading