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

Commit b162909d authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

No STORAGE_PERMISSIONS to grant in new model.

When a developer has enabled the new Q storage model, the legacy
READ/WRITE_EXTERNAL_STORAGE permissions are no longer runtime
permissions, and we shouldn't try granting them any longer, since
they'd fail with a SecurityException.

Bug: 113039719
Test: manual
Change-Id: Idbb246378583832da12576dc17138142f1a6d2f5
parent be3a75cb
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -171,9 +171,12 @@ public final class DefaultPermissionGrantPolicy {
    @Deprecated
    private static final Set<String> STORAGE_PERMISSIONS = new ArraySet<>();
    static {
        // STOPSHIP(b/112545973): remove once feature enabled by default
        if (!SystemProperties.getBoolean(StorageManager.PROP_ISOLATED_STORAGE, false)) {
            STORAGE_PERMISSIONS.add(Manifest.permission.READ_EXTERNAL_STORAGE);
            STORAGE_PERMISSIONS.add(Manifest.permission.WRITE_EXTERNAL_STORAGE);
        }
    }

    private static final Set<String> MEDIA_AURAL_PERMISSIONS = new ArraySet<>();
    static {