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

Commit d4f1d0c4 authored by Chris Craik's avatar Chris Craik Committed by Android (Google) Code Review
Browse files

Merge "Remove ImageViewBitmapDrawable class"

parents 8d2f6587 82af13ea
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();