Just drop the default WP bitmap, don't explicitly recycle it

Recycling invalidates it out from under any client code that might
have retained the reference previously.  That's not sociable.

Just drop the internal cache reference.  The underlying storage will
be properly freed by GC if it's genuinely not being used anywhere
else.

Change-Id: I94e0e2ba2b78daa40c8026e6fc72fda3bed57ae3
Fixes: 79108131
Bug: 74534423
Test: atest android.content.cts.ContextWrapperTest#testAccessWallpaper
This commit is contained in:
Christopher Tate
2018-05-02 13:18:35 -07:00
parent 1ae7fd5f44
commit 1c827da635

View File

@@ -442,9 +442,6 @@ public class WallpaperManager {
synchronized (this) {
mCachedWallpaper = null;
mCachedWallpaperUserId = 0;
if (mDefaultWallpaper != null) {
mDefaultWallpaper.recycle();
}
mDefaultWallpaper = null;
}
}