summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Heroy <jheroy@google.com>2016-12-22 00:46:21 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-12-22 00:46:21 +0000
commit6ce0be8ccfb0d1f38c41ada46933cf22254309be (patch)
tree353b4f0e886997aae038e3f6a32f7d61df261f49
parent034b5a865fcca2ec4740d1417e14f834fa8fa910 (diff)
parent777ac7df694d3c2a0988e7bb960b35f8f942ab65 (diff)
downloadandroid_packages_wallpapers_LivePicker-6ce0be8ccfb0d1f38c41ada46933cf22254309be.tar.gz
android_packages_wallpapers_LivePicker-6ce0be8ccfb0d1f38c41ada46933cf22254309be.tar.bz2
android_packages_wallpapers_LivePicker-6ce0be8ccfb0d1f38c41ada46933cf22254309be.zip
Prompt wp destination when system imagery can migrate to lock.
am: 777ac7df69 Change-Id: Ia3cf6d7244a2f59c1d65ddf28f2a371cf9963e7f
-rw-r--r--src/com/android/wallpaper/livepicker/LiveWallpaperPreview.java7
1 files changed, 5 insertions, 2 deletions
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 class LiveWallpaperPreview extends Activity {
}
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);