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

Commit 82af13ea authored by Chris Craik's avatar Chris Craik
Browse files

Remove ImageViewBitmapDrawable class

Change-Id: Ie25b4b39cb5d0984981c153b036ea9ade95a10f7
parent d0756379
Loading
Loading
Loading
Loading
+2 −14
Original line number Diff line number Diff line
@@ -91,7 +91,7 @@ public class ImageView extends View {
    private boolean mColorMod = false;

    private Drawable mDrawable = null;
    private ImageViewBitmapDrawable mRecycleableBitmapDrawable = null;
    private BitmapDrawable mRecycleableBitmapDrawable = null;
    private ColorStateList mDrawableTintList = null;
    private PorterDuff.Mode mDrawableTintMode = null;
    private boolean mHasDrawableTint = false;
@@ -571,17 +571,6 @@ public class ImageView extends View {
        }
    }

    private static class ImageViewBitmapDrawable extends BitmapDrawable {
        public ImageViewBitmapDrawable(Resources res, Bitmap bitmap) {
            super(res, bitmap);
        }

        @Override
        public void setBitmap(Bitmap bitmap) {
            super.setBitmap(bitmap);
        }
    };

    /**
     * Sets a Bitmap as the content of this ImageView.
     * 
@@ -593,8 +582,7 @@ public class ImageView extends View {
        // instead of doing an object reference comparison
        mDrawable = null;
        if (mRecycleableBitmapDrawable == null) {
            mRecycleableBitmapDrawable = new ImageViewBitmapDrawable(
                    mContext.getResources(), bm);
            mRecycleableBitmapDrawable = new BitmapDrawable(mContext.getResources(), bm);
        } else {
            mRecycleableBitmapDrawable.setBitmap(bm);
        }
+1 −1
Original line number Diff line number Diff line
@@ -220,7 +220,7 @@ public class BitmapDrawable extends Drawable {
    }

    /** @hide */
    protected void setBitmap(Bitmap bitmap) {
    public void setBitmap(Bitmap bitmap) {
        if (mBitmapState.mBitmap != bitmap) {
            mBitmapState.mBitmap = bitmap;
            computeBitmapSize();