diff --git a/interfaces/plugin/vibrator/include/vibrator_napi_utils.h b/interfaces/plugin/vibrator/include/vibrator_napi_utils.h index ebb5d2332ec76e0c67616a965b69b3587fa805c4..de2a5e106b72fa57662203a245cfc5090bc36cf8 100644 --- a/interfaces/plugin/vibrator/include/vibrator_napi_utils.h +++ b/interfaces/plugin/vibrator/include/vibrator_napi_utils.h @@ -45,7 +45,6 @@ public: uint32_t callbackType = 0; AsyncCallbackInfo(napi_env env) : env(env) {} ~AsyncCallbackInfo(); -private: }; bool IsMatchType(const napi_env &env, const napi_value &value, const napi_valuetype &type); diff --git a/interfaces/plugin/vibrator/src/vibrator_napi_utils.cpp b/interfaces/plugin/vibrator/src/vibrator_napi_utils.cpp index e299a7beb2409c20d7769fca28f19301ac38224f..b4ab6cbad5fabe0d02e50a8a46ce5188e77bc39a 100644 --- a/interfaces/plugin/vibrator/src/vibrator_napi_utils.cpp +++ b/interfaces/plugin/vibrator/src/vibrator_napi_utils.cpp @@ -162,7 +162,7 @@ napi_value GreateCallbackError(const napi_env &env, const int32_t errCode, return result; } -void emitSystemCallback(const napi_env &env, sptr asyncCallbackInfo) +void EmitSystemCallback(const napi_env &env, sptr asyncCallbackInfo) { CHKPV(asyncCallbackInfo); if (asyncCallbackInfo->error.code == SUCCESS) { @@ -210,7 +210,7 @@ void EmitAsyncCallbackWork(sptr asyncCallbackInfo) */ asyncCallbackInfo->DecStrongRef(nullptr); if (asyncCallbackInfo->callbackType == TYPE_SYSTEM_VIBRATE) { - emitSystemCallback(env, asyncCallbackInfo); + EmitSystemCallback(env, asyncCallbackInfo); return; } CHKPV(asyncCallbackInfo->callback[0]); @@ -261,7 +261,7 @@ void EmitPromiseWork(sptr asyncCallbackInfo) asyncCallbackInfo->DecStrongRef(nullptr); CHKPV(asyncCallbackInfo->deferred); if (asyncCallbackInfo->callbackType == TYPE_SYSTEM_VIBRATE) { - emitSystemCallback(env, asyncCallbackInfo); + EmitSystemCallback(env, asyncCallbackInfo); return; } napi_value result = nullptr; diff --git a/services/miscdevice_service/hdi_connection/adpter/include/hdi_connection.h b/services/miscdevice_service/hdi_connection/adpter/include/hdi_connection.h index 3195f57a8ca69cca7e2f0dc443247b48e95acd46..4995320d8c6ea2786916e50246b3092d6b014780 100644 --- a/services/miscdevice_service/hdi_connection/adpter/include/hdi_connection.h +++ b/services/miscdevice_service/hdi_connection/adpter/include/hdi_connection.h @@ -44,7 +44,7 @@ private: sptr hdiDeathObserver_; void RegisterHdiDeathRecipient(); void UnregisterHdiDeathRecipient(); - void reconnect(); + void Reconnect(); }; } // namespace Sensors } // namespace OHOS diff --git a/services/miscdevice_service/hdi_connection/adpter/src/hdi_connection.cpp b/services/miscdevice_service/hdi_connection/adpter/src/hdi_connection.cpp index ee58cee94c8937461fa1d2d47e1cc91dfead5855..13c24e1592f78e1aa4cf28e10025e776c798d04c 100644 --- a/services/miscdevice_service/hdi_connection/adpter/src/hdi_connection.cpp +++ b/services/miscdevice_service/hdi_connection/adpter/src/hdi_connection.cpp @@ -126,15 +126,15 @@ void HdiConnection::ProcessDeathObserver(const wptr &object) return; } hdiService->RemoveDeathRecipient(hdiDeathObserver_); - reconnect(); + Reconnect(); } -void HdiConnection::reconnect() +void HdiConnection::Reconnect() { int32_t ret = ConnectHdi(); if (ret != ERR_OK) { HiSysEvent::Write(HiSysEvent::Domain::MISCDEVICE, "VIBRATOR_HDF_SERVICE_EXCEPTION", - HiSysEvent::EventType::FAULT, "PKG_NAME", "reconnect", "ERROR_CODE", ret); + HiSysEvent::EventType::FAULT, "PKG_NAME", "Reconnect", "ERROR_CODE", ret); MISC_HILOGE("connect hdi fail"); } } diff --git a/utils/include/death_recipient_template.h b/utils/include/death_recipient_template.h index d3a13a7a36a0e2a7f5564cf96b5e4786cadb476b..7e5ad58ad66e23b5b3b8496d522f410f08cc1180 100755 --- a/utils/include/death_recipient_template.h +++ b/utils/include/death_recipient_template.h @@ -23,7 +23,7 @@ namespace Sensors { template class DeathRecipientTemplate : public IRemoteObject::DeathRecipient { public: - explicit DeathRecipientTemplate(T &privateData) : privateData_(privateData){}; + explicit DeathRecipientTemplate(T &privateData) : privateData_(privateData) {}; virtual ~DeathRecipientTemplate() = default; virtual void OnRemoteDied(const wptr &object) { diff --git a/utils/include/permission_util.h b/utils/include/permission_util.h index 8a9a5e2ab4d46f237273c5236988ef8d930a95f9..cce531dbb068215c2a122d5e4dfe9cccf4d44ddb 100644 --- a/utils/include/permission_util.h +++ b/utils/include/permission_util.h @@ -31,8 +31,6 @@ public: PermissionUtil() = default; virtual ~PermissionUtil() {}; int32_t CheckVibratePermission(AccessTokenID callerToken, std::string permissionName); - -private: }; } // namespace Sensors } // namespace OHOS