diff --git a/memtrack/1.0/default/Memtrack.cpp b/memtrack/1.0/default/Memtrack.cpp index cc2d341d90..33a6906694 100644 --- a/memtrack/1.0/default/Memtrack.cpp +++ b/memtrack/1.0/default/Memtrack.cpp @@ -73,19 +73,19 @@ Return Memtrack::getMemory(int32_t pid, MemtrackType type, } -IMemtrack* HIDL_FETCH_IMemtrack(const char* name) { +IMemtrack* HIDL_FETCH_IMemtrack(const char* /* name */) { const hw_module_t* hw_module = nullptr; const memtrack_module_t* memtrack_module = nullptr; - int err = hw_get_module(name, &hw_module); + int err = hw_get_module(MEMTRACK_HARDWARE_MODULE_ID, &hw_module); if (err) { - ALOGE ("hw_get_module %s failed: %d", name, err); + ALOGE ("hw_get_module %s failed: %d", MEMTRACK_HARDWARE_MODULE_ID, err); return nullptr; } if (!hw_module->methods || !hw_module->methods->open) { memtrack_module = reinterpret_cast(hw_module); } else { - err = hw_module->methods->open(hw_module, name, + err = hw_module->methods->open(hw_module, MEMTRACK_HARDWARE_MODULE_ID, reinterpret_cast(const_cast(&memtrack_module))); if (err) { ALOGE("Passthrough failed to load legacy HAL."); diff --git a/memtrack/1.0/default/service.cpp b/memtrack/1.0/default/service.cpp index f705b157ef..f079743d44 100644 --- a/memtrack/1.0/default/service.cpp +++ b/memtrack/1.0/default/service.cpp @@ -23,5 +23,5 @@ using android::hardware::memtrack::V1_0::IMemtrack; using android::hardware::defaultPassthroughServiceImplementation; int main() { - return defaultPassthroughServiceImplementation("memtrack"); + return defaultPassthroughServiceImplementation(); } diff --git a/memtrack/1.0/vts/functional/memtrack_hidl_hal_test.cpp b/memtrack/1.0/vts/functional/memtrack_hidl_hal_test.cpp index 597b5da9e6..a4b4fa9980 100644 --- a/memtrack/1.0/vts/functional/memtrack_hidl_hal_test.cpp +++ b/memtrack/1.0/vts/functional/memtrack_hidl_hal_test.cpp @@ -37,7 +37,7 @@ using std::count_if; class MemtrackHidlTest : public ::testing::Test { public: virtual void SetUp() override { - memtrack = IMemtrack::getService("memtrack"); + memtrack = IMemtrack::getService(); ASSERT_NE(memtrack, nullptr); }