OSDN Git Service

Fix issue with saving admins before finishing loading.
authorKenny Guy <kennyguy@google.com>
Tue, 17 Jan 2017 23:33:41 +0000 (23:33 +0000)
committerKenny Guy <kennyguy@google.com>
Wed, 18 Jan 2017 12:01:55 +0000 (12:01 +0000)
commitf98ed6863a7f64c535a66006852a934b05d550bc
tree0288e68440db9b9b5d447cdcf740ed0132cfcab9
parent97848fc473f0f03a19c69aa0b2b9c97e7c10cd4e
Fix issue with saving admins before finishing loading.

Saving device policy managers settings to clear out
password stats was happening before initializing mAdminList
so could wipe active admins.

Test: manual - flash with N2G05C add google account with dmagent flash wth this fix, check dmagent is still an active admin, reboot check admin is still active.
Test: runtest -c com.android.server.devicepolicy.DevicePolicyManagerTest frameworks-services

Bug: 34277435
Change-Id: I13660b47f30e9aba001eb13f2e457c3b3f36da3e
(cherry picked from commit adbda7474cc1968b66e9948aee566dc346e71340)
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java