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
Loading
Please register or sign in to comment