diff options
author | Christopher Lais <chris+android@zenthought.org> | 2011-01-13 15:02:05 -0600 |
---|---|---|
committer | Christopher Lais <chris+android@zenthought.org> | 2011-01-14 00:43:16 -0600 |
commit | 8d71769b9bc3d0e72b26217d9059ce4473a91fe5 (patch) | |
tree | ae2ce534bbb4d99850c7efe553bdc6d374f3a113 /graphics | |
parent | a220a2979937700024662be0f8fc166ca65506ed (diff) | |
download | frameworks_base-8d71769b9bc3d0e72b26217d9059ce4473a91fe5.zip frameworks_base-8d71769b9bc3d0e72b26217d9059ce4473a91fe5.tar.gz frameworks_base-8d71769b9bc3d0e72b26217d9059ce4473a91fe5.tar.bz2 |
Don't drop the drawable cache completely on configuration change
There was a lot of fancy code just above the clear to ensure
that drawables that aren't affected by the change are kept,
then the entire array was cleared. This patch removes the
clear, so that the drawables that haven't changed are really
kept, matching the logs, comments and larger part of the code.
This patch also fixes the various constant states to return
correct ChangingConfigurations.
Change-Id: Ic11f6179537318d3de16dc58286989eb62a07f15
Old-Change-Id: I22495e6ed232dfe056207ce5155405af1fa82428
Diffstat (limited to 'graphics')
12 files changed, 12 insertions, 12 deletions
diff --git a/graphics/java/android/graphics/drawable/AnimatedRotateDrawable.java b/graphics/java/android/graphics/drawable/AnimatedRotateDrawable.java index 58206d4..49f497c 100644 --- a/graphics/java/android/graphics/drawable/AnimatedRotateDrawable.java +++ b/graphics/java/android/graphics/drawable/AnimatedRotateDrawable.java @@ -204,7 +204,7 @@ public class AnimatedRotateDrawable extends Drawable implements Drawable.Callbac @Override public ConstantState getConstantState() { if (mState.canConstantState()) { - mState.mChangingConfigurations = super.getChangingConfigurations(); + mState.mChangingConfigurations = getChangingConfigurations(); return mState; } return null; diff --git a/graphics/java/android/graphics/drawable/BitmapDrawable.java b/graphics/java/android/graphics/drawable/BitmapDrawable.java index 32111e8..0b8465e 100644 --- a/graphics/java/android/graphics/drawable/BitmapDrawable.java +++ b/graphics/java/android/graphics/drawable/BitmapDrawable.java @@ -427,7 +427,7 @@ public class BitmapDrawable extends Drawable { @Override public final ConstantState getConstantState() { - mBitmapState.mChangingConfigurations = super.getChangingConfigurations(); + mBitmapState.mChangingConfigurations = getChangingConfigurations(); return mBitmapState; } diff --git a/graphics/java/android/graphics/drawable/ClipDrawable.java b/graphics/java/android/graphics/drawable/ClipDrawable.java index a772871..2b3bd80 100644 --- a/graphics/java/android/graphics/drawable/ClipDrawable.java +++ b/graphics/java/android/graphics/drawable/ClipDrawable.java @@ -229,7 +229,7 @@ public class ClipDrawable extends Drawable implements Drawable.Callback { @Override public ConstantState getConstantState() { if (mClipState.canConstantState()) { - mClipState.mChangingConfigurations = super.getChangingConfigurations(); + mClipState.mChangingConfigurations = getChangingConfigurations(); return mClipState; } return null; diff --git a/graphics/java/android/graphics/drawable/ColorDrawable.java b/graphics/java/android/graphics/drawable/ColorDrawable.java index 604c602..0985c1b 100644 --- a/graphics/java/android/graphics/drawable/ColorDrawable.java +++ b/graphics/java/android/graphics/drawable/ColorDrawable.java @@ -124,7 +124,7 @@ public class ColorDrawable extends Drawable { @Override public ConstantState getConstantState() { - mState.mChangingConfigurations = super.getChangingConfigurations(); + mState.mChangingConfigurations = getChangingConfigurations(); return mState; } diff --git a/graphics/java/android/graphics/drawable/DrawableContainer.java b/graphics/java/android/graphics/drawable/DrawableContainer.java index c6f57d4..b13f26f 100644 --- a/graphics/java/android/graphics/drawable/DrawableContainer.java +++ b/graphics/java/android/graphics/drawable/DrawableContainer.java @@ -236,7 +236,7 @@ public class DrawableContainer extends Drawable implements Drawable.Callback { @Override public ConstantState getConstantState() { if (mDrawableContainerState.canConstantState()) { - mDrawableContainerState.mChangingConfigurations = super.getChangingConfigurations(); + mDrawableContainerState.mChangingConfigurations = getChangingConfigurations(); return mDrawableContainerState; } return null; diff --git a/graphics/java/android/graphics/drawable/GradientDrawable.java b/graphics/java/android/graphics/drawable/GradientDrawable.java index 33ecbea..308fd08 100644 --- a/graphics/java/android/graphics/drawable/GradientDrawable.java +++ b/graphics/java/android/graphics/drawable/GradientDrawable.java @@ -832,7 +832,7 @@ public class GradientDrawable extends Drawable { @Override public ConstantState getConstantState() { - mGradientState.mChangingConfigurations = super.getChangingConfigurations(); + mGradientState.mChangingConfigurations = getChangingConfigurations(); return mGradientState; } diff --git a/graphics/java/android/graphics/drawable/InsetDrawable.java b/graphics/java/android/graphics/drawable/InsetDrawable.java index a9c983e..67c928c 100644 --- a/graphics/java/android/graphics/drawable/InsetDrawable.java +++ b/graphics/java/android/graphics/drawable/InsetDrawable.java @@ -238,7 +238,7 @@ public class InsetDrawable extends Drawable implements Drawable.Callback @Override public ConstantState getConstantState() { if (mInsetState.canConstantState()) { - mInsetState.mChangingConfigurations = super.getChangingConfigurations(); + mInsetState.mChangingConfigurations = getChangingConfigurations(); return mInsetState; } return null; diff --git a/graphics/java/android/graphics/drawable/LayerDrawable.java b/graphics/java/android/graphics/drawable/LayerDrawable.java index 8047dd4..234b80d 100644 --- a/graphics/java/android/graphics/drawable/LayerDrawable.java +++ b/graphics/java/android/graphics/drawable/LayerDrawable.java @@ -523,7 +523,7 @@ public class LayerDrawable extends Drawable implements Drawable.Callback { @Override public ConstantState getConstantState() { if (mLayerState.canConstantState()) { - mLayerState.mChangingConfigurations = super.getChangingConfigurations(); + mLayerState.mChangingConfigurations = getChangingConfigurations(); return mLayerState; } return null; diff --git a/graphics/java/android/graphics/drawable/NinePatchDrawable.java b/graphics/java/android/graphics/drawable/NinePatchDrawable.java index 00416d8..6768186 100644 --- a/graphics/java/android/graphics/drawable/NinePatchDrawable.java +++ b/graphics/java/android/graphics/drawable/NinePatchDrawable.java @@ -327,7 +327,7 @@ public class NinePatchDrawable extends Drawable { @Override public ConstantState getConstantState() { - mNinePatchState.mChangingConfigurations = super.getChangingConfigurations(); + mNinePatchState.mChangingConfigurations = getChangingConfigurations(); return mNinePatchState; } diff --git a/graphics/java/android/graphics/drawable/RotateDrawable.java b/graphics/java/android/graphics/drawable/RotateDrawable.java index 9c47dab..1428efa 100644 --- a/graphics/java/android/graphics/drawable/RotateDrawable.java +++ b/graphics/java/android/graphics/drawable/RotateDrawable.java @@ -189,7 +189,7 @@ public class RotateDrawable extends Drawable implements Drawable.Callback { @Override public ConstantState getConstantState() { if (mState.canConstantState()) { - mState.mChangingConfigurations = super.getChangingConfigurations(); + mState.mChangingConfigurations = getChangingConfigurations(); return mState; } return null; diff --git a/graphics/java/android/graphics/drawable/ScaleDrawable.java b/graphics/java/android/graphics/drawable/ScaleDrawable.java index b623d80..a95eb06 100644 --- a/graphics/java/android/graphics/drawable/ScaleDrawable.java +++ b/graphics/java/android/graphics/drawable/ScaleDrawable.java @@ -237,7 +237,7 @@ public class ScaleDrawable extends Drawable implements Drawable.Callback { @Override public ConstantState getConstantState() { if (mScaleState.canConstantState()) { - mScaleState.mChangingConfigurations = super.getChangingConfigurations(); + mScaleState.mChangingConfigurations = getChangingConfigurations(); return mScaleState; } return null; diff --git a/graphics/java/android/graphics/drawable/ShapeDrawable.java b/graphics/java/android/graphics/drawable/ShapeDrawable.java index be1892e..0201fb0 100644 --- a/graphics/java/android/graphics/drawable/ShapeDrawable.java +++ b/graphics/java/android/graphics/drawable/ShapeDrawable.java @@ -348,7 +348,7 @@ public class ShapeDrawable extends Drawable { @Override public ConstantState getConstantState() { - mShapeState.mChangingConfigurations = super.getChangingConfigurations(); + mShapeState.mChangingConfigurations = getChangingConfigurations(); return mShapeState; } |