OSDN Git Service

Force the wallpaper to reload when dimensions change
authorMichael Wright <michaelwr@google.com>
Tue, 15 Oct 2013 19:49:44 +0000 (12:49 -0700)
committerMichael Wright <michaelwr@google.com>
Tue, 15 Oct 2013 20:03:44 +0000 (13:03 -0700)
commitb9fca9997100f209e98f0559c54c875b9e661e9f
tree85dee2175b13b338712a6b6f543128dd36b2f008
parent1680cfd803d6a435ce4c809075d052da2723ac07
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
core/java/android/app/WallpaperManager.java
packages/SystemUI/src/com/android/systemui/ImageWallpaper.java