summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Heroy <jheroy@google.com>2016-12-22 00:51:37 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-12-22 00:51:37 +0000
commit48b2e6849d7f2f572491e63fca0187f3f37b8f9e (patch)
tree014f7e4a384958e7b8eb612e878e6d31e9fce80d
parent1295c4de41c9bd1403cd67e5449db2b77c9ba930 (diff)
parent6ce0be8ccfb0d1f38c41ada46933cf22254309be (diff)
downloadandroid_packages_wallpapers_LivePicker-48b2e6849d7f2f572491e63fca0187f3f37b8f9e.tar.gz
android_packages_wallpapers_LivePicker-48b2e6849d7f2f572491e63fca0187f3f37b8f9e.tar.bz2
android_packages_wallpapers_LivePicker-48b2e6849d7f2f572491e63fca0187f3f37b8f9e.zip
Prompt wp destination when system imagery can migrate to lock. am: 777ac7df69
am: 6ce0be8ccf Change-Id: I04b450ee34383e901b3a45bc290ba05e3072b6f3
-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);