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

Commit 3829ad02 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Remove mount hack" into rvc-dev am: 688a5f21

Change-Id: Iec1a60fe41773974e015671c10e8d38b5112a084
parents 3410fb0a 688a5f21
Loading
Loading
Loading
Loading
+0 −13
Original line number Diff line number Diff line
@@ -4139,19 +4139,6 @@ class StorageManagerService extends IStorageManager.Stub
            boolean hasLegacy = mIAppOpsService.checkOperation(OP_LEGACY_STORAGE,
                    uid, packageName) == MODE_ALLOWED;

            // Hack(b/147137425): we have to honor hasRequestedLegacyExternalStorage for a short
            // while to enable 2 cases.
            // 1) Apps that want to be in scoped storage in R, but want to opt out in Q devices,
            // because they want to use raw file paths, would fail until fuse is enabled by default.
            // 2) Test apps that target current sdk will fail. They would fail even after fuse is
            // enabled, but we are fixing it with b/142395442. We are not planning to enable
            // fuse by default until b/142395442 is fixed.
            if (!hasLegacy && !mIsFuseEnabled) {
                ApplicationInfo ai = mIPackageManager.getApplicationInfo(packageName,
                        0, UserHandle.getUserId(uid));
                hasLegacy = (ai != null && ai.hasRequestedLegacyExternalStorage());
            }

            if (hasLegacy && hasWrite) {
                return Zygote.MOUNT_EXTERNAL_WRITE;
            } else if (hasLegacy && hasRead) {