diff --git a/WallpaperPicker/res/values/strings.xml b/WallpaperPicker/res/values/strings.xml index 72b1e15df4..2bfd4767fc 100644 --- a/WallpaperPicker/res/values/strings.xml +++ b/WallpaperPicker/res/values/strings.xml @@ -28,6 +28,9 @@ usually see this when using another app and trying to set an image as the wallpaper --> Couldn\'t load image as wallpaper + + Couldn\'t set image as wallpaper diff --git a/WallpaperPicker/src/com/android/gallery3d/common/BitmapCropTask.java b/WallpaperPicker/src/com/android/gallery3d/common/BitmapCropTask.java index 47c40eb97c..212fb84eae 100644 --- a/WallpaperPicker/src/com/android/gallery3d/common/BitmapCropTask.java +++ b/WallpaperPicker/src/com/android/gallery3d/common/BitmapCropTask.java @@ -31,6 +31,9 @@ import android.graphics.RectF; import android.net.Uri; import android.os.AsyncTask; import android.util.Log; +import android.widget.Toast; + +import com.android.launcher3.R; import java.io.BufferedInputStream; import java.io.ByteArrayInputStream; @@ -395,9 +398,12 @@ public class BitmapCropTask extends AsyncTask { } @Override - protected void onPostExecute(Boolean result) { + protected void onPostExecute(Boolean cropSucceeded) { + if (!cropSucceeded) { + Toast.makeText(mContext, R.string.wallpaper_set_fail, Toast.LENGTH_SHORT).show(); + } if (mOnEndCropHandler != null) { - mOnEndCropHandler.run(result); + mOnEndCropHandler.run(cropSucceeded); } } } \ No newline at end of file