diff options
author | Eran Messeri <eranm@google.com> | 2021-02-01 14:40:55 +0000 |
---|---|---|
committer | Eran Messeri <eranm@google.com> | 2021-02-16 19:03:57 +0000 |
commit | 003453b35460f30a114a210eb43a3970b6b0905a (patch) | |
tree | 1729ca4fca52db3f570f95295806fbc1ef9207bb /tools/aapt2/java/JavaClassGenerator_test.cpp | |
parent | d014bb7414fbe235f04560ce26862ff397d978e8 (diff) |
Restrict Admin grant of sensors-related permissions
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
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions