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

Commit 21e15eb7 authored by Alison Cichowlas's avatar Alison Cichowlas
Browse files

Log if we could not mk the dir when saving screenshot.

Test: Manual - take screenshot.
Change-Id: Ia113ded78a1f31c751f68c7602d528e228d647ee
parent 6b3f38aa
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -60,6 +60,7 @@ import android.os.RemoteException;
import android.os.UserHandle;
import android.provider.MediaStore;
import android.util.DisplayMetrics;
import android.util.Log;
import android.util.Slog;
import android.view.Display;
import android.view.LayoutInflater;
@@ -246,7 +247,10 @@ class SaveImageInBackgroundTask extends AsyncTask<Void, Void, Void> {

        try {
            // Create screenshot directory if it doesn't exist
            mScreenshotDir.mkdirs();
            boolean madeDirs = mScreenshotDir.mkdirs();
            if (madeDirs == false) {
                Log.e(TAG, "Couldn't create screenshot directory: " + mScreenshotDir);
            }

            // media provider uses seconds for DATE_MODIFIED and DATE_ADDED, but milliseconds
            // for DATE_TAKEN