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

Commit a9ba2cdf authored by Alan Viverette's avatar Alan Viverette Committed by Android (Google) Code Review
Browse files

Merge "Ensure ImageView.setImageResource() always resolves Drawable" into lmp-mr1-dev

parents 674a3a21 d739d7bd
Loading
Loading
Loading
Loading
+11 −11
Original line number Diff line number Diff line
@@ -386,7 +386,8 @@ public class ImageView extends View {
     */
    @android.view.RemotableViewMethod
    public void setImageResource(int resId) {
        if (mUri != null || mResource != resId) {
        // The resource configuration may have changed, so we should always
        // try to load the resource even if the resId hasn't changed.
        final int oldWidth = mDrawableWidth;
        final int oldHeight = mDrawableHeight;

@@ -401,7 +402,6 @@ public class ImageView extends View {
        }
        invalidate();
    }
    }

    /**
     * Sets the content of this ImageView to the specified Uri.