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
(cherry picked from commit cf1fd5195f10e460f3efa2dd4b77ce3407c11443)
diff --git a/services/core/java/com/android/server/StorageManagerService.java b/services/core/java/com/android/server/StorageManagerService.java
index 4598d3e..0786b18 100644
--- a/services/core/java/com/android/server/StorageManagerService.java
+++ b/services/core/java/com/android/server/StorageManagerService.java
@@ -3840,7 +3840,9 @@
                     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