diff options
-rw-r--r-- | fuzzer/Android.bp | 3 | ||||
-rw-r--r-- | transport/ServiceManagement.cpp | 34 |
2 files changed, 4 insertions, 33 deletions
diff --git a/fuzzer/Android.bp b/fuzzer/Android.bp index a40ee9c..3de7b74 100644 --- a/fuzzer/Android.bp +++ b/fuzzer/Android.bp @@ -42,7 +42,8 @@ cc_defaults { }, fuzz_config: { cc: [ - "android-media-fuzzing-reports@google.com", + "smoreland@google.com", + "elsk@google.com", ], componentid: 155276, hotlists: [ diff --git a/transport/ServiceManagement.cpp b/transport/ServiceManagement.cpp index 54bb8dc..b5e02df 100644 --- a/transport/ServiceManagement.cpp +++ b/transport/ServiceManagement.cpp @@ -45,6 +45,7 @@ #include <android-base/properties.h> #include <android-base/stringprintf.h> #include <android-base/strings.h> +#include <hwbinder/HidlSupport.h> #include <hwbinder/IPCThreadState.h> #include <hwbinder/Parcel.h> #if !defined(__ANDROID_RECOVERY__) && defined(__ANDROID__) @@ -71,39 +72,8 @@ static constexpr bool kIsRecovery = true; static constexpr bool kIsRecovery = false; #endif -static bool isHwServiceManagerInstalled() { - return access("/system_ext/bin/hwservicemanager", F_OK) == 0 || - access("/system/system_ext/bin/hwservicemanager", F_OK) == 0 || - access("/system/bin/hwservicemanager", F_OK) == 0; -} - -static bool waitForHwServiceManager() { - if (!isHwServiceManagerInstalled()) { - return false; - } - // TODO(b/31559095): need bionic host so that we can use 'prop_info' returned - // from WaitForProperty -#ifdef __ANDROID__ - static const char* kHwServicemanagerReadyProperty = "hwservicemanager.ready"; - - using std::literals::chrono_literals::operator""s; - - using android::base::WaitForProperty; - while (true) { - if (base::GetBoolProperty("hwservicemanager.disabled", false)) { - return false; - } - if (WaitForProperty(kHwServicemanagerReadyProperty, "true", 1s)) { - return true; - } - LOG(WARNING) << "Waited for hwservicemanager.ready for a second, waiting another..."; - } -#endif // __ANDROID__ - return true; -} - bool isHidlSupported() { - return waitForHwServiceManager(); + return isHwbinderSupportedBlocking(); } static std::string binaryName() { |