OSDN Git Service

Allow DO/PO to be installed with certain preconfigured accounts.
authorMakoto Onuki <omakoto@google.com>
Fri, 2 Sep 2016 01:02:01 +0000 (18:02 -0700)
committerMakoto Onuki <omakoto@google.com>
Tue, 6 Sep 2016 18:56:45 +0000 (11:56 -0700)
commit5e7e0670c7b4b0f15c812fc83991afcc7fa24bf9
tree788f34cd3b05c7f5e2b582597aca370830e66709
parent03f206a2ed830bef6ff895645077254294430370
Allow DO/PO to be installed with certain preconfigured accounts.

- Non-test-only DO/PO still can't be installed when there are
accounts.

- Test-only DO/PO can be installed even when there are accounts,
as long as all the accounts have the
"android.account.DEVICE_OR_PROFILE_OWNER_ALLOWED" feature.
Some authenticators claim to have any features, so to detect it,
we also check android.account.DEVICE_OR_PROFILE_OWNER_DISALLOWED
and disallow installing if any of the accounts have it.

- Also add logs on certain important events in DPMS.

Bug 28928996

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