summaryrefslogtreecommitdiffstats
path: root/graphics/java
diff options
context:
space:
mode:
authorRiley Andrews <riandrews@google.com>2015-11-03 23:36:52 -0800
committerThe Android Automerger <android-build@google.com>2015-11-04 13:00:18 -0800
commitb38fcc375ce2d13b3e378b21673b6cd5b273e100 (patch)
tree2f9973749d5641d5a5f5efaef3ec7bce4ec71df5 /graphics/java
parentb38c1e8cfd27feb4dd17dfcb9b927777d2bf3024 (diff)
downloadframeworks_base-b38fcc375ce2d13b3e378b21673b6cd5b273e100.zip
frameworks_base-b38fcc375ce2d13b3e378b21673b6cd5b273e100.tar.gz
frameworks_base-b38fcc375ce2d13b3e378b21673b6cd5b273e100.tar.bz2
Convert ashmem bitmap thresholds to constants.
Bug 25256717 Change-Id: I23e2795ef8798d83bf60dcbd6ff2e7093fcaa9b0 Signed-off-by: Riley Andrews <riandrews@google.com>
Diffstat (limited to 'graphics/java')
-rw-r--r--graphics/java/android/graphics/drawable/Icon.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/graphics/java/android/graphics/drawable/Icon.java b/graphics/java/android/graphics/drawable/Icon.java
index 44d7530..d800acb 100644
--- a/graphics/java/android/graphics/drawable/Icon.java
+++ b/graphics/java/android/graphics/drawable/Icon.java
@@ -377,6 +377,9 @@ public final class Icon implements Parcelable {
return loadDrawable(context);
}
+ /** @hide */
+ public static final int MIN_ASHMEM_ICON_SIZE = 128 * (1 << 10);
+
/**
* Puts the memory used by this instance into Ashmem memory, if possible.
* @hide
@@ -384,7 +387,7 @@ public final class Icon implements Parcelable {
public void convertToAshmem() {
if (mType == TYPE_BITMAP &&
getBitmap().isMutable() &&
- getBitmap().getAllocationByteCount() >= (128 * (1 << 10))) {
+ getBitmap().getAllocationByteCount() >= MIN_ASHMEM_ICON_SIZE) {
setBitmap(getBitmap().createAshmemBitmap());
}
}