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

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

Temporary hack until we have dynamic remounting.

We're stuck in a place where we've half-implemented our storage
mounting and remounting story, so the mount mode is locked in for
the lifetime of the process.

The safest way to get this working for the next beta cut is to
always assume the app has the permissions they request, and we'll
follow up with a STOPSHIP to get a real fix in place.

Bug: 129744277
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: If152c52d3630112547f4d3e7a07449da452550fd
parent ac9c597d
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -3840,7 +3840,9 @@ class StorageManagerService extends IStorageManager.Stub
                    uid, packageName, READ_EXTERNAL_STORAGE, OP_READ_EXTERNAL_STORAGE);
            final boolean hasWrite = StorageManager.checkPermissionAndAppOp(mContext, false, 0,
                    uid, packageName, WRITE_EXTERNAL_STORAGE, OP_WRITE_EXTERNAL_STORAGE);
            final boolean hasStorage = hasRead || hasWrite;
            // STOPSHIP: remove this temporary hack once we have dynamic runtime
            // permissions fully enabled again
            final boolean hasStorage = hasRead || hasWrite || true;

            // We're only willing to give out broad access if they also hold
            // runtime permission; this is a firm CDD requirement