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

Commit c49c56e9 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: 30ee3068

parents 5d9cb671 30ee3068
Loading
Loading
Loading
Loading
+6 −2
Original line number Original line Diff line number Diff line
@@ -3293,7 +3293,7 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
        WallpaperData wallpaper;
        WallpaperData wallpaper;


        synchronized (mLock) {
        synchronized (mLock) {
            Slog.v(TAG, "setWallpaperComponent name=" + name);
            Slog.v(TAG, "setWallpaperComponent name=" + name + ", which=" + which);
            wallpaper = mWallpaperMap.get(userId);
            wallpaper = mWallpaperMap.get(userId);
            if (wallpaper == null) {
            if (wallpaper == null) {
                throw new IllegalStateException("Wallpaper not yet initialized for user " + userId);
                throw new IllegalStateException("Wallpaper not yet initialized for user " + userId);
@@ -3324,7 +3324,11 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
                wallpaper.mWhich = which;
                wallpaper.mWhich = which;
                wallpaper.fromForegroundApp = isFromForegroundApp(callingPackage);
                wallpaper.fromForegroundApp = isFromForegroundApp(callingPackage);
                boolean same = changingToSame(name, wallpaper);
                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) {
                    if (!same) {
                        wallpaper.primaryColors = null;
                        wallpaper.primaryColors = null;
                    } else {
                    } else {