Migrate system+lock wallpaper to lock-only when setting live wp

am: 7cd0010df6

Change-Id: I488880ddcb04894d18535815691d32d542bc71c1
This commit is contained in:
Christopher Tate
2016-12-20 01:10:16 +00:00
committed by android-build-merger

View File

@@ -1563,6 +1563,19 @@ public class WallpaperManagerService extends IWallpaperManager.Stub {
throw new IllegalStateException("Wallpaper not yet initialized for user " + userId); throw new IllegalStateException("Wallpaper not yet initialized for user " + userId);
} }
final long ident = Binder.clearCallingIdentity(); 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 { try {
wallpaper.imageWallpaperPending = false; wallpaper.imageWallpaperPending = false;
if (bindWallpaperComponentLocked(name, false, true, wallpaper, null)) { if (bindWallpaperComponentLocked(name, false, true, wallpaper, null)) {