Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5e802fbb authored by Dianne Hackborn's avatar Dianne Hackborn
Browse files

Fix issue #2097189: can't set custom wallpaper

My deadlock fix was only half done.

Change-Id: If9f286030894a60cd71851fb784bb61045f08185
parent fb16e5cc
Loading
Loading
Loading
Loading
+15 −14
Original line number Diff line number Diff line
@@ -62,7 +62,12 @@ public class WallpaperManager {
        
        private static final int MSG_CLEAR_WALLPAPER = 1;
        
        private final Handler mHandler = new Handler() {
        private final Handler mHandler;
        
        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) {
@@ -74,10 +79,6 @@ public class WallpaperManager {
                    }
                }
            };
        
        Globals() {
            IBinder b = ServiceManager.getService(Context.WALLPAPER_SERVICE);
            mService = IWallpaperManager.Stub.asInterface(b);
        }
        
        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);
            }
        }
    }