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

Commit 41466ea4 authored by Martijn Coenen's avatar Martijn Coenen
Browse files

Supplemental processes don't get external storage.

Bug: 217538016
Test: Inspect /storage for supplemental
Change-Id: Ibd29834b0d611a7313890fe06428cd73021ebf4f
parent 130738f1
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1333,7 +1333,7 @@ public class Environment {
        final Context context = AppGlobals.getInitialApplication();
        final Context context = AppGlobals.getInitialApplication();
        final int uid = context.getApplicationInfo().uid;
        final int uid = context.getApplicationInfo().uid;
        // Isolated processes and Instant apps are never allowed to be in scoped storage
        // Isolated processes and Instant apps are never allowed to be in scoped storage
        if (Process.isIsolated(uid)) {
        if (Process.isIsolated(uid) || Process.isSupplemental(uid)) {
            return false;
            return false;
        }
        }


+1 −1
Original line number Original line Diff line number Diff line
@@ -4674,7 +4674,7 @@ class StorageManagerService extends IStorageManager.Stub
    private int getMountModeInternal(int uid, String packageName) {
    private int getMountModeInternal(int uid, String packageName) {
        try {
        try {
            // Get some easy cases out of the way first
            // Get some easy cases out of the way first
            if (Process.isIsolated(uid)) {
            if (Process.isIsolated(uid) || Process.isSupplemental(uid)) {
                return StorageManager.MOUNT_MODE_EXTERNAL_NONE;
                return StorageManager.MOUNT_MODE_EXTERNAL_NONE;
            }
            }