diff options
Diffstat (limited to 'graphics/java/android/graphics/drawable/Drawable.java')
-rw-r--r-- | graphics/java/android/graphics/drawable/Drawable.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/graphics/java/android/graphics/drawable/Drawable.java b/graphics/java/android/graphics/drawable/Drawable.java index 36a4d26d62bb..8af2fd8bbb5e 100644 --- a/graphics/java/android/graphics/drawable/Drawable.java +++ b/graphics/java/android/graphics/drawable/Drawable.java @@ -1171,9 +1171,13 @@ public abstract class Drawable { /** * Create a drawable from an inputstream, using the given resources and * value to determine density information. + * + * @deprecated Prefer the version without an Options object. */ - public static Drawable createFromResourceStream(Resources res, TypedValue value, - InputStream is, String srcName, BitmapFactory.Options opts) { + @Nullable + public static Drawable createFromResourceStream(@Nullable Resources res, + @Nullable TypedValue value, @Nullable InputStream is, @Nullable String srcName, + @Nullable BitmapFactory.Options opts) { if (is == null) { return null; } @@ -1197,7 +1201,6 @@ public abstract class Drawable { // an application in compatibility mode, without scaling those down // to the compatibility density only to have them scaled back up when // drawn to the screen. - if (opts == null) opts = new BitmapFactory.Options(); opts.inScreenDensity = Drawable.resolveDensity(res, 0); Bitmap bm = BitmapFactory.decodeResourceStream(res, value, is, pad, opts); if (bm != null) { |