From 6e5736bdb8e11cb46488a3936d796c75a47bb4b4 Mon Sep 17 00:00:00 2001 From: Tommy Chiu Date: Wed, 8 Feb 2023 10:16:03 +0800 Subject: [PATCH] VTS: Replace deprecated 'getService' by 'waitForService' Bug: None Test: Built Change-Id: I6902612ba9c4422a071c342dde4682dc96b20a6c --- security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp b/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp index e9cbe10bcb..588a1d44a0 100644 --- a/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp +++ b/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp @@ -2052,9 +2052,10 @@ void device_id_attestation_vsr_check(const ErrorCode& result) { // Check whether the given named feature is available. bool check_feature(const std::string& name) { ::android::sp<::android::IServiceManager> sm(::android::defaultServiceManager()); - ::android::sp<::android::IBinder> binder(sm->getService(::android::String16("package_native"))); + ::android::sp<::android::IBinder> binder( + sm->waitForService(::android::String16("package_native"))); if (binder == nullptr) { - GTEST_LOG_(ERROR) << "getService package_native failed"; + GTEST_LOG_(ERROR) << "waitForService package_native failed"; return false; } ::android::sp<::android::content::pm::IPackageManagerNative> packageMgr =