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

Commit 45e5aab6 authored by Jochen Sprickerhof's avatar Jochen Sprickerhof
Browse files

Request WRITE_EXTERNAL_STORAGE permission

The ImportActivity needs READ_EXTERNAL_STORAGE upon start if
EXPORT_SDCARD_DIRECTORY (/sdcard/CalendarEvents) exists. As we need
write permission for export anyhow, this simply asks for both
permissions at startup.
parent 44ddc2f0
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -408,6 +408,11 @@ public class AllInOneActivity extends AbstractCalendarActivity implements EventH


        }
        }


        if (Build.VERSION.SDK_INT >= 23 && ContextCompat.checkSelfPermission(this,
                Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
            ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},
                PERMISSIONS_REQUEST_WRITE_CALENDAR);
        }
    }
    }


    @Override
    @Override