summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorAdam Powell <adamp@google.com>2012-11-27 11:39:11 -0800
committerAdam Powell <adamp@google.com>2012-11-27 11:39:11 -0800
commitbb53dad63b4a1da04b01cdc9f4b0a98b7623a824 (patch)
tree834b9e4c1f03e5fc39b0aac0ab498ebafe614a42 /graphics
parentba4ac51823c59152e2167365b81ac56857b6b4d0 (diff)
downloadframeworks_base-bb53dad63b4a1da04b01cdc9f4b0a98b7623a824.zip
frameworks_base-bb53dad63b4a1da04b01cdc9f4b0a98b7623a824.tar.gz
frameworks_base-bb53dad63b4a1da04b01cdc9f4b0a98b7623a824.tar.bz2
Remove overzealous mutate() sanity check in LayerDrawable
Child drawables of a LayerDrawable should be able to mutate() as a no-op even if they !canConstantState. Bug 7622311 Change-Id: I32c00961310f23aaf9ad868c419cbefb9d27a1d2
Diffstat (limited to 'graphics')
-rw-r--r--graphics/java/android/graphics/drawable/LayerDrawable.java4
1 files changed, 0 insertions, 4 deletions
diff --git a/graphics/java/android/graphics/drawable/LayerDrawable.java b/graphics/java/android/graphics/drawable/LayerDrawable.java
index 0351b71..dd692c6 100644
--- a/graphics/java/android/graphics/drawable/LayerDrawable.java
+++ b/graphics/java/android/graphics/drawable/LayerDrawable.java
@@ -575,10 +575,6 @@ public class LayerDrawable extends Drawable implements Drawable.Callback {
@Override
public Drawable mutate() {
if (!mMutated && super.mutate() == this) {
- if (!mLayerState.canConstantState()) {
- throw new IllegalStateException("One or more children of this LayerDrawable does " +
- "not have constant state; this drawable cannot be mutated.");
- }
mLayerState = new LayerState(mLayerState, this, null);
final ChildDrawable[] array = mLayerState.mChildren;
final int N = mLayerState.mNum;