Merge "Guard against failed bitmap conversions" into udc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
4c45ee8c1d
@@ -314,6 +314,11 @@ class SnapshotPersistQueue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final Bitmap swBitmap = bitmap.copy(Bitmap.Config.ARGB_8888, false /* isMutable */);
|
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);
|
final File file = mPersistInfoProvider.getHighResolutionBitmapFile(mId, mUserId);
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user