diff options
author | 2023-06-01 09:18:40 +0000 | |
---|---|---|
committer | 2023-06-01 09:18:40 +0000 | |
commit | 4c45ee8c1d558d14ab4588d7616bcf7aa518438d (patch) | |
tree | 76bbfc8176c8c23c7d2a007240d2950f1a5d2710 | |
parent | 80ed45a7a060539283b18337f165a4b3c422b803 (diff) | |
parent | 80afa2317bde02b9ad0d2a02f5fd55b52f3a37a2 (diff) |
Merge "Guard against failed bitmap conversions" into udc-dev
-rw-r--r-- | services/core/java/com/android/server/wm/SnapshotPersistQueue.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/wm/SnapshotPersistQueue.java b/services/core/java/com/android/server/wm/SnapshotPersistQueue.java index afef85e34fe0..58e1c544202d 100644 --- a/services/core/java/com/android/server/wm/SnapshotPersistQueue.java +++ b/services/core/java/com/android/server/wm/SnapshotPersistQueue.java @@ -314,6 +314,11 @@ class SnapshotPersistQueue { } final Bitmap swBitmap = bitmap.copy(Bitmap.Config.ARGB_8888, false /* isMutable */); + if (swBitmap == null) { + Slog.e(TAG, "Bitmap conversion from (config=" + bitmap.getConfig() + ", isMutable=" + + bitmap.isMutable() + ") to (config=ARGB_8888, isMutable=false) failed."); + return false; + } final File file = mPersistInfoProvider.getHighResolutionBitmapFile(mId, mUserId); try { |