diff options
author | Chet Haase <chet@google.com> | 2014-09-02 16:11:26 -0700 |
---|---|---|
committer | Chet Haase <chet@google.com> | 2014-09-02 16:28:48 -0700 |
commit | 014e14b242848eaa86a10562e1c494143a0149aa (patch) | |
tree | b5948fcd36a3d69aa105894d75ab4c71ffef8c32 /graphics/java | |
parent | d06cd2b1bd067e911d48c3b0c81a503c5772c98f (diff) | |
download | frameworks_base-014e14b242848eaa86a10562e1c494143a0149aa.zip frameworks_base-014e14b242848eaa86a10562e1c494143a0149aa.tar.gz frameworks_base-014e14b242848eaa86a10562e1c494143a0149aa.tar.bz2 |
Fix behavior of inflating InsetDrawable
A recent change to InsetDrawable changed the behavior of inflating
an InsetDrawable when it already had a valid bitmap. The new behavior
avoids throwing an exception with a bad resource where it used to
throw, because the existence of the bitmap makes it avoid trying to
load the resource at all.
The fix is to reintroduce the old behavior of forcing it to load the
resource regardless of the state of its bitmap.
Issue #17068252 InsetDrawable inflation CTS test is failing
Change-Id: I941388730d4479f8f4747a7985754ffdf5133f04
Diffstat (limited to 'graphics/java')
-rw-r--r-- | graphics/java/android/graphics/drawable/InsetDrawable.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/graphics/java/android/graphics/drawable/InsetDrawable.java b/graphics/java/android/graphics/drawable/InsetDrawable.java index a20b6d8..384226f 100644 --- a/graphics/java/android/graphics/drawable/InsetDrawable.java +++ b/graphics/java/android/graphics/drawable/InsetDrawable.java @@ -86,6 +86,8 @@ public class InsetDrawable extends Drawable implements Drawable.Callback { throws XmlPullParserException, IOException { final TypedArray a = r.obtainAttributes(attrs, R.styleable.InsetDrawable); super.inflateWithAttributes(r, parser, a, R.styleable.InsetDrawable_visible); + + mInsetState.mDrawable = null; updateStateFromTypedArray(a); // Load inner XML elements. |