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

Commit 150651ba authored by Dan Sandler's avatar Dan Sandler Committed by Daniel Sandler
Browse files

Log screenshot exceptions.

Bug: 62241985
Test: none
Change-Id: Ifac3979b8eb80f3dd49bf0d40df7982e84df2671
parent 08836ed4
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@ import android.os.Process;
import android.os.UserHandle;
import android.provider.MediaStore;
import android.util.DisplayMetrics;
import android.util.Slog;
import android.view.Display;
import android.view.LayoutInflater;
import android.view.MotionEvent;
@@ -100,6 +101,7 @@ class SaveImageInBackgroundData {
 * An AsyncTask that saves an image to the media store in the background.
 */
class SaveImageInBackgroundTask extends AsyncTask<Void, Void, Void> {
    private static final String TAG = "SaveImageInBackgroundTask";

    private static final String SCREENSHOTS_DIR_NAME = "Screenshots";
    private static final String SCREENSHOT_FILE_NAME_TEMPLATE = "Screenshot_%s.png";
@@ -303,6 +305,7 @@ class SaveImageInBackgroundTask extends AsyncTask<Void, Void, Void> {
        } catch (Exception e) {
            // IOException/UnsupportedOperationException may be thrown if external storage is not
            // mounted
            Slog.e(TAG, "unable to save screenshot", e);
            mParams.clearImage();
            mParams.errorMsgResId = R.string.screenshot_failed_to_save_text;
        }
@@ -379,8 +382,6 @@ class SaveImageInBackgroundTask extends AsyncTask<Void, Void, Void> {
 * An AsyncTask that deletes an image from the media store in the background.
 */
class DeleteImageInBackgroundTask extends AsyncTask<Uri, Void, Void> {
    private static final String TAG = "DeleteImageInBackgroundTask";

    private Context mContext;

    DeleteImageInBackgroundTask(Context context) {