Merge "NO PARTIAL RERUN: Do not return recycled bitmaps" into pi-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
6f34a9b2d3
@@ -401,7 +401,8 @@ public class WallpaperManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
if (mCachedWallpaper != null && mCachedWallpaperUserId == userId) {
|
if (mCachedWallpaper != null && mCachedWallpaperUserId == userId
|
||||||
|
&& !mCachedWallpaper.isRecycled()) {
|
||||||
return mCachedWallpaper;
|
return mCachedWallpaper;
|
||||||
}
|
}
|
||||||
mCachedWallpaper = null;
|
mCachedWallpaper = null;
|
||||||
|
|||||||
@@ -444,13 +444,7 @@ public class ImageWallpaper extends WallpaperService {
|
|||||||
final Surface surface = getSurfaceHolder().getSurface();
|
final Surface surface = getSurfaceHolder().getSurface();
|
||||||
surface.hwuiDestroy();
|
surface.hwuiDestroy();
|
||||||
|
|
||||||
mLoader = new AsyncTask<Void, Void, Bitmap>() {
|
mWallpaperManager.forgetLoadedWallpaper();
|
||||||
@Override
|
|
||||||
protected Bitmap doInBackground(Void... params) {
|
|
||||||
mWallpaperManager.forgetLoadedWallpaper();
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void scheduleUnloadWallpaper() {
|
private void scheduleUnloadWallpaper() {
|
||||||
|
|||||||
Reference in New Issue
Block a user