Skip to content

Commit 589a6af

Browse files
committed
Set wallpaper bitmap reference to null before reloading
Give the GC a chance to collect the current bitmap if it needs to, as it allocates memory for the next one. This helps avoid OOM situations that can sometimes occur in extreme circumstances (huge bitmaps) Also set the default_wallpaper to the right default size. Issue #7352961 Wallpaper edge is cut-off while scrolling through home page Change-Id: If76b55061d04b29af7f66a6162e307b8b53bf4ae
1 parent 7443753 commit 589a6af

File tree

2 files changed

+1
-0
lines changed

2 files changed

+1
-0
lines changed
5.68 KB
Loading

packages/SystemUI/src/com/android/systemui/ImageWallpaper.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,7 @@ private void updateWallpaperLocked() {
401401
Throwable exception = null;
402402
try {
403403
mWallpaperManager.forgetLoadedWallpaper(); // force reload
404+
mBackground = null;
404405
mBackground = mWallpaperManager.getBitmap();
405406
} catch (RuntimeException e) {
406407
exception = e;

0 commit comments

Comments
 (0)