diff options
author | Cary Clark <cary@android.com> | 2010-01-06 10:53:43 -0500 |
---|---|---|
committer | Cary Clark <cary@android.com> | 2010-01-06 10:53:43 -0500 |
commit | e57b7b09b198699adea91b6f9729007fda00834e (patch) | |
tree | 254cfd4fbb7bac2839b3e20e912a66d2503ffcbf | |
parent | 3886333644467beeaf60c13fb94f242538067765 (diff) | |
download | frameworks_base-e57b7b09b198699adea91b6f9729007fda00834e.zip frameworks_base-e57b7b09b198699adea91b6f9729007fda00834e.tar.gz frameworks_base-e57b7b09b198699adea91b6f9729007fda00834e.tar.bz2 |
set nine patch padding initially to an empty rectangle
Formerly, the padding state was set to null. Copying the padding
state fails when the null rectangle contents are referenced.
fixes http://b/2219785
-rw-r--r-- | graphics/java/android/graphics/drawable/NinePatchDrawable.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/graphics/java/android/graphics/drawable/NinePatchDrawable.java b/graphics/java/android/graphics/drawable/NinePatchDrawable.java index 67a8015..bad94fb 100644 --- a/graphics/java/android/graphics/drawable/NinePatchDrawable.java +++ b/graphics/java/android/graphics/drawable/NinePatchDrawable.java @@ -81,7 +81,7 @@ public class NinePatchDrawable extends Drawable { */ @Deprecated public NinePatchDrawable(NinePatch patch) { - this(new NinePatchState(patch, null), null); + this(new NinePatchState(patch, new Rect()), null); } /** @@ -89,7 +89,7 @@ public class NinePatchDrawable extends Drawable { * based on the display metrics of the resources. */ public NinePatchDrawable(Resources res, NinePatch patch) { - this(new NinePatchState(patch, null), res); + this(new NinePatchState(patch, new Rect()), res); mNinePatchState.mTargetDensity = mTargetDensity; } |