summaryrefslogtreecommitdiff
path: root/api/api.go
diff options
context:
space:
mode:
author Eric Biggers <ebiggers@google.com> 2023-07-07 20:10:07 +0000
committer Eric Biggers <ebiggers@google.com> 2023-10-06 17:03:22 +0000
commite59460902bb569758a0fac6600c8820ea7c2907f (patch)
tree98744325bd61169f92e9d5cd063e5bfa2afa115c /api/api.go
parentdc151e2b57317a3a1a20a78d3a34141ad5deb2a8 (diff)
Ensure that LockSettingsService waits for gatekeeperd to be ready
gatekeeperd is started asynchronously. Thus, there is no hard guarantee that it will be ready when LockSettingsService first tries to use it. Therefore, use waitForService() to wait for it to be ready. To avoid introducing any unnecessary delay, stop calling getGateKeeperService() from LockSettingsService#systemReady(), where GK isn't yet needed. This is motivated by a bug that caused gatekeeperd to wait 5 seconds during start-up, fixed by https://r.android.com/2623413. Apparently, that was enough of a delay to sometimes cause gatekeeperd to not be ready by LockSettingsService#loadEscrowData(). Bug: 283055837 Test: Boot and 'atest com.android.server.locksettings' Change-Id: I815151cc6024c447bf3eff194a911ecdaab22d10 Merged-In: I815151cc6024c447bf3eff194a911ecdaab22d10 (cherry picked from commit cdd03b770a7ff69c172fbd3f507310d2d62c371c)
Diffstat (limited to 'api/api.go')
0 files changed, 0 insertions, 0 deletions