Force the wallpaper to reload when dimensions change

Currently it's possible for the home application to suggest new
wallpaper dimensions and the WallpaperService to request the bitmap
between when the new dimensions have been propagated and the old
bitmap has been forgotten. This leads to the WallpaperService
drawing a Bitmap with the old dimensions into a Surface with the new
dimensions.

By forcing the WallpaperManager to forget the old Bitmap immediately
before we reload it, we can ensure that we always have a Bitmap of
the correct size.

Bug: 10853302
Change-Id: I298ac5f3f8bcde54eeb1e45d21bf2ba3cbb618c9
This commit is contained in:
Michael Wright
2013-10-15 12:49:44 -07:00
parent 1680cfd803
commit b9fca99971
2 changed files with 2 additions and 0 deletions

View File

@ -326,6 +326,7 @@ public class ImageWallpaper extends WallpaperService {
((mBackground == null) ? 0 : mBackground.getHeight()) + ", " +
dw + ", " + dh);
}
mWallpaperManager.forgetLoadedWallpaper();
updateWallpaperLocked();
if (mBackground == null) {
if (DEBUG) {