diff options
author | Dianne Hackborn <hackbod@google.com> | 2011-08-05 14:43:50 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2011-08-05 19:22:25 -0700 |
commit | 9ea31639738e8d2c90dc3a4fcd535d09a0b7209a (patch) | |
tree | d989269169af06601154db67e91a6660d32ca0c6 /packages | |
parent | 9c181ffbda73beb0a6d14529693896945af30591 (diff) | |
download | frameworks_base-9ea31639738e8d2c90dc3a4fcd535d09a0b7209a.zip frameworks_base-9ea31639738e8d2c90dc3a4fcd535d09a0b7209a.tar.gz frameworks_base-9ea31639738e8d2c90dc3a4fcd535d09a0b7209a.tar.bz2 |
Fix issue #5108980 Wallpaper is not restored after upgrade from IRK32B to IRK33B
Take care of updating from old component name, and don't let this happen
again.
Also tweak how we switch between static wallpapers to avoid introducing
a 4MB allocation in the system UI process when this happens -- we now
stop the current wallpaper service and start a new one, so we get a
brand new surface that we can draw only one time in to.
Change-Id: I6fc8a42b8a46bba79759bd68fb7d0684b5d897b7
Diffstat (limited to 'packages')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/ImageWallpaper.java | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java b/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java index 7cc5ff7..e1231a5 100644 --- a/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java +++ b/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java @@ -93,9 +93,12 @@ public class ImageWallpaper extends WallpaperService { } super.onCreate(surfaceHolder); - IntentFilter filter = new IntentFilter(Intent.ACTION_WALLPAPER_CHANGED); - mReceiver = new WallpaperObserver(); - registerReceiver(mReceiver, filter, null, mHandler); + + // Don't need this currently because the wallpaper service + // will restart the image wallpaper whenever the image changes. + //IntentFilter filter = new IntentFilter(Intent.ACTION_WALLPAPER_CHANGED); + //mReceiver = new WallpaperObserver(); + //registerReceiver(mReceiver, filter, null, mHandler); updateSurfaceSize(surfaceHolder); } @@ -103,7 +106,9 @@ public class ImageWallpaper extends WallpaperService { @Override public void onDestroy() { super.onDestroy(); - unregisterReceiver(mReceiver); + if (mReceiver != null) { + unregisterReceiver(mReceiver); + } } @Override |