diff options
author | Dianne Hackborn <hackbod@google.com> | 2009-09-02 21:50:50 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2009-09-02 21:53:30 -0700 |
commit | 5e802fbb895a0ff4d9be1a72390f51c134a5ba0f (patch) | |
tree | 1786766e3155e53daeb350093cd2878fdf791866 /core/java/android/app | |
parent | fb16e5ccdb230a11cbbbfd17d323db7b88395c2f (diff) | |
download | frameworks_base-5e802fbb895a0ff4d9be1a72390f51c134a5ba0f.zip frameworks_base-5e802fbb895a0ff4d9be1a72390f51c134a5ba0f.tar.gz frameworks_base-5e802fbb895a0ff4d9be1a72390f51c134a5ba0f.tar.bz2 |
Fix issue #2097189: can't set custom wallpaper
My deadlock fix was only half done.
Change-Id: If9f286030894a60cd71851fb784bb61045f08185
Diffstat (limited to 'core/java/android/app')
-rw-r--r-- | core/java/android/app/WallpaperManager.java | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/core/java/android/app/WallpaperManager.java b/core/java/android/app/WallpaperManager.java index a6bbaa6..c40fe69 100644 --- a/core/java/android/app/WallpaperManager.java +++ b/core/java/android/app/WallpaperManager.java @@ -62,22 +62,23 @@ public class WallpaperManager { private static final int MSG_CLEAR_WALLPAPER = 1; - private final Handler mHandler = new Handler() { - @Override - public void handleMessage(Message msg) { - switch (msg.what) { - case MSG_CLEAR_WALLPAPER: - synchronized (this) { - mWallpaper = null; - } - break; - } - } - }; + private final Handler mHandler; - Globals() { + Globals(Looper looper) { IBinder b = ServiceManager.getService(Context.WALLPAPER_SERVICE); mService = IWallpaperManager.Stub.asInterface(b); + mHandler = new Handler() { + @Override + public void handleMessage(Message msg) { + switch (msg.what) { + case MSG_CLEAR_WALLPAPER: + synchronized (this) { + mWallpaper = null; + } + break; + } + } + }; } public void onWallpaperChanged() { @@ -188,7 +189,7 @@ public class WallpaperManager { static void initGlobals(Looper looper) { synchronized (mSync) { if (sGlobals == null) { - sGlobals = new Globals(); + sGlobals = new Globals(looper); } } } |