Loading core/java/android/app/Notification.java +3 −1 Original line number Diff line number Diff line Loading @@ -3972,7 +3972,9 @@ public class Notification implements Parcelable @Override public void purgeResources() { super.purgeResources(); if (mPicture != null && mPicture.isMutable()) { if (mPicture != null && mPicture.isMutable() && mPicture.getAllocationByteCount() >= (128 * (1 << 10))) { mPicture = mPicture.createAshmemBitmap(); } if (mBigLargeIcon != null) { Loading core/jni/android/graphics/Bitmap.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ #include <cutils/ashmem.h> #define DEBUG_PARCEL 0 #define ASHMEM_BITMAP_MIN_SIZE (128 * (1 << 10)) namespace android { Loading Loading @@ -993,7 +994,7 @@ static jobject Bitmap_createFromParcel(JNIEnv* env, jobject, jobject parcel) { // Map the bitmap in place from the ashmem region if possible otherwise copy. Bitmap* nativeBitmap; if (blob.fd() >= 0 && (blob.isMutable() || !isMutable)) { if (blob.fd() >= 0 && (blob.isMutable() || !isMutable) && (size >= ASHMEM_BITMAP_MIN_SIZE)) { #if DEBUG_PARCEL ALOGD("Bitmap.createFromParcel: mapped contents of %s bitmap from %s blob " "(fds %s)", Loading graphics/java/android/graphics/drawable/Icon.java +3 −1 Original line number Diff line number Diff line Loading @@ -382,7 +382,9 @@ public final class Icon implements Parcelable { * @hide */ public void convertToAshmem() { if (mType == TYPE_BITMAP && getBitmap().isMutable()) { if (mType == TYPE_BITMAP && getBitmap().isMutable() && getBitmap().getAllocationByteCount() >= (128 * (1 << 10))) { setBitmap(getBitmap().createAshmemBitmap()); } } Loading Loading
core/java/android/app/Notification.java +3 −1 Original line number Diff line number Diff line Loading @@ -3972,7 +3972,9 @@ public class Notification implements Parcelable @Override public void purgeResources() { super.purgeResources(); if (mPicture != null && mPicture.isMutable()) { if (mPicture != null && mPicture.isMutable() && mPicture.getAllocationByteCount() >= (128 * (1 << 10))) { mPicture = mPicture.createAshmemBitmap(); } if (mBigLargeIcon != null) { Loading
core/jni/android/graphics/Bitmap.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ #include <cutils/ashmem.h> #define DEBUG_PARCEL 0 #define ASHMEM_BITMAP_MIN_SIZE (128 * (1 << 10)) namespace android { Loading Loading @@ -993,7 +994,7 @@ static jobject Bitmap_createFromParcel(JNIEnv* env, jobject, jobject parcel) { // Map the bitmap in place from the ashmem region if possible otherwise copy. Bitmap* nativeBitmap; if (blob.fd() >= 0 && (blob.isMutable() || !isMutable)) { if (blob.fd() >= 0 && (blob.isMutable() || !isMutable) && (size >= ASHMEM_BITMAP_MIN_SIZE)) { #if DEBUG_PARCEL ALOGD("Bitmap.createFromParcel: mapped contents of %s bitmap from %s blob " "(fds %s)", Loading
graphics/java/android/graphics/drawable/Icon.java +3 −1 Original line number Diff line number Diff line Loading @@ -382,7 +382,9 @@ public final class Icon implements Parcelable { * @hide */ public void convertToAshmem() { if (mType == TYPE_BITMAP && getBitmap().isMutable()) { if (mType == TYPE_BITMAP && getBitmap().isMutable() && getBitmap().getAllocationByteCount() >= (128 * (1 << 10))) { setBitmap(getBitmap().createAshmemBitmap()); } } Loading