Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7ac40e38 authored by Romain Guy's avatar Romain Guy
Browse files

Deprecate useless BitmapDrawable constructor

Bug #2590549

Change-Id: Icb45bf2d9836c43ed0825105f64d7b98afcdcdac
parent d71ff91d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -9376,7 +9376,7 @@ package android.graphics.drawable {
  public class BitmapDrawable extends android.graphics.drawable.Drawable {
    ctor public deprecated BitmapDrawable();
    ctor public BitmapDrawable(android.content.res.Resources);
    ctor public deprecated BitmapDrawable(android.content.res.Resources);
    ctor public deprecated BitmapDrawable(android.graphics.Bitmap);
    ctor public BitmapDrawable(android.content.res.Resources, android.graphics.Bitmap);
    ctor public deprecated BitmapDrawable(java.lang.String);
+5 −2
Original line number Diff line number Diff line
@@ -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);
+1 −0
Original line number Diff line number Diff line
@@ -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());