diff options
author | Adrian Roos <roosa@google.com> | 2014-10-21 17:07:39 +0200 |
---|---|---|
committer | Adrian Roos <roosa@google.com> | 2014-10-21 17:07:41 +0200 |
commit | 7b4a38b197ce43cb286d80fc6c4e9713b2807f13 (patch) | |
tree | 2ecc25466f202a63ed32b84fba49bb9b36c77682 | |
parent | 3c8bde5534d81518f5baf3795989f367373f7dfd (diff) | |
download | base-7b4a38b197ce43cb286d80fc6c4e9713b2807f13.tar.gz |
Delay discovery of system trust agents
Waits for BOOT_COMPLETED when enabling system trust agents.
This fixes an issue where no agents were discovered because the
packages were not ready after an OTA.
Bug: 18065140
Change-Id: Ibff9948e1536e07f868d6b29f432923a137091e6
-rw-r--r-- | services/core/java/com/android/server/trust/TrustManagerService.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/trust/TrustManagerService.java b/services/core/java/com/android/server/trust/TrustManagerService.java index fefbe0a608ec..f9b170443d8d 100644 --- a/services/core/java/com/android/server/trust/TrustManagerService.java +++ b/services/core/java/com/android/server/trust/TrustManagerService.java @@ -120,8 +120,9 @@ public class TrustManagerService extends SystemService { if (phase == SystemService.PHASE_SYSTEM_SERVICES_READY && !isSafeMode()) { mPackageMonitor.register(mContext, mHandler.getLooper(), UserHandle.ALL, true); mReceiver.register(mContext); - maybeEnableFactoryTrustAgents(mLockPatternUtils, UserHandle.USER_OWNER); refreshAgentList(UserHandle.USER_ALL); + } else if (phase == SystemService.PHASE_BOOT_COMPLETED && !isSafeMode()) { + maybeEnableFactoryTrustAgents(mLockPatternUtils, UserHandle.USER_OWNER); } } |