Merge "Prevent WallpaperManager#getBitmap return recycled bitmap." into sc-v2-dev am: d4468037c7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15824230 Change-Id: I04d5d585c9686a9e0db322e3d7a19edff5def4b1
This commit is contained in:
@@ -562,7 +562,7 @@ public class WallpaperManager {
|
|||||||
}
|
}
|
||||||
if (returnDefault) {
|
if (returnDefault) {
|
||||||
Bitmap defaultWallpaper = mDefaultWallpaper;
|
Bitmap defaultWallpaper = mDefaultWallpaper;
|
||||||
if (defaultWallpaper == null) {
|
if (defaultWallpaper == null || defaultWallpaper.isRecycled()) {
|
||||||
defaultWallpaper = getDefaultWallpaper(context, which);
|
defaultWallpaper = getDefaultWallpaper(context, which);
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
mDefaultWallpaper = defaultWallpaper;
|
mDefaultWallpaper = defaultWallpaper;
|
||||||
|
|||||||
Reference in New Issue
Block a user