summaryrefslogtreecommitdiff
path: root/core/java/android/permission/AdminPermissionControlParams.java
Commit message (Collapse)AuthorAgeFilesLines
* Address API review for admin-granted permissionsEran Messeri2021-04-071-2/+3
| | | | | | | | | | | | Address API review for changes related to admin-granted permissions: * Change the provisioning extra to indicate it only affects sensors-related permissions. * Add an IntDef for the AdminPermissionControlParams grant state. Bug: 184204476 Bug: 184204334 Test: atest ManagedProvisioningTests Change-Id: I75c8b6de1e897e02916b17f0ae3a521f8384c242
* Restrict Admin grant of sensors-related permissionsEran Messeri2021-02-161-0/+132
Restrict the admin of a fully-managed device or managed profile from granting sensors-related permissions. The admin of a managed profile cannot control permission grants for sensors-related permissions at all. The admin of a fully-managed device can opt-out of having said control by providing a provisioning extra. This change passes the boolean flag in ActiveAdmin indicating whether the admin has control over sensor permission grants into the permission controller. Manual testing: * Install TestDPC * Create a work profile using TestDPC. * Get the BasicLocation app by checking out https://github.com/android/location-samples and building it from there. * Install the app onto the device but do not start it. * In TestDPC, Find "Manage app permissions", choose "Basic Location Sample" from the drop-down menu. * Toggle each of the "ACCESS_COARSE_LOCATION" and "ACCESS_BACKGROUND_LOCATION" to "Allow". * Observe that no notification appears. * Start the BasicLocation app and observe the runtime permission prompt shows up. Bug: 158735247 Test: Manual (more to be added). Test: cts (see topic) Change-Id: I12d9f7e24ad4bc09651a5e5f60b864298506c2c4