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

Commit d66b7e82 authored by Christopher Tate's avatar Christopher Tate Committed by android-build-merger
Browse files

Migrate system+lock wallpaper to lock-only when setting live wp am: 7cd0010d

am: 9ee86cb9

Change-Id: I7d293d3d3cc0f60b0a3ce88ce9400db9d46fa20a
parents ec463719 9ee86cb9
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -1556,6 +1556,19 @@ public class WallpaperManagerService extends IWallpaperManager.Stub {
                throw new IllegalStateException("Wallpaper not yet initialized for user " + userId);
            }
            final long ident = Binder.clearCallingIdentity();

            // Live wallpapers can't be specified for keyguard.  If we're using a static
            // system+lock image currently, migrate the system wallpaper to be a lock-only
            // image as part of making a different live component active as the system
            // wallpaper.
            if (mImageWallpaper.equals(wallpaper.wallpaperComponent)) {
                if (mLockWallpaperMap.get(userId) == null) {
                    // We're using the static imagery and there is no lock-specific image in place,
                    // therefore it's a shared system+lock image that we need to migrate.
                    migrateSystemToLockWallpaperLocked(userId);
                }
            }

            try {
                wallpaper.imageWallpaperPending = false;
                if (bindWallpaperComponentLocked(name, false, true, wallpaper, null)) {