diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2017-06-20 07:19:22 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2017-06-20 07:19:22 +0000 |
commit | 9e74e9d823a701c87f2f7376e85463c2fee3a0b6 (patch) | |
tree | 415b491cc45b8a1f1e3f9a6e51b3cff770e71f0b | |
parent | 5ce28113da572ccd72e2e3e903e283d91772f888 (diff) | |
parent | 384792b1ed77d03d7a76f1de6880a812a0073802 (diff) | |
download | libhidl-oreo-r3-release.tar.gz |
release-request-8a29fe1b-a466-48e3-824a-9b3737e5c08a-for-git_oc-release-4115999 snap-temp-L30600000075741665android-cts-8.0_r9android-cts-8.0_r8android-cts-8.0_r7android-cts-8.0_r6android-cts-8.0_r5android-cts-8.0_r4android-cts-8.0_r3android-cts-8.0_r26android-cts-8.0_r25android-cts-8.0_r24android-cts-8.0_r23android-cts-8.0_r22android-cts-8.0_r21android-cts-8.0_r20android-cts-8.0_r2android-cts-8.0_r19android-cts-8.0_r18android-cts-8.0_r17android-cts-8.0_r16android-cts-8.0_r15android-cts-8.0_r14android-cts-8.0_r13android-cts-8.0_r12android-cts-8.0_r11android-cts-8.0_r10android-cts-8.0_r1android-8.0.0_r9android-8.0.0_r7android-8.0.0_r4android-8.0.0_r36android-8.0.0_r35android-8.0.0_r32android-8.0.0_r31android-8.0.0_r30android-8.0.0_r3android-8.0.0_r29android-8.0.0_r28android-8.0.0_r2android-8.0.0_r17android-8.0.0_r16android-8.0.0_r15android-8.0.0_r13android-8.0.0_r12android-8.0.0_r11android-8.0.0_r10android-8.0.0_r1oreo-releaseoreo-r6-releaseoreo-r5-releaseoreo-r4-releaseoreo-r3-releaseoreo-r2-releaseoreo-cts-release
Change-Id: Ic8d83abf082f5e27234b3b40e8b11484269628e7
-rw-r--r-- | base/HidlInternal.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/base/HidlInternal.cpp b/base/HidlInternal.cpp index 3bb27f8..b0d867f 100644 --- a/base/HidlInternal.cpp +++ b/base/HidlInternal.cpp @@ -37,21 +37,21 @@ void logAlwaysFatal(const char *message) { // ---------------------------------------------------------------------- // HidlInstrumentor implementation. -HidlInstrumentor::HidlInstrumentor( - const std::string &package, - const std::string &interface) - : mInstrumentationLibPackage(package), mInterfaceName(interface) { +HidlInstrumentor::HidlInstrumentor(const std::string& package, const std::string& interface) + : mEnableInstrumentation(false), + mInstrumentationLibPackage(package), + mInterfaceName(interface) { configureInstrumentation(false); } HidlInstrumentor:: ~HidlInstrumentor() {} void HidlInstrumentor::configureInstrumentation(bool log) { - bool enable_instrumentation = property_get_bool( + bool enableInstrumentation = property_get_bool( "hal.instrumentation.enable", false); - if (enable_instrumentation != mEnableInstrumentation) { - mEnableInstrumentation = enable_instrumentation; + if (enableInstrumentation != mEnableInstrumentation) { + mEnableInstrumentation = enableInstrumentation; if (mEnableInstrumentation) { if (log) { LOG(INFO) << "Enable instrumentation."; @@ -70,11 +70,11 @@ void HidlInstrumentor::registerInstrumentationCallbacks( std::vector<InstrumentationCallback> *instrumentationCallbacks) { #ifdef LIBHIDL_TARGET_DEBUGGABLE std::vector<std::string> instrumentationLibPaths; - char instrumentation_lib_path[PROPERTY_VALUE_MAX]; + char instrumentationLibPath[PROPERTY_VALUE_MAX]; if (property_get("hal.instrumentation.lib.path", - instrumentation_lib_path, + instrumentationLibPath, "") > 0) { - instrumentationLibPaths.push_back(instrumentation_lib_path); + instrumentationLibPaths.push_back(instrumentationLibPath); } else { instrumentationLibPaths.push_back(HAL_LIBRARY_PATH_SYSTEM); instrumentationLibPaths.push_back(HAL_LIBRARY_PATH_VENDOR); @@ -103,7 +103,7 @@ void HidlInstrumentor::registerInstrumentationCallbacks( dlerror(); /* Clear any existing error */ - using cb_fun = void (*)( + using cbFun = void (*)( const InstrumentationEvent, const char *, const char *, @@ -123,7 +123,7 @@ void HidlInstrumentor::registerInstrumentationCallbacks( continue; } } - auto cb = (cb_fun)dlsym(handle, ("HIDL_INSTRUMENTATION_FUNCTION_" + auto cb = (cbFun)dlsym(handle, ("HIDL_INSTRUMENTATION_FUNCTION_" + package + "_" + mInterfaceName).c_str()); if ((error = dlerror()) != NULL) { LOG(WARNING) |