Prompt wp destination when system imagery can migrate to lock.

WallpaperManager#setWallpaperComponent migrates system wallpaper imagery
to lock, so now LivePicker should ask for a live wallpaper destination
except when there's a live wallpaper set and there's no lock wallpaper
imagery.

Bug: 32670638
Fixed: 32670638
Test: Set a static wallpaper to system+lock, then try to set a live
wallpaper and observe that LivePicker prompts the user for a
destination.

Change-Id: I39767b592c5a91c06670d6d00af90069b5c8e353
diff --git a/src/com/android/wallpaper/livepicker/LiveWallpaperPreview.java b/src/com/android/wallpaper/livepicker/LiveWallpaperPreview.java
index f5bfce9..3991a5c 100644
--- a/src/com/android/wallpaper/livepicker/LiveWallpaperPreview.java
+++ b/src/com/android/wallpaper/livepicker/LiveWallpaperPreview.java
@@ -253,8 +253,11 @@
     }
 
     public void setLiveWallpaper(final View v) {
-        if (mWallpaperManager.getWallpaperId(WallpaperManager.FLAG_LOCK) < 0) {
-            // The lock screen does not have a wallpaper, so no need to prompt; can only set both.
+        if (mWallpaperManager.getWallpaperInfo() != null
+            && mWallpaperManager.getWallpaperId(WallpaperManager.FLAG_LOCK) < 0) {
+            // The lock screen does not have a distinct wallpaper and the current wallpaper is a
+            // live wallpaper, so since we cannot preserve any static imagery on the lock screen,
+            // set the live wallpaper directly without giving the user a destination option.
             try {
                 setLiveWallpaper(v.getRootView().getWindowToken());
                 setResult(RESULT_OK);