From a2dbe43122f5f8cb72d21ab4c9e7a9d570ba5d2e Mon Sep 17 00:00:00 2001 From: Riley Andrews Date: Sun, 1 Nov 2015 23:36:04 -0800 Subject: Limit persistent ashmem backed fds to a minimum of 128kB. Bug 25256717 Change-Id: Ieb356006df0a6545b89de44d3d8fd4b46312b3b8 Signed-off-by: Riley Andrews --- core/java/android/app/Notification.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'core/java') diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java index f3f2428..a2e8fd1 100644 --- a/core/java/android/app/Notification.java +++ b/core/java/android/app/Notification.java @@ -3969,7 +3969,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) { -- cgit v1.1