Loading core/api/current.txt +8 −5 Original line number Diff line number Diff line Loading @@ -390,6 +390,7 @@ package android { field public static final int autoVerify = 16844014; // 0x10104ee field public static final int autofillHints = 16844118; // 0x1010556 field public static final int autofilledHighlight = 16844136; // 0x1010568 field public static final int backdropColor; field public static final int background = 16842964; // 0x10100d4 field public static final int backgroundDimAmount = 16842802; // 0x1010032 field public static final int backgroundDimEnabled = 16843295; // 0x101021f Loading Loading @@ -1345,7 +1346,7 @@ package android { field public static final int shouldDisableView = 16843246; // 0x10101ee field public static final int shouldUseDefaultUnfoldTransition = 16844364; // 0x101064c field public static final int showAsAction = 16843481; // 0x10102d9 field public static final int showBackground; field public static final int showBackdrop; field public static final int showClockAndComplications; field public static final int showDefault = 16843258; // 0x10101fa field public static final int showDividers = 16843561; // 0x1010329 Loading Loading @@ -52275,7 +52276,8 @@ package android.view.animation { method protected android.view.animation.Animation clone() throws java.lang.CloneNotSupportedException; method public long computeDurationHint(); method protected void ensureInterpolator(); method @ColorInt public int getBackgroundColor(); method @ColorInt public int getBackdropColor(); method @Deprecated @ColorInt public int getBackgroundColor(); method @Deprecated public boolean getDetachWallpaper(); method public long getDuration(); method public boolean getFillAfter(); Loading @@ -52284,7 +52286,7 @@ package android.view.animation { method public int getRepeatCount(); method public int getRepeatMode(); method protected float getScaleFactor(); method public boolean getShowBackground(); method public boolean getShowBackdrop(); method public long getStartOffset(); method public long getStartTime(); method public boolean getTransformation(long, android.view.animation.Transformation); Loading @@ -52300,7 +52302,8 @@ package android.view.animation { method public void restrictDuration(long); method public void scaleCurrentDuration(float); method public void setAnimationListener(android.view.animation.Animation.AnimationListener); method public void setBackgroundColor(@ColorInt int); method public void setBackdropColor(@ColorInt int); method @Deprecated public void setBackgroundColor(@ColorInt int); method @Deprecated public void setDetachWallpaper(boolean); method public void setDuration(long); method public void setFillAfter(boolean); Loading @@ -52310,7 +52313,7 @@ package android.view.animation { method public void setInterpolator(android.view.animation.Interpolator); method public void setRepeatCount(int); method public void setRepeatMode(int); method public void setShowBackground(boolean); method public void setShowBackdrop(boolean); method public void setStartOffset(long); method public void setStartTime(long); method public void setZAdjustment(int); core/java/android/view/animation/Animation.java +64 −28 Original line number Diff line number Diff line Loading @@ -196,9 +196,9 @@ public abstract class Animation implements Cloneable { private int mZAdjustment; /** * Desired background color behind animation. * The desired color of the backdrop to show behind the animation. */ private int mBackgroundColor; private int mBackdropColor; /** * scalefactor to apply to pivot points, etc. during animation. Subclasses retrieve the Loading @@ -211,10 +211,10 @@ public abstract class Animation implements Cloneable { /** * Whether to show a background behind the windows during the animation. * @see #getShowBackground() * @see #setShowBackground(boolean) * @see #getShowBackdrop() * @see #setShowBackdrop(boolean) */ private boolean mShowBackground; private boolean mShowBackdrop; private boolean mMore = true; private boolean mOneMoreTime = true; Loading Loading @@ -265,7 +265,7 @@ public abstract class Animation implements Cloneable { setZAdjustment(a.getInt(com.android.internal.R.styleable.Animation_zAdjustment, ZORDER_NORMAL)); setBackgroundColor(a.getInt(com.android.internal.R.styleable.Animation_background, 0)); setBackdropColor(a.getInt(com.android.internal.R.styleable.Animation_backdropColor, 0)); setDetachWallpaper( a.getBoolean(com.android.internal.R.styleable.Animation_detachWallpaper, false)); Loading @@ -273,8 +273,8 @@ public abstract class Animation implements Cloneable { a.getBoolean(com.android.internal.R.styleable.Animation_showWallpaper, false)); setHasRoundedCorners( a.getBoolean(com.android.internal.R.styleable.Animation_hasRoundedCorners, false)); setShowBackground( a.getBoolean(com.android.internal.R.styleable.Animation_showBackground, false)); setShowBackdrop( a.getBoolean(com.android.internal.R.styleable.Animation_showBackdrop, false)); final int resID = a.getResourceId(com.android.internal.R.styleable.Animation_interpolator, 0); Loading Loading @@ -646,9 +646,12 @@ public abstract class Animation implements Cloneable { * @param bg The background color. If 0, no background. Currently must * be black, with any desired alpha level. * * @deprecated None of window animations are running with background color. * @see #setBackdropColor(int) for an alternative. */ @Deprecated public void setBackgroundColor(@ColorInt int bg) { mBackgroundColor = bg; // The background color is not needed any more, do nothing. } /** Loading Loading @@ -705,21 +708,35 @@ public abstract class Animation implements Cloneable { } /** * If showBackground is {@code true} and this animation is applied on a window, then the windows * If showBackdrop is {@code true} and this animation is applied on a window, then the windows * in the animation will animate with the background associated with this window behind them. * * The background comes from the {@link android.R.styleable#Theme_colorBackground} that is * applied to this window through its theme. * If no backdrop color is explicitly set, the backdrop's color comes from the * {@link android.R.styleable#Theme_colorBackground} that is applied to this window through its * theme. * * If multiple animating windows have showBackground set to {@code true} during an animation, * the top most window with showBackground set to {@code true} and a valid background color * If multiple animating windows have showBackdrop set to {@code true} during an animation, * the top most window with showBackdrop set to {@code true} and a valid background color * takes precedence. * * @param showBackground Whether to show a background behind the windows during the animation. * @attr ref android.R.styleable#Animation_showBackground * @param showBackdrop Whether to show a background behind the windows during the animation. * @attr ref android.R.styleable#Animation_showBackdrop */ public void setShowBackdrop(boolean showBackdrop) { mShowBackdrop = showBackdrop; } /** * Set the color to use for the backdrop shown behind the animating windows. * * Will only show the backdrop if showBackdrop was set to true. * See {@link #setShowBackdrop(boolean)}. * * @param backdropColor The backdrop color. If 0, the backdrop color will not apply. * @attr ref android.R.styleable#Animation_backdropColor */ public void setShowBackground(boolean showBackground) { mShowBackground = showBackground; public void setBackdropColor(@ColorInt int backdropColor) { mBackdropColor = backdropColor; } /** Loading Loading @@ -822,10 +839,14 @@ public abstract class Animation implements Cloneable { /** * Returns the background color behind the animation. * * @deprecated None of window animations are running with background color. * @see #getBackdropColor() for an alternative. */ @Deprecated @ColorInt public int getBackgroundColor() { return mBackgroundColor; return 0; } /** Loading Loading @@ -869,21 +890,36 @@ public abstract class Animation implements Cloneable { } /** * If showBackground is {@code true} and this animation is applied on a window, then the windows * If showBackdrop is {@code true} and this animation is applied on a window, then the windows * in the animation will animate with the background associated with this window behind them. * * The background comes from the {@link android.R.styleable#Theme_colorBackground} that is * applied to this window through its theme. * If no backdrop color is explicitly set, the backdrop's color comes from the * {@link android.R.styleable#Theme_colorBackground} that is applied to this window * through its theme. * * If multiple animating windows have showBackground set to {@code true} during an animation, * the top most window with showBackground set to {@code true} and a valid background color * If multiple animating windows have showBackdrop set to {@code true} during an animation, * the top most window with showBackdrop set to {@code true} and a valid background color * takes precedence. * * @return if the background of this window should be shown behind the animating windows. * @attr ref android.R.styleable#Animation_showBackground * @return if a backdrop should be shown behind the animating windows. * @attr ref android.R.styleable#Animation_showBackdrop */ public boolean getShowBackdrop() { return mShowBackdrop; } /** * Returns the background color to show behind the animating windows. * * Will only show the background if showBackdrop was set to true. * See {@link #setShowBackdrop(boolean)}. * * @return The backdrop color. If 0, the backdrop color will not apply. * @attr ref android.R.styleable#Animation_backdropColor */ public boolean getShowBackground() { return mShowBackground; @ColorInt public int getBackdropColor() { return mBackdropColor; } /** Loading core/res/res/values/attrs.xml +5 −1 Original line number Diff line number Diff line Loading @@ -6960,9 +6960,13 @@ <!-- Special option for window animations: whether window should have rounded corners. @see ScreenDecorationsUtils#getWindowCornerRadius(Resources) --> <attr name="hasRoundedCorners" format="boolean" /> <!-- Special option for window animations: whether to show a background behind the animating windows. By default the window's background is used unless overridden by the animation. --> <attr name="showBackdrop" format="boolean" /> <!-- Special option for window animations: whether the window's background should be used as a background to the animation. --> <attr name="showBackground" format="boolean" /> <attr name="backdropColor" format="color" /> </declare-styleable> <declare-styleable name="AnimationSet"> Loading core/res/res/values/public-staging.xml +2 −1 Original line number Diff line number Diff line Loading @@ -126,7 +126,7 @@ <public name="allowGameDownscaling" /> <public name="allowGameFpsOverride" /> <public name="localeConfig" /> <public name="showBackground" /> <public name="showBackdrop" /> <public name="removed_useTargetActivityForQuickAccess"/> <public name="removed_inheritKeyStoreKeys" /> <public name="preferKeepClear" /> Loading @@ -152,6 +152,7 @@ <public name="maxDrawableWidth" /> <!-- @hide --> <public name="maxDrawableHeight" /> <public name="backdropColor" /> </staging-public-group> <staging-public-group type="id" first-id="0x01de0000"> Loading libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultTransitionHandler.java +3 −3 Original line number Diff line number Diff line Loading @@ -437,15 +437,15 @@ public class DefaultTransitionHandler implements Transitions.TransitionHandler { cornerRadius = 0; } if (a.getShowBackground()) { if (a.getShowBackdrop()) { if (info.getAnimationOptions().getBackgroundColor() != 0) { // If available use the background color provided through AnimationOptions backgroundColorForTransition = info.getAnimationOptions().getBackgroundColor(); } else if (a.getBackgroundColor() != 0) { } else if (a.getBackdropColor() != 0) { // Otherwise fallback on the background color provided through the animation // definition. backgroundColorForTransition = a.getBackgroundColor(); backgroundColorForTransition = a.getBackdropColor(); } else if (change.getBackgroundColor() != 0) { // Otherwise default to the window's background color if provided through // the theme as the background color for the animation - the top most window Loading Loading
core/api/current.txt +8 −5 Original line number Diff line number Diff line Loading @@ -390,6 +390,7 @@ package android { field public static final int autoVerify = 16844014; // 0x10104ee field public static final int autofillHints = 16844118; // 0x1010556 field public static final int autofilledHighlight = 16844136; // 0x1010568 field public static final int backdropColor; field public static final int background = 16842964; // 0x10100d4 field public static final int backgroundDimAmount = 16842802; // 0x1010032 field public static final int backgroundDimEnabled = 16843295; // 0x101021f Loading Loading @@ -1345,7 +1346,7 @@ package android { field public static final int shouldDisableView = 16843246; // 0x10101ee field public static final int shouldUseDefaultUnfoldTransition = 16844364; // 0x101064c field public static final int showAsAction = 16843481; // 0x10102d9 field public static final int showBackground; field public static final int showBackdrop; field public static final int showClockAndComplications; field public static final int showDefault = 16843258; // 0x10101fa field public static final int showDividers = 16843561; // 0x1010329 Loading Loading @@ -52275,7 +52276,8 @@ package android.view.animation { method protected android.view.animation.Animation clone() throws java.lang.CloneNotSupportedException; method public long computeDurationHint(); method protected void ensureInterpolator(); method @ColorInt public int getBackgroundColor(); method @ColorInt public int getBackdropColor(); method @Deprecated @ColorInt public int getBackgroundColor(); method @Deprecated public boolean getDetachWallpaper(); method public long getDuration(); method public boolean getFillAfter(); Loading @@ -52284,7 +52286,7 @@ package android.view.animation { method public int getRepeatCount(); method public int getRepeatMode(); method protected float getScaleFactor(); method public boolean getShowBackground(); method public boolean getShowBackdrop(); method public long getStartOffset(); method public long getStartTime(); method public boolean getTransformation(long, android.view.animation.Transformation); Loading @@ -52300,7 +52302,8 @@ package android.view.animation { method public void restrictDuration(long); method public void scaleCurrentDuration(float); method public void setAnimationListener(android.view.animation.Animation.AnimationListener); method public void setBackgroundColor(@ColorInt int); method public void setBackdropColor(@ColorInt int); method @Deprecated public void setBackgroundColor(@ColorInt int); method @Deprecated public void setDetachWallpaper(boolean); method public void setDuration(long); method public void setFillAfter(boolean); Loading @@ -52310,7 +52313,7 @@ package android.view.animation { method public void setInterpolator(android.view.animation.Interpolator); method public void setRepeatCount(int); method public void setRepeatMode(int); method public void setShowBackground(boolean); method public void setShowBackdrop(boolean); method public void setStartOffset(long); method public void setStartTime(long); method public void setZAdjustment(int);
core/java/android/view/animation/Animation.java +64 −28 Original line number Diff line number Diff line Loading @@ -196,9 +196,9 @@ public abstract class Animation implements Cloneable { private int mZAdjustment; /** * Desired background color behind animation. * The desired color of the backdrop to show behind the animation. */ private int mBackgroundColor; private int mBackdropColor; /** * scalefactor to apply to pivot points, etc. during animation. Subclasses retrieve the Loading @@ -211,10 +211,10 @@ public abstract class Animation implements Cloneable { /** * Whether to show a background behind the windows during the animation. * @see #getShowBackground() * @see #setShowBackground(boolean) * @see #getShowBackdrop() * @see #setShowBackdrop(boolean) */ private boolean mShowBackground; private boolean mShowBackdrop; private boolean mMore = true; private boolean mOneMoreTime = true; Loading Loading @@ -265,7 +265,7 @@ public abstract class Animation implements Cloneable { setZAdjustment(a.getInt(com.android.internal.R.styleable.Animation_zAdjustment, ZORDER_NORMAL)); setBackgroundColor(a.getInt(com.android.internal.R.styleable.Animation_background, 0)); setBackdropColor(a.getInt(com.android.internal.R.styleable.Animation_backdropColor, 0)); setDetachWallpaper( a.getBoolean(com.android.internal.R.styleable.Animation_detachWallpaper, false)); Loading @@ -273,8 +273,8 @@ public abstract class Animation implements Cloneable { a.getBoolean(com.android.internal.R.styleable.Animation_showWallpaper, false)); setHasRoundedCorners( a.getBoolean(com.android.internal.R.styleable.Animation_hasRoundedCorners, false)); setShowBackground( a.getBoolean(com.android.internal.R.styleable.Animation_showBackground, false)); setShowBackdrop( a.getBoolean(com.android.internal.R.styleable.Animation_showBackdrop, false)); final int resID = a.getResourceId(com.android.internal.R.styleable.Animation_interpolator, 0); Loading Loading @@ -646,9 +646,12 @@ public abstract class Animation implements Cloneable { * @param bg The background color. If 0, no background. Currently must * be black, with any desired alpha level. * * @deprecated None of window animations are running with background color. * @see #setBackdropColor(int) for an alternative. */ @Deprecated public void setBackgroundColor(@ColorInt int bg) { mBackgroundColor = bg; // The background color is not needed any more, do nothing. } /** Loading Loading @@ -705,21 +708,35 @@ public abstract class Animation implements Cloneable { } /** * If showBackground is {@code true} and this animation is applied on a window, then the windows * If showBackdrop is {@code true} and this animation is applied on a window, then the windows * in the animation will animate with the background associated with this window behind them. * * The background comes from the {@link android.R.styleable#Theme_colorBackground} that is * applied to this window through its theme. * If no backdrop color is explicitly set, the backdrop's color comes from the * {@link android.R.styleable#Theme_colorBackground} that is applied to this window through its * theme. * * If multiple animating windows have showBackground set to {@code true} during an animation, * the top most window with showBackground set to {@code true} and a valid background color * If multiple animating windows have showBackdrop set to {@code true} during an animation, * the top most window with showBackdrop set to {@code true} and a valid background color * takes precedence. * * @param showBackground Whether to show a background behind the windows during the animation. * @attr ref android.R.styleable#Animation_showBackground * @param showBackdrop Whether to show a background behind the windows during the animation. * @attr ref android.R.styleable#Animation_showBackdrop */ public void setShowBackdrop(boolean showBackdrop) { mShowBackdrop = showBackdrop; } /** * Set the color to use for the backdrop shown behind the animating windows. * * Will only show the backdrop if showBackdrop was set to true. * See {@link #setShowBackdrop(boolean)}. * * @param backdropColor The backdrop color. If 0, the backdrop color will not apply. * @attr ref android.R.styleable#Animation_backdropColor */ public void setShowBackground(boolean showBackground) { mShowBackground = showBackground; public void setBackdropColor(@ColorInt int backdropColor) { mBackdropColor = backdropColor; } /** Loading Loading @@ -822,10 +839,14 @@ public abstract class Animation implements Cloneable { /** * Returns the background color behind the animation. * * @deprecated None of window animations are running with background color. * @see #getBackdropColor() for an alternative. */ @Deprecated @ColorInt public int getBackgroundColor() { return mBackgroundColor; return 0; } /** Loading Loading @@ -869,21 +890,36 @@ public abstract class Animation implements Cloneable { } /** * If showBackground is {@code true} and this animation is applied on a window, then the windows * If showBackdrop is {@code true} and this animation is applied on a window, then the windows * in the animation will animate with the background associated with this window behind them. * * The background comes from the {@link android.R.styleable#Theme_colorBackground} that is * applied to this window through its theme. * If no backdrop color is explicitly set, the backdrop's color comes from the * {@link android.R.styleable#Theme_colorBackground} that is applied to this window * through its theme. * * If multiple animating windows have showBackground set to {@code true} during an animation, * the top most window with showBackground set to {@code true} and a valid background color * If multiple animating windows have showBackdrop set to {@code true} during an animation, * the top most window with showBackdrop set to {@code true} and a valid background color * takes precedence. * * @return if the background of this window should be shown behind the animating windows. * @attr ref android.R.styleable#Animation_showBackground * @return if a backdrop should be shown behind the animating windows. * @attr ref android.R.styleable#Animation_showBackdrop */ public boolean getShowBackdrop() { return mShowBackdrop; } /** * Returns the background color to show behind the animating windows. * * Will only show the background if showBackdrop was set to true. * See {@link #setShowBackdrop(boolean)}. * * @return The backdrop color. If 0, the backdrop color will not apply. * @attr ref android.R.styleable#Animation_backdropColor */ public boolean getShowBackground() { return mShowBackground; @ColorInt public int getBackdropColor() { return mBackdropColor; } /** Loading
core/res/res/values/attrs.xml +5 −1 Original line number Diff line number Diff line Loading @@ -6960,9 +6960,13 @@ <!-- Special option for window animations: whether window should have rounded corners. @see ScreenDecorationsUtils#getWindowCornerRadius(Resources) --> <attr name="hasRoundedCorners" format="boolean" /> <!-- Special option for window animations: whether to show a background behind the animating windows. By default the window's background is used unless overridden by the animation. --> <attr name="showBackdrop" format="boolean" /> <!-- Special option for window animations: whether the window's background should be used as a background to the animation. --> <attr name="showBackground" format="boolean" /> <attr name="backdropColor" format="color" /> </declare-styleable> <declare-styleable name="AnimationSet"> Loading
core/res/res/values/public-staging.xml +2 −1 Original line number Diff line number Diff line Loading @@ -126,7 +126,7 @@ <public name="allowGameDownscaling" /> <public name="allowGameFpsOverride" /> <public name="localeConfig" /> <public name="showBackground" /> <public name="showBackdrop" /> <public name="removed_useTargetActivityForQuickAccess"/> <public name="removed_inheritKeyStoreKeys" /> <public name="preferKeepClear" /> Loading @@ -152,6 +152,7 @@ <public name="maxDrawableWidth" /> <!-- @hide --> <public name="maxDrawableHeight" /> <public name="backdropColor" /> </staging-public-group> <staging-public-group type="id" first-id="0x01de0000"> Loading
libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultTransitionHandler.java +3 −3 Original line number Diff line number Diff line Loading @@ -437,15 +437,15 @@ public class DefaultTransitionHandler implements Transitions.TransitionHandler { cornerRadius = 0; } if (a.getShowBackground()) { if (a.getShowBackdrop()) { if (info.getAnimationOptions().getBackgroundColor() != 0) { // If available use the background color provided through AnimationOptions backgroundColorForTransition = info.getAnimationOptions().getBackgroundColor(); } else if (a.getBackgroundColor() != 0) { } else if (a.getBackdropColor() != 0) { // Otherwise fallback on the background color provided through the animation // definition. backgroundColorForTransition = a.getBackgroundColor(); backgroundColorForTransition = a.getBackdropColor(); } else if (change.getBackgroundColor() != 0) { // Otherwise default to the window's background color if provided through // the theme as the background color for the animation - the top most window Loading