diff options
author | Yan Zhu <yanzhuyan@google.com> | 2020-12-03 21:44:16 -0800 |
---|---|---|
committer | Yan Zhu <yanzhuyan@google.com> | 2020-12-15 08:20:55 -0800 |
commit | 5cbbac84c3b644cef8f13e4ca4cf4f7712233860 (patch) | |
tree | d8c097cc1ef4273a002031c8dd658fbeb1a2a8d7 /rs/java/android/renderscript/ProgramVertexFixedFunction.java | |
parent | f010d5dea2047b65d5d125219d2b2eac259302c8 (diff) |
Improve headless system user's DO setup flow
1. Change manageUser to be setup on current user
2. add pre condition check for headless system user mode: disallows setup when current user is system user 0 and only allows device owner to be set on user 0
3. Changes method name and adds param names
To verify:
1. Install TestDPC app: https://github.com/googlesamples/android-testdpc
2. make sure device is unprovisioned
adb shell dumpsys device_policy
2'. deprovion if needed
adb shell settings put global device_provisioned 0 && adb shell rm /data/system/device_owner_2.xml /data/system/device_policies.xml
3. make sure deivce_amdmin feature is available
adb shell pm list features | grep "admin"
3'. install feature if needed
adb push frameworks/native/data/etc/android.software.device_admin.xml
/vendor/etc/permissions/
4. run
adb shell dpm set-device-owner --user 0 com.afwsamples.testdpc/com.afwsamples.testdpc.DeviceAdminReceiver
5. verify with
adb shell dumpsys device_policy
6. try to set on user 10 will fail
adb shell dpm set-device-owner --user 10 com.afwsamples.testdpc/com.afwsamples.testdpc.DeviceAdminReceiver
6. switch to user 0, repeat 4. It shall fail.
Bug: 170333009
Bug: 174610623
Test: manual with steps above
Change-Id: Iaa46032fa6487d792f7bde5de5ff6e55b9c36432
Diffstat (limited to 'rs/java/android/renderscript/ProgramVertexFixedFunction.java')
0 files changed, 0 insertions, 0 deletions