Set setModeByUid to align with current behavior

For the following App Lists,
- All Files Access
- Media Management Apps

Default false, if true, use AppOpsManager#setUidMode instead of #setMode

This follows Change: I261953ff88bc049cf0a2f04f8caac00b8cc6f704
Reason:
Security related app-ops should be set with AppOpsManager#setUidMode
instead of AppOpsManager#setMode.

Bug: 235727273
Test: Unit test
Change-Id: I953b63c2bf6f3bd94aacc935c8c3579bc8aed199
This commit is contained in:
Chaohui Wang
2022-12-19 16:09:19 +08:00
parent a4f8010043
commit d735f9a1a8
4 changed files with 132 additions and 0 deletions

View File

@@ -34,4 +34,5 @@ class AllFilesAccessListModel(context: Context) : AppOpPermissionListModel(conte
override val footerResId = R.string.allow_manage_external_storage_description
override val appOp = AppOpsManager.OP_MANAGE_EXTERNAL_STORAGE
override val permission = Manifest.permission.MANAGE_EXTERNAL_STORAGE
override val setModeByUid = true
}

View File

@@ -34,4 +34,5 @@ class MediaManagementAppsListModel(context: Context) : AppOpPermissionListModel(
override val footerResId = R.string.media_management_apps_description
override val appOp = AppOpsManager.OP_MANAGE_MEDIA
override val permission = Manifest.permission.MANAGE_MEDIA
override val setModeByUid = true
}