Make getExternalStorageMountMode as SystemApi
Secondary volumes are FUSE mounted, whereas Android/data and Android/obb on primary volumes are not FUSE mounted. Access to these private app directories on primary volumes is restricted using the mount modes, but access for these on secondary volumes need to be regulated by MediaProvider. Make getExternalStorageMountMode as SystemApi so that MediaProvider can leverage the same mount logic for Secondary volumes. Expose relevant mount modes as SystemApi as well. This change saves us the maintenance overhead for Secondary volumes for Android S+. Otherwise we would have to check if an app is a signature app through APIs which would basically be the duplication for the logic in StorageManagerService.java. Expose ExternalStorageProvider and downloads Authority for MediaProvider to rely only on APIs. This is also required for CDD modifications that these 2 providers are given exceptional access to private app dirs. Bug: 175796984 Bug: 173505864 Bug: 173505864 Test: atest DownloadProviderTest Test: atest CtsScopedStorageHostTest Test: atest android.scopedstorage.cts.host.PublicVolumeHostTest#testCheckInstallerAppAccessToObbDirs Test: atest android.scopedstorage.cts.host.PublicVolumeHostTest#testCantAccessOtherAppsExternalDirs Change-Id: I51bc7bd3f355fadd9de56ac267469c2352eb0ffa Merged-In: I51bc7bd3f355fadd9de56ac267469c2352eb0ffa
Loading
Please register or sign in to comment