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

Commit e7cae7ac authored by Aurélien Pomini's avatar Aurélien Pomini Committed by Automerger Merge Worker
Browse files

Merge "Force rebind live wallpapers when destination change" into udc-dev am:...

Merge "Force rebind live wallpapers when destination change" into udc-dev am: 30ee3068 am: 95301b5b

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23695584



Change-Id: I9f3b67eea9ef15f6806a47e75d11d5db5bab56fe
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 0f013ebe 95301b5b
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -3338,7 +3338,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);
@@ -3369,7 +3369,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 {