Loading graphics/java/android/graphics/drawable/DrawableContainer.java +22 −3 Original line number Diff line number Diff line Loading @@ -88,7 +88,9 @@ public class DrawableContainer extends Drawable implements Drawable.Callback { } @Override public @Config int getChangingConfigurations() { public @Config int getChangingConfigurations() { return super.getChangingConfigurations() | mDrawableContainerState.getChangingConfigurations(); } Loading Loading @@ -210,6 +212,7 @@ public class DrawableContainer extends Drawable implements Drawable.Callback { /** * Change the global fade duration when a new drawable is entering * the scene. * * @param ms The amount of time to fade in milliseconds. */ public void setEnterFadeDuration(int ms) { Loading @@ -219,6 +222,7 @@ public class DrawableContainer extends Drawable implements Drawable.Callback { /** * Change the global fade duration when a new drawable is leaving * the scene. * * @param ms The amount of time to fade in milliseconds. */ public void setExitFadeDuration(int ms) { Loading Loading @@ -375,6 +379,13 @@ public class DrawableContainer extends Drawable implements Drawable.Callback { @Override public void invalidateDrawable(@NonNull Drawable who) { // This may have been called as the result of a tint changing, in // which case we may need to refresh the cached statefulness or // opacity. if (mDrawableContainerState != null) { mDrawableContainerState.invalidateCache(); } if (who == mCurrDrawable && getCallback() != null) { getCallback().invalidateDrawable(this); } Loading Loading @@ -822,8 +833,8 @@ public class DrawableContainer extends Drawable implements Drawable.Callback { mDrawables[pos] = dr; mNumChildren++; mChildrenChangingConfigurations |= dr.getChangingConfigurations(); mCheckedStateful = false; mCheckedOpacity = false; invalidateCache(); mConstantPadding = null; mCheckedPadding = false; Loading @@ -833,6 +844,14 @@ public class DrawableContainer extends Drawable implements Drawable.Callback { return pos; } /** * Invalidates the cached opacity and statefulness. */ void invalidateCache() { mCheckedOpacity = false; mCheckedStateful = false; } final int getCapacity() { return mDrawables.length; } Loading graphics/java/android/graphics/drawable/LayerDrawable.java +9 −1 Original line number Diff line number Diff line Loading @@ -986,6 +986,11 @@ public class LayerDrawable extends Drawable implements Drawable.Callback { if (mSuspendChildInvalidation) { mChildRequestedInvalidation = true; } else { // This may have been called as the result of a tint changing, in // which case we may need to refresh the cached statefulness or // opacity. mLayerState.invalidateCache(); invalidateSelf(); } } Loading Loading @@ -2121,7 +2126,10 @@ public class LayerDrawable extends Drawable implements Drawable.Callback { return true; } public void invalidateCache() { /** * Invalidates the cached opacity and statefulness. */ void invalidateCache() { mCheckedOpacity = false; mCheckedStateful = false; } Loading Loading
graphics/java/android/graphics/drawable/DrawableContainer.java +22 −3 Original line number Diff line number Diff line Loading @@ -88,7 +88,9 @@ public class DrawableContainer extends Drawable implements Drawable.Callback { } @Override public @Config int getChangingConfigurations() { public @Config int getChangingConfigurations() { return super.getChangingConfigurations() | mDrawableContainerState.getChangingConfigurations(); } Loading Loading @@ -210,6 +212,7 @@ public class DrawableContainer extends Drawable implements Drawable.Callback { /** * Change the global fade duration when a new drawable is entering * the scene. * * @param ms The amount of time to fade in milliseconds. */ public void setEnterFadeDuration(int ms) { Loading @@ -219,6 +222,7 @@ public class DrawableContainer extends Drawable implements Drawable.Callback { /** * Change the global fade duration when a new drawable is leaving * the scene. * * @param ms The amount of time to fade in milliseconds. */ public void setExitFadeDuration(int ms) { Loading Loading @@ -375,6 +379,13 @@ public class DrawableContainer extends Drawable implements Drawable.Callback { @Override public void invalidateDrawable(@NonNull Drawable who) { // This may have been called as the result of a tint changing, in // which case we may need to refresh the cached statefulness or // opacity. if (mDrawableContainerState != null) { mDrawableContainerState.invalidateCache(); } if (who == mCurrDrawable && getCallback() != null) { getCallback().invalidateDrawable(this); } Loading Loading @@ -822,8 +833,8 @@ public class DrawableContainer extends Drawable implements Drawable.Callback { mDrawables[pos] = dr; mNumChildren++; mChildrenChangingConfigurations |= dr.getChangingConfigurations(); mCheckedStateful = false; mCheckedOpacity = false; invalidateCache(); mConstantPadding = null; mCheckedPadding = false; Loading @@ -833,6 +844,14 @@ public class DrawableContainer extends Drawable implements Drawable.Callback { return pos; } /** * Invalidates the cached opacity and statefulness. */ void invalidateCache() { mCheckedOpacity = false; mCheckedStateful = false; } final int getCapacity() { return mDrawables.length; } Loading
graphics/java/android/graphics/drawable/LayerDrawable.java +9 −1 Original line number Diff line number Diff line Loading @@ -986,6 +986,11 @@ public class LayerDrawable extends Drawable implements Drawable.Callback { if (mSuspendChildInvalidation) { mChildRequestedInvalidation = true; } else { // This may have been called as the result of a tint changing, in // which case we may need to refresh the cached statefulness or // opacity. mLayerState.invalidateCache(); invalidateSelf(); } } Loading Loading @@ -2121,7 +2126,10 @@ public class LayerDrawable extends Drawable implements Drawable.Callback { return true; } public void invalidateCache() { /** * Invalidates the cached opacity and statefulness. */ void invalidateCache() { mCheckedOpacity = false; mCheckedStateful = false; } Loading