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

Commit 2139e92c authored by Chet Haase's avatar Chet Haase Committed by Android Git Automerger
Browse files

am 45bb0ca4: Merge "ImageView updates cached drawable dimensions when drawable...

am 45bb0ca4: Merge "ImageView updates cached drawable dimensions when drawable updates" into mnc-dev

* commit '45bb0ca4':
  ImageView updates cached drawable dimensions when drawable updates
parents efe1f4bb 45bb0ca4
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -226,6 +226,15 @@ public class ImageView extends View {
    @Override
    public void invalidateDrawable(Drawable dr) {
        if (dr == mDrawable) {
            if (dr != null) {
                // update cached drawable dimensions if they've changed
                final int w = dr.getIntrinsicWidth();
                final int h = dr.getIntrinsicHeight();
                if (w != mDrawableWidth || h != mDrawableHeight) {
                    mDrawableWidth = w;
                    mDrawableHeight = h;
                }
            }
            /* we invalidate the whole view in this case because it's very
             * hard to know where the drawable actually is. This is made
             * complicated because of the offsets and transformations that