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

Commit e4b988b6 authored by Android (Google) Code Review's avatar Android (Google) Code Review Committed by The Android Open Source Project
Browse files

am 52bce9c4: Merge change 5680 into donut

Merge commit '52bce9c4'

* commit '52bce9c4':
  Fixes #1949502. Prevents an NPE in View.buildDrawingCache().
parents 8efa48e7 52bce9c4
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -5922,8 +5922,9 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility
            int height = mBottom - mTop;

            final AttachInfo attachInfo = mAttachInfo;
            final boolean scalingRequired = attachInfo != null && attachInfo.mScalingRequired;

            if (autoScale && attachInfo != null && attachInfo.mScalingRequired) {
            if (autoScale && scalingRequired) {
                width = (int) ((width * attachInfo.mApplicationScale) + 0.5f);
                height = (int) ((height * attachInfo.mApplicationScale) + 0.5f);
            }
@@ -6014,7 +6015,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility
            computeScroll();
            final int restoreCount = canvas.save();
            
            if (autoScale && attachInfo.mScalingRequired) {
            if (autoScale && scalingRequired) {
                final float scale = attachInfo.mApplicationScale;
                canvas.scale(scale, scale);
            }