OSDN Git Service

Fix admin policies in managed profiles
authorAmith Yamasani <yamasani@google.com>
Tue, 14 Oct 2014 23:06:13 +0000 (16:06 -0700)
committerAmith Yamasani <yamasani@google.com>
Wed, 15 Oct 2014 17:42:17 +0000 (10:42 -0700)
commit242f4b125939276be866bb0a637b89bfbc5aa880
treeb289a36f7c3a153884244b877fba4e132e25f16b
parent15a5f82f9b6b389614b1df78749bd627d97d5417
Fix admin policies in managed profiles

Some of the admin policies are throwing security exceptions in
a managed profile without being documented correctly and others
shouldn't be throwing security exceptions.

Changed setCameraDisabled() to not throw an exception. It now just
prevents work profile apps from using the camera.

Changed wipeData() to allow passing in ERASE_EXTERNAL_STORAGE. In
secondary users/profiles, this is just going to remove the user, so
the flag is harmless.

Updated documentation for setKeyguardDisabledFeatures() and resetPassword()
to indicate that they cannot be called in a managed profile.

Bug: 17987913
Change-Id: I8060be4c2d32bdd4edb46ce543551fabb9c8c983
core/java/android/app/admin/DevicePolicyManager.java
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java