Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cb20e0bc authored by Tony Wickham's avatar Tony Wickham Committed by Android (Google) Code Review
Browse files

Merge "Inform users when "Set wallpaper" fails." into ub-launcher3-burnaby-polish

parents d21301e6 14a43ce3
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -28,6 +28,9 @@
         usually see this when using another app and trying to set
         an image as the wallpaper -->
    <string name="wallpaper_load_fail">Couldn\'t load image as wallpaper</string>
    <!-- Error message when an image is selected as a wallpaper,
         but something goes wrong when the user clicks "Set wallpaper" -->
    <string name="wallpaper_set_fail">Couldn\'t set image as wallpaper</string>
    <!-- Shown when wallpapers are selected in Wallpaper picker -->
    <!-- String indicating how many media item(s) is(are) selected
            eg. 1 selected [CHAR LIMIT=30] -->
+8 −2
Original line number Diff line number Diff line
@@ -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<Void, Void, Boolean> {
    }

    @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