Merge change 23774 into eclair
* changes: Fix issue #2097189: can't set custom wallpaper
This commit is contained in:
@@ -62,22 +62,23 @@ public class WallpaperManager {
|
|||||||
|
|
||||||
private static final int MSG_CLEAR_WALLPAPER = 1;
|
private static final int MSG_CLEAR_WALLPAPER = 1;
|
||||||
|
|
||||||
private final Handler mHandler = new Handler() {
|
private final Handler mHandler;
|
||||||
@Override
|
|
||||||
public void handleMessage(Message msg) {
|
|
||||||
switch (msg.what) {
|
|
||||||
case MSG_CLEAR_WALLPAPER:
|
|
||||||
synchronized (this) {
|
|
||||||
mWallpaper = null;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
Globals() {
|
Globals(Looper looper) {
|
||||||
IBinder b = ServiceManager.getService(Context.WALLPAPER_SERVICE);
|
IBinder b = ServiceManager.getService(Context.WALLPAPER_SERVICE);
|
||||||
mService = IWallpaperManager.Stub.asInterface(b);
|
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() {
|
public void onWallpaperChanged() {
|
||||||
@@ -188,7 +189,7 @@ public class WallpaperManager {
|
|||||||
static void initGlobals(Looper looper) {
|
static void initGlobals(Looper looper) {
|
||||||
synchronized (mSync) {
|
synchronized (mSync) {
|
||||||
if (sGlobals == null) {
|
if (sGlobals == null) {
|
||||||
sGlobals = new Globals();
|
sGlobals = new Globals(looper);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user