diff options
author | Romain Guy <romainguy@google.com> | 2012-09-30 10:49:15 -0700 |
---|---|---|
committer | Romain Guy <romainguy@google.com> | 2012-09-30 11:26:39 -0700 |
commit | af61cc4cbb307dc3b9cb6f4aa232a0257157c9d2 (patch) | |
tree | 86d409e02df93bd2dd0f61f1807bf59b8707f63e /core/java | |
parent | 885d82d4274170873919660550c28df9ee14ca1b (diff) | |
download | frameworks_base-af61cc4cbb307dc3b9cb6f4aa232a0257157c9d2.zip frameworks_base-af61cc4cbb307dc3b9cb6f4aa232a0257157c9d2.tar.gz frameworks_base-af61cc4cbb307dc3b9cb6f4aa232a0257157c9d2.tar.bz2 |
Perform a long computation to catch bitmap sizes > 32 bits
Bug #7257930
Change-Id: I28d08024fabe8103251d480524b0b0f2fd2d2aba
Diffstat (limited to 'core/java')
-rw-r--r-- | core/java/android/view/View.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index 1c12738..0cbce89 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -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) { |