diff options
author | Romain Guy <romainguy@google.com> | 2013-02-08 22:01:05 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-02-08 22:01:05 +0000 |
commit | 97dcc20e6d6fcce712ab1101bfe03c74aa2b6682 (patch) | |
tree | 65787c432b76178f0d37aeedd48a843292a1b0fa /graphics | |
parent | dad85fb7474c2b7e214ebc06c4cc449f26860c42 (diff) | |
parent | 7ac40e38696aa74d7b7938add8fdbc47180ae424 (diff) | |
download | frameworks_base-97dcc20e6d6fcce712ab1101bfe03c74aa2b6682.zip frameworks_base-97dcc20e6d6fcce712ab1101bfe03c74aa2b6682.tar.gz frameworks_base-97dcc20e6d6fcce712ab1101bfe03c74aa2b6682.tar.bz2 |
Merge "Deprecate useless BitmapDrawable constructor Bug #2590549"
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/java/android/graphics/drawable/BitmapDrawable.java | 7 | ||||
-rw-r--r-- | graphics/java/android/graphics/drawable/Drawable.java | 1 |
2 files changed, 6 insertions, 2 deletions
diff --git a/graphics/java/android/graphics/drawable/BitmapDrawable.java b/graphics/java/android/graphics/drawable/BitmapDrawable.java index 6e41d34..675c4b6 100644 --- a/graphics/java/android/graphics/drawable/BitmapDrawable.java +++ b/graphics/java/android/graphics/drawable/BitmapDrawable.java @@ -74,8 +74,8 @@ public class BitmapDrawable extends Drawable { /** * Create an empty drawable, not dealing with density. - * @deprecated Use {@link #BitmapDrawable(Resources)} to ensure - * that the drawable has correctly set its target density. + * @deprecated Use {@link #BitmapDrawable(android.content.res.Resources, android.graphics.Bitmap)} + * instead to specify a bitmap to draw with and ensure the correct density is set. */ @Deprecated public BitmapDrawable() { @@ -85,7 +85,10 @@ public class BitmapDrawable extends Drawable { /** * Create an empty drawable, setting initial target density based on * the display metrics of the resources. + * @deprecated Use {@link #BitmapDrawable(android.content.res.Resources, android.graphics.Bitmap)} + * instead to specify a bitmap to draw with. */ + @Deprecated @SuppressWarnings({"UnusedParameters"}) public BitmapDrawable(Resources res) { mBitmapState = new BitmapState((Bitmap) null); diff --git a/graphics/java/android/graphics/drawable/Drawable.java b/graphics/java/android/graphics/drawable/Drawable.java index 54d1bf5..37f2250 100644 --- a/graphics/java/android/graphics/drawable/Drawable.java +++ b/graphics/java/android/graphics/drawable/Drawable.java @@ -868,6 +868,7 @@ public abstract class Drawable { } else if (name.equals("inset")) { drawable = new InsetDrawable(); } else if (name.equals("bitmap")) { + //noinspection deprecation drawable = new BitmapDrawable(r); if (r != null) { ((BitmapDrawable) drawable).setTargetDensity(r.getDisplayMetrics()); |