Loading services/core/java/com/android/server/wallpaper/WallpaperManagerService.java +11 −8 Original line number Diff line number Diff line Loading @@ -1301,15 +1301,13 @@ public class WallpaperManagerService extends IWallpaperManager.Stub { } void switchUser(int userId, IRemoteCallback reply) { WallpaperData systemWallpaper; WallpaperData lockWallpaper; final WallpaperData systemWallpaper; final WallpaperData lockWallpaper; synchronized (mLock) { mCurrentUserId = userId; systemWallpaper = getWallpaperSafeLocked(userId, FLAG_SYSTEM); lockWallpaper = mLockWallpaperMap.get(userId); if (lockWallpaper == null) { lockWallpaper = systemWallpaper; } final WallpaperData tmpLockWallpaper = mLockWallpaperMap.get(userId); lockWallpaper = tmpLockWallpaper == null ? systemWallpaper : tmpLockWallpaper; // Not started watching yet, in case wallpaper data was loaded for other reasons. if (systemWallpaper.wallpaperObserver == null) { systemWallpaper.wallpaperObserver = new WallpaperObserver(systemWallpaper); Loading @@ -1317,8 +1315,13 @@ public class WallpaperManagerService extends IWallpaperManager.Stub { } switchWallpaper(systemWallpaper, reply); } // Offload color extraction to another thread since switchUser will be called // from the main thread. FgThread.getHandler().post(() -> { notifyWallpaperColorsChanged(systemWallpaper, FLAG_SYSTEM); notifyWallpaperColorsChanged(lockWallpaper, FLAG_LOCK); }); } void switchWallpaper(WallpaperData wallpaper, IRemoteCallback reply) { Loading Loading
services/core/java/com/android/server/wallpaper/WallpaperManagerService.java +11 −8 Original line number Diff line number Diff line Loading @@ -1301,15 +1301,13 @@ public class WallpaperManagerService extends IWallpaperManager.Stub { } void switchUser(int userId, IRemoteCallback reply) { WallpaperData systemWallpaper; WallpaperData lockWallpaper; final WallpaperData systemWallpaper; final WallpaperData lockWallpaper; synchronized (mLock) { mCurrentUserId = userId; systemWallpaper = getWallpaperSafeLocked(userId, FLAG_SYSTEM); lockWallpaper = mLockWallpaperMap.get(userId); if (lockWallpaper == null) { lockWallpaper = systemWallpaper; } final WallpaperData tmpLockWallpaper = mLockWallpaperMap.get(userId); lockWallpaper = tmpLockWallpaper == null ? systemWallpaper : tmpLockWallpaper; // Not started watching yet, in case wallpaper data was loaded for other reasons. if (systemWallpaper.wallpaperObserver == null) { systemWallpaper.wallpaperObserver = new WallpaperObserver(systemWallpaper); Loading @@ -1317,8 +1315,13 @@ public class WallpaperManagerService extends IWallpaperManager.Stub { } switchWallpaper(systemWallpaper, reply); } // Offload color extraction to another thread since switchUser will be called // from the main thread. FgThread.getHandler().post(() -> { notifyWallpaperColorsChanged(systemWallpaper, FLAG_SYSTEM); notifyWallpaperColorsChanged(lockWallpaper, FLAG_LOCK); }); } void switchWallpaper(WallpaperData wallpaper, IRemoteCallback reply) { Loading