Skip to content

Commit 8ed6b6a

Browse files
Romain GuyAndroid (Google) Code Review
authored andcommitted
Merge "Perform a long computation to catch bitmap sizes > 32 bits Bug #7257930" into jb-mr1-dev
2 parents 955b66d + af61cc4 commit 8ed6b6a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/java/android/view/View.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12811,8 +12811,8 @@ public void buildDrawingCache(boolean autoScale) {
1281112811
final boolean opaque = drawingCacheBackgroundColor != 0 || isOpaque();
1281212812
final boolean use32BitCache = attachInfo != null && attachInfo.mUse32BitDrawingCache;
1281312813

12814-
final int projectedBitmapSize = width * height * (opaque && !use32BitCache ? 2 : 4);
12815-
final int drawingCacheSize =
12814+
final long projectedBitmapSize = width * height * (opaque && !use32BitCache ? 2 : 4);
12815+
final long drawingCacheSize =
1281612816
ViewConfiguration.get(mContext).getScaledMaximumDrawingCacheSize();
1281712817
if (width <= 0 || height <= 0 || projectedBitmapSize > drawingCacheSize) {
1281812818
if (width > 0 && height > 0) {

0 commit comments

Comments
 (0)