Add settings UI for MANAGE_EXTERNAL_STORAGE

Adds a Special App Access setting for the app-op
OP_MANAGE_EXTERNAL_STORAGE. All apps requesting the corresponding
permission will be displayed in the settings page. Toggling the
preference switch for an app will grant/revoke the app-op.

All of the external references to the permission, app-op and their
corresponding activities and logic use the name "Manage External
Storage". All of the external displays and strings use the name "All
files access"

Test: * Install app with uses-permission MANAGE_EXTERNAL_STORAGE
      * Observe it appearing the All files access page
      * Toggle the switch and observe the change in
        'adb shell dumpsys appops'
Bug: 146425146

Change-Id: If5c9c5daa3616a3310c090283acfda933bf9df26
This commit is contained in:
shafik
2020-01-06 13:50:10 +00:00
parent 6b7b92ced5
commit 430b94bbc1
9 changed files with 334 additions and 3 deletions

View File

@@ -328,7 +328,7 @@ public abstract class AppStateAppOpsBridge extends AppStateBaseBridge {
public boolean isPermissible() {
// defining the default behavior as permissible as long as the package requested this
// permission (this means pre-M gets approval during install time; M apps gets approval
// during runtime.
// during runtime).
if (appOpMode == AppOpsManager.MODE_DEFAULT) {
return staticPermissionGranted;
}