diff options
author | Tri Vo <trong@google.com> | 2023-07-18 14:53:39 -0400 |
---|---|---|
committer | Tri Vo <trong@google.com> | 2023-07-18 14:58:36 -0400 |
commit | 8d08cd9c5e146ab0fc868385e68a4c6547e5b996 (patch) | |
tree | d00b158b891dde75ef0df36ffec6c61c01cc1cf4 /keystore | |
parent | 60021566d53c057e4a141ce84fe343d3813cb59a (diff) | |
download | security-8d08cd9c5e146ab0fc868385e68a4c6547e5b996.tar.gz |
Keystore: Use waitForService() instead of getService()
getService() is deprecated. It can also time out, and keystore doesn't
currently deal with that error condition gracefully.
Bug: 285846920
Test: boot device, IServiceManager doesn't complain
Change-Id: I3b73bf29087cc452d57545a5fd2aa9a3a50a86d4
Diffstat (limited to 'keystore')
-rw-r--r-- | keystore/keystore_attestation_id.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/keystore/keystore_attestation_id.cpp b/keystore/keystore_attestation_id.cpp index ccd38085..75c62dd7 100644 --- a/keystore/keystore_attestation_id.cpp +++ b/keystore/keystore_attestation_id.cpp @@ -74,8 +74,8 @@ KeyAttestationApplicationIdProvider& KeyAttestationApplicationIdProvider::get() } KeyAttestationApplicationIdProvider::KeyAttestationApplicationIdProvider() - : BpKeyAttestationApplicationIdProvider( - android::defaultServiceManager()->getService(String16("sec_key_att_app_id_provider"))) {} + : BpKeyAttestationApplicationIdProvider(android::defaultServiceManager()->waitForService( + String16("sec_key_att_app_id_provider"))) {} DECLARE_STACK_OF(ASN1_OCTET_STRING); |