diff options
author | Alan Viverette <alanv@google.com> | 2015-02-26 12:52:47 -0800 |
---|---|---|
committer | Alan Viverette <alanv@google.com> | 2015-02-26 12:52:47 -0800 |
commit | 102a6bff77c618112762245dbd798c8d7f6d44ea (patch) | |
tree | c83f0a9b4924bd2a354190f914bede7027cc0db9 /graphics | |
parent | 40d13f260c50ac5235f7405e1c3a83d6f46a8d62 (diff) | |
download | frameworks_base-102a6bff77c618112762245dbd798c8d7f6d44ea.zip frameworks_base-102a6bff77c618112762245dbd798c8d7f6d44ea.tar.gz frameworks_base-102a6bff77c618112762245dbd798c8d7f6d44ea.tar.bz2 |
Propagate original Resources to DrawableContainer if no override set
Also fixes a double-add in ASLD.
Bug: 19498949
Change-Id: I9e7e0a0fb22a23518c80c1b099f8da0e0c1f53d8
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/java/android/graphics/drawable/AnimatedStateListDrawable.java | 2 | ||||
-rw-r--r-- | graphics/java/android/graphics/drawable/DrawableContainer.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/graphics/java/android/graphics/drawable/AnimatedStateListDrawable.java b/graphics/java/android/graphics/drawable/AnimatedStateListDrawable.java index 4af5946..2c603e2 100644 --- a/graphics/java/android/graphics/drawable/AnimatedStateListDrawable.java +++ b/graphics/java/android/graphics/drawable/AnimatedStateListDrawable.java @@ -594,7 +594,7 @@ public class AnimatedStateListDrawable extends StateListDrawable { mTransitions.append(keyToFrom, pos | REVERSED_BIT | reversibleBit); } - return addChild(anim); + return pos; } int addStateSet(@NonNull int[] stateSet, @NonNull Drawable drawable, int id) { diff --git a/graphics/java/android/graphics/drawable/DrawableContainer.java b/graphics/java/android/graphics/drawable/DrawableContainer.java index c4794d9..434134a 100644 --- a/graphics/java/android/graphics/drawable/DrawableContainer.java +++ b/graphics/java/android/graphics/drawable/DrawableContainer.java @@ -685,7 +685,7 @@ public class DrawableContainer extends Drawable implements Drawable.Callback { DrawableContainerState(DrawableContainerState orig, DrawableContainer owner, Resources res) { mOwner = owner; - mRes = res; + mRes = res != null ? res : orig != null ? orig.mRes : null; if (orig != null) { mChangingConfigurations = orig.mChangingConfigurations; |