From 79a640ec354e61363e0c347793f70b3a285a0240 Mon Sep 17 00:00:00 2001 From: Sunny Goyal Date: Wed, 12 Aug 2015 15:28:33 -0700 Subject: Ensure that crop view is loaded before applying a wallpaper Bug: 22293299 Change-Id: I64d5268cc263bbb6595a0b28bdd5ec73d540da41 --- WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java b/WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java index 069638f8c..75d874552 100644 --- a/WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java +++ b/WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java @@ -550,7 +550,8 @@ public class WallpaperPickerActivity extends WallpaperCropActivity { new View.OnClickListener() { @Override public void onClick(View v) { - if (mSelectedTile != null) { + // Ensure that a tile is slelected and loaded. + if (mSelectedTile != null && mCropView.getTileSource() != null) { // Prevent user from selecting any new tile. mWallpaperStrip.setVisibility(View.GONE); actionBar.hide(); -- cgit v1.2.3