Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 80afa231 authored by Alvin Abdagic's avatar Alvin Abdagic
Browse files

Guard against failed bitmap conversions

Bug: 285198903
Change-Id: I027a9bbde2fd24e5fb870730689a39b7296eb8f0
parent 5734096d
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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 {