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

Commit af61cc4c authored by Romain Guy's avatar Romain Guy
Browse files

Perform a long computation to catch bitmap sizes > 32 bits

Bug #7257930

Change-Id: I28d08024fabe8103251d480524b0b0f2fd2d2aba
parent 885d82d4
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -12819,8 +12819,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
            final boolean opaque = drawingCacheBackgroundColor != 0 || isOpaque();
            final boolean use32BitCache = attachInfo != null && attachInfo.mUse32BitDrawingCache;
            final int projectedBitmapSize = width * height * (opaque && !use32BitCache ? 2 : 4);
            final int drawingCacheSize =
            final long projectedBitmapSize = width * height * (opaque && !use32BitCache ? 2 : 4);
            final long drawingCacheSize =
                    ViewConfiguration.get(mContext).getScaledMaximumDrawingCacheSize();
            if (width <= 0 || height <= 0 || projectedBitmapSize > drawingCacheSize) {
                if (width > 0 && height > 0) {