Skip to content
Commit d559e782 authored by Sahana Rao's avatar Sahana Rao
Browse files

Change hasRequestRawExternalStorageAccess() to return integer

Previously, hasRequestRawExternalStorageAccess would return null if the
app doesn't have requestRawExternalStorageAccess attribute in the
manifest. And, return true/false based on the value specified in
manifest.

Based on API review comments, changed the method to
getRequestRawExternalStorageAccess which returns
* RAW_EXTERNAL_STORAGE_ACCESS_DEFAULT if app didn't specify
requestRawExternalStorageAccess attribute in the manifest.
* RAW_EXTERNAL_STORAGE_ACCESS_REQUESTED if the app requested raw
external storage access.
* RAW_EXTERNAL_STORAGE_ACCESS_NOT_REQUESTED if the app requests to
disable raw external storage access

The API is not guarded with any system level API permissions, hence
changing the API to public API instead of system API. Also added
documentation to ensure apps don't misunderstand this API

Bug: 185484514
Test: atest packages/providers/MediaProvider
Change-Id: Ib7e41ab8ee38389bf44a360e4288d03e58ef44cf
parent a7c3e113
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment