OSDN Git Service

Stop double-loading device admins
authorRobin Lee <rgl@google.com>
Tue, 22 Jul 2014 15:47:40 +0000 (16:47 +0100)
committerRobin Lee <rgl@google.com>
Tue, 22 Jul 2014 21:35:09 +0000 (21:35 +0000)
commit9c2be6c7ba3d7dce58e8f4ec1617698c54ae808e
treeb699b5cab393ed587f17cb07f05764ba02c585dd
parent2dcab18c6c9381122df6e06a93912e53dff69408
Stop double-loading device admins

loadSettingsLocked() was being called twice for USER_OWNER at
systemReady(), doubling the number of admin entries at every boot.

Also guards against double-adding admins which appear twice in the
same XML file, favouring more recently-refreshed entries for
backward compatibility.

Previously an application calling in with 'refreshing = true' would
double-insert whatever admin was being refreshed into its user's list
of device admins. This is fixed too.

@bug 16416936

Change-Id: Idd147aa130e6bce7bcc40532f0a7fb07117b3151
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java