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

Commit 0a5cc48e authored by Automerger Merge Worker's avatar Automerger Merge Worker Committed by Android (Google) Code Review
Browse files

Merge "Merge "Force rebind live wallpapers when destination change" into...

Merge "Merge "Force rebind live wallpapers when destination change" into udc-dev am: 30ee3068 am: c49c56e9"
parents a227c1b7 a9e504cd
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -3415,7 +3415,7 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
        WallpaperData wallpaper;

        synchronized (mLock) {
            Slog.v(TAG, "setWallpaperComponent name=" + name);
            Slog.v(TAG, "setWallpaperComponent name=" + name + ", which=" + which);
            wallpaper = mWallpaperMap.get(userId);
            if (wallpaper == null) {
                throw new IllegalStateException("Wallpaper not yet initialized for user " + userId);
@@ -3446,7 +3446,11 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
                wallpaper.mWhich = which;
                wallpaper.fromForegroundApp = isFromForegroundApp(callingPackage);
                boolean same = changingToSame(name, wallpaper);
                if (bindWallpaperComponentLocked(name, false, true, wallpaper, null)) {

                // force rebind when reapplying a system-only wallpaper to system+lock
                boolean forceRebind = same && mLockWallpaperMap.get(userId) != null
                        && which == (FLAG_SYSTEM | FLAG_LOCK);
                if (bindWallpaperComponentLocked(name, forceRebind, true, wallpaper, null)) {
                    if (!same) {
                        wallpaper.primaryColors = null;
                    } else {