diff --git a/services/hdi_connection/adapter/include/compatible_connection.h b/services/hdi_connection/adapter/include/compatible_connection.h index f720f51e02a7053c33092e9746ddc9a868b62c75..75460182ec1d71e95bbdaeb9b702b326f67f010f 100644 --- a/services/hdi_connection/adapter/include/compatible_connection.h +++ b/services/hdi_connection/adapter/include/compatible_connection.h @@ -41,6 +41,6 @@ private: static sptr reportDataCallback_; HdiServiceImpl &hdiServiceImpl_ = HdiServiceImpl::GetInstance(); }; -} // namespace Sensors -} // namespace OHOS +} // namespace Sensors +} // namespace OHOS #endif // COMPATIBLE_CONNECTION_H \ No newline at end of file diff --git a/services/hdi_connection/adapter/include/hdi_connection.h b/services/hdi_connection/adapter/include/hdi_connection.h index d895dd614fa5e4b7761cf6af6a12872093758996..fbc192b09fb2a6a6eed09dedc1a86a8123260133 100644 --- a/services/hdi_connection/adapter/include/hdi_connection.h +++ b/services/hdi_connection/adapter/include/hdi_connection.h @@ -50,6 +50,6 @@ private: void SetSensorBasicInfoState(int32_t sensorId, bool state); void DeleteSensorBasicInfoState(int32_t sensorId); }; -} // namespace Sensors -} // namespace OHOS +} // namespace Sensors +} // namespace OHOS #endif // HDI_CONNECTION_H \ No newline at end of file diff --git a/services/hdi_connection/adapter/include/sensor_event_callback.h b/services/hdi_connection/adapter/include/sensor_event_callback.h index 6cc72fbd37675b9a65922caa251f3830dc53b820..552e842eaba5dd329f4d9a4af96c5b79ca3c8bad 100644 --- a/services/hdi_connection/adapter/include/sensor_event_callback.h +++ b/services/hdi_connection/adapter/include/sensor_event_callback.h @@ -29,6 +29,6 @@ public: virtual ~SensorEventCallback() {} int32_t OnDataEvent(const HdfSensorEvents &event) override; }; -} // namespace Sensors -} // namespace OHOS +} // namespace Sensors +} // namespace OHOS #endif // SENSOR_EVENT_CALLBACK_H diff --git a/services/hdi_connection/adapter/src/compatible_connection.cpp b/services/hdi_connection/adapter/src/compatible_connection.cpp index 1748a858877a4fbb9528ab2583b4fce8fa34c27e..b9472c22185a9b5e263de5299b417e58d944f694 100644 --- a/services/hdi_connection/adapter/src/compatible_connection.cpp +++ b/services/hdi_connection/adapter/src/compatible_connection.cpp @@ -163,5 +163,5 @@ int32_t CompatibleConnection::DestroyHdiConnection() } return ERR_OK; } -} // namespace Sensors -} // namespace OHOS \ No newline at end of file +} // namespace Sensors +} // namespace OHOS \ No newline at end of file diff --git a/services/hdi_connection/adapter/src/hdi_connection.cpp b/services/hdi_connection/adapter/src/hdi_connection.cpp index 01ec4d9630aea216de29225a333ca975ac86f49a..9f656f6467d175938bb96b4f7aa856d9f42bbd23 100644 --- a/services/hdi_connection/adapter/src/hdi_connection.cpp +++ b/services/hdi_connection/adapter/src/hdi_connection.cpp @@ -309,5 +309,5 @@ void HdiConnection::Reconnect() } } } -} // namespace Sensors -} // namespace OHOS +} // namespace Sensors +} // namespace OHOS diff --git a/services/hdi_connection/adapter/src/sensor_event_callback.cpp b/services/hdi_connection/adapter/src/sensor_event_callback.cpp index 6caf0e1800da2686c8ac7a3669ca1d8fe3d2b21a..89286b614ef6683f974a9b4a664f7b25ec26808c 100644 --- a/services/hdi_connection/adapter/src/sensor_event_callback.cpp +++ b/services/hdi_connection/adapter/src/sensor_event_callback.cpp @@ -26,7 +26,7 @@ namespace { constexpr HiLogLabel LABEL = { LOG_CORE, SENSOR_LOG_DOMAIN, "HdiConnection" }; std::unique_ptr HdiConnection_ = std::make_unique(); constexpr int32_t HEADPOSTURE_DATA_SIZE = 20; -} // namespace +} // namespace int32_t SensorEventCallback::OnDataEvent(const HdfSensorEvents &event) { @@ -74,5 +74,5 @@ int32_t SensorEventCallback::OnDataEvent(const HdfSensorEvents &event) ISensorHdiConnection::dataCondition_.notify_one(); return ERR_OK; } -} // namespace Sensors -} // namespace OHOS \ No newline at end of file +} // namespace Sensors +} // namespace OHOS \ No newline at end of file diff --git a/services/hdi_connection/hardware/include/hdi_service_impl.h b/services/hdi_connection/hardware/include/hdi_service_impl.h index fee4b17bcbc94634a8ee2ed1faccbd6150e616aa..8d18640a80b02d3ac0f3d90c3e36b8d13eede26e 100644 --- a/services/hdi_connection/hardware/include/hdi_service_impl.h +++ b/services/hdi_connection/hardware/include/hdi_service_impl.h @@ -51,6 +51,6 @@ private: static int64_t reportInterval_; static std::atomic_bool isStop_; }; -} // namespace Sensors -} // namespace OHOS +} // namespace Sensors +} // namespace OHOS #endif // HDI_SERVICE_IMPL_H \ No newline at end of file diff --git a/services/hdi_connection/hardware/src/hdi_service_impl.cpp b/services/hdi_connection/hardware/src/hdi_service_impl.cpp index ef76a32cd8a5f0ec4b073cb25b768fdf822c4d41..95c3bae7e49cc27b5e246fb0c31e728bdf2eba09 100644 --- a/services/hdi_connection/hardware/src/hdi_service_impl.cpp +++ b/services/hdi_connection/hardware/src/hdi_service_impl.cpp @@ -287,5 +287,5 @@ int32_t HdiServiceImpl::Unregister() isStop_ = true; return ERR_OK; } -} // namespace Sensors -} // namespace OHOS \ No newline at end of file +} // namespace Sensors +} // namespace OHOS \ No newline at end of file diff --git a/services/hdi_connection/interface/include/i_sensor_hdi_connection.h b/services/hdi_connection/interface/include/i_sensor_hdi_connection.h index c9d9775e64452ba8cd4aaf94fe4e91d8fa8a58ce..7e3a7b5ef8799cf531ad944f32a831745ea4e1e0 100644 --- a/services/hdi_connection/interface/include/i_sensor_hdi_connection.h +++ b/services/hdi_connection/interface/include/i_sensor_hdi_connection.h @@ -41,6 +41,6 @@ public: private: DISALLOW_COPY_AND_MOVE(ISensorHdiConnection); }; -} // namespace Sensors -} // namespace OHOS +} // namespace Sensors +} // namespace OHOS #endif // I_SENSOR_HDI_CONNECTION_H \ No newline at end of file diff --git a/services/hdi_connection/interface/include/sensor_hdi_connection.h b/services/hdi_connection/interface/include/sensor_hdi_connection.h index 09a145b9684ccb39eb1066ac133df0f5033db36c..b8cbae2647d68fbb661f7c2ebdcbe8976f950ad2 100644 --- a/services/hdi_connection/interface/include/sensor_hdi_connection.h +++ b/services/hdi_connection/interface/include/sensor_hdi_connection.h @@ -54,6 +54,6 @@ private: Sensor GenerateHeadPostureSensor(); std::atomic_bool hdiConnectionStatus_ = false; }; -} // namespace Sensors -} // namespace OHOS +} // namespace Sensors +} // namespace OHOS #endif // SENSOR_HDI_CONNECTION_H \ No newline at end of file diff --git a/services/hdi_connection/interface/src/sensor_hdi_connection.cpp b/services/hdi_connection/interface/src/sensor_hdi_connection.cpp index 72fb9ed8395dc2bdc2fa1bcc2c22e6e3fcaa10dc..51bbafd1505a74b4bb74a2e02635f41c9efe6009 100644 --- a/services/hdi_connection/interface/src/sensor_hdi_connection.cpp +++ b/services/hdi_connection/interface/src/sensor_hdi_connection.cpp @@ -350,5 +350,5 @@ int32_t SensorHdiConnection::DestroyHdiConnection() #endif // BUILD_VARIANT_ENG return ret; } -} // namespace Sensors -} // namespace OHOS +} // namespace Sensors +} // namespace OHOS diff --git a/services/include/client_info.h b/services/include/client_info.h index d90e919b15ec2e060c244cd78eb7bbd91b30bec3..5187e570e37a66c5e2c772b220bf7190a56a1f08 100644 --- a/services/include/client_info.h +++ b/services/include/client_info.h @@ -105,6 +105,6 @@ private: std::unordered_set activeInfoCBPidSet_; static std::unordered_map> userGrantPermMap_; }; -} // namespace Sensors -} // namespace OHOS +} // namespace Sensors +} // namespace OHOS #endif // CLIENT_INFO_H diff --git a/services/include/fifo_cache_data.h b/services/include/fifo_cache_data.h index 1a44751def370be69511409796676f9e29d84adb..b459a32c93ff9c604964ed0c536c4c933dca76d1 100644 --- a/services/include/fifo_cache_data.h +++ b/services/include/fifo_cache_data.h @@ -43,6 +43,6 @@ private: wptr channel_; std::vector fifoCacheData_; }; -} // namespace Sensors -} // namespace OHOS +} // namespace Sensors +} // namespace OHOS #endif // FIFO_CACHE_DATA_H \ No newline at end of file diff --git a/services/include/flush_info_record.h b/services/include/flush_info_record.h index 9a0bc1aed650db14090d25483a42247511a5f713..02b77689edfada921f4bbd720cf4ba01db5163c1 100644 --- a/services/include/flush_info_record.h +++ b/services/include/flush_info_record.h @@ -64,6 +64,6 @@ private: std::unordered_map> flushInfo_; std::mutex flushInfoMutex_; }; -} // namespace Sensors -} // namespace OHOS +} // namespace Sensors +} // namespace OHOS #endif // FLUSH_INFO_RECORD_H diff --git a/services/include/sensor_data_processer.h b/services/include/sensor_data_processer.h index 6998d34f5f209bef1b1bbf64383e06f11e26e569..802cf040b7bca9b11a5d769dca478239fb305b35 100644 --- a/services/include/sensor_data_processer.h +++ b/services/include/sensor_data_processer.h @@ -62,6 +62,6 @@ private: std::mutex sensorMutex_; std::unordered_map sensorMap_; }; -} // namespace Sensors -} // namespace OHOS +} // namespace Sensors +} // namespace OHOS #endif // endif SENSORS_DATA_PROCESSER_H diff --git a/services/include/sensor_dump.h b/services/include/sensor_dump.h index 1a311d3da54bc262e23fdc483fb37957cb8795dc..be667abb70f27ac788bd77d7ebad6ece136a9e0e 100644 --- a/services/include/sensor_dump.h +++ b/services/include/sensor_dump.h @@ -47,6 +47,6 @@ private: std::string GetDataBySensorId(int32_t sensorId, SensorData &sensorData); static std::unordered_map sensorMap_; }; -} // namespace Sensors -} // namespace OHOS +} // namespace Sensors +} // namespace OHOS #endif // SENSOR_DUMP_H diff --git a/services/include/sensor_manager.h b/services/include/sensor_manager.h index a3afe0a13d8f6cdb9742e6dd87677d68e59610d7..c77736407c83f2613d86a6d831eab2cd7f9d5405 100644 --- a/services/include/sensor_manager.h +++ b/services/include/sensor_manager.h @@ -60,6 +60,6 @@ private: std::unordered_map sensorMap_; std::mutex sensorMapMutex_; }; -} // namespace Sensors -} // namespace OHOS +} // namespace Sensors +} // namespace OHOS #endif // SENSOR_MANAGER_H diff --git a/services/include/sensor_power_policy.h b/services/include/sensor_power_policy.h index 68281738da23c42b91926c6efed910208bead323..e8333b8d56056294f0cd03695a531ec6c992a4ee 100644 --- a/services/include/sensor_power_policy.h +++ b/services/include/sensor_power_policy.h @@ -51,6 +51,6 @@ private: std::mutex pidSensorInfoMutex_; std::unordered_map> pidSensorInfoMap_; }; -} // namespace Sensors -} // namespace OHOS +} // namespace Sensors +} // namespace OHOS #endif // SENSOR_POWER_POLICY_H \ No newline at end of file diff --git a/services/include/sensor_service.h b/services/include/sensor_service.h index 6c5867f764e2f30126c3fd24b9a930abbd607513..182d984b2669d7b662fde9b7570bd6471e821f29 100644 --- a/services/include/sensor_service.h +++ b/services/include/sensor_service.h @@ -115,6 +115,6 @@ private: }; #define POWER_POLICY SensorPowerPolicy::GetInstance() -} // namespace Sensors -} // namespace OHOS +} // namespace Sensors +} // namespace OHOS #endif // SENSOR_SERVICE_H diff --git a/services/include/sensor_service_proxy.h b/services/include/sensor_service_proxy.h index 8080435373a16b728a15496859c849d075eb9b01..7711690172ae43536a58c74a77f248c7912bef37 100644 --- a/services/include/sensor_service_proxy.h +++ b/services/include/sensor_service_proxy.h @@ -42,6 +42,6 @@ private: DISALLOW_COPY_AND_MOVE(SensorServiceProxy); static inline BrokerDelegator delegator_; }; -} // namespace Sensors -} // namespace OHOS +} // namespace Sensors +} // namespace OHOS #endif // SENSOR_SERVICE_PROXY_H diff --git a/services/include/sensor_service_stub.h b/services/include/sensor_service_stub.h index 25a76d35c2bd82bbaaebbefb30b681bcf5ff0914..857bb5a1ff621f45206c7c856f93ad97e4acad83 100644 --- a/services/include/sensor_service_stub.h +++ b/services/include/sensor_service_stub.h @@ -49,6 +49,6 @@ private: ErrCode ResetSensorsInner(MessageParcel &data, MessageParcel &reply); std::unordered_map baseFuncs_; }; -} // namespace Sensors -} // namespace OHOS +} // namespace Sensors +} // namespace OHOS #endif // SENSOR_SERVICE_STUB_H diff --git a/services/include/stream_server.h b/services/include/stream_server.h index b9496445e454f95439605ca9aeb326223b2cc49f..c97f3a934a2d261f600ab0d79ce7e3de9562c84b 100644 --- a/services/include/stream_server.h +++ b/services/include/stream_server.h @@ -41,6 +41,6 @@ protected: std::map idxPidMap_; std::map sessionsMap_; }; -} // namespace Sensors -} // namespace OHOS +} // namespace Sensors +} // namespace OHOS #endif // STREAM_SERVER_H diff --git a/services/src/client_info.cpp b/services/src/client_info.cpp index 94a5cda1d1a5f3114397907f92da9cfa12afd270..649b15cf14f47bccc8ec30a48043550eeaeb1022 100644 --- a/services/src/client_info.cpp +++ b/services/src/client_info.cpp @@ -38,7 +38,7 @@ constexpr int32_t MIN_MAP_SIZE = 0; constexpr uint32_t NO_STORE_EVENT = -2; constexpr uint32_t MAX_SUPPORT_CHANNEL = 200; constexpr uint32_t MAX_DUMP_DATA_SIZE = 10; -} // namespace +} // namespace std::unordered_map> ClientInfo::userGrantPermMap_ = { { ACTIVITY_MOTION_PERMISSION, { SENSOR_TYPE_ID_PEDOMETER_DETECTION, SENSOR_TYPE_ID_PEDOMETER } }, @@ -795,5 +795,5 @@ void ClientInfo::ChangeSensorPerm(AccessTokenID tokenId, const std::string &perm UpdatePermState(pid, sensorId, state); } } -} // namespace Sensors -} // namespace OHOS +} // namespace Sensors +} // namespace OHOS diff --git a/services/src/fifo_cache_data.cpp b/services/src/fifo_cache_data.cpp index a74846807f8bcf6e9e3feaa6f5e1354876115140..cb061697fa6ba8b17354f4dc1f62a1b95ea5d60d 100644 --- a/services/src/fifo_cache_data.cpp +++ b/services/src/fifo_cache_data.cpp @@ -60,5 +60,5 @@ sptr FifoCacheData::GetChannel() const { return channel_.promote(); } -} // namespace Sensors -} // namespace OHOS +} // namespace Sensors +} // namespace OHOS diff --git a/services/src/flush_info_record.cpp b/services/src/flush_info_record.cpp index 38535a4b6b1421a0c1aea0c7a879884e87f67c5e..1d840746323ee5aee0dd0a9de4319172a4a5e9b6 100644 --- a/services/src/flush_info_record.cpp +++ b/services/src/flush_info_record.cpp @@ -24,7 +24,7 @@ using namespace OHOS::HiviewDFX; namespace { constexpr HiLogLabel LABEL = { LOG_CORE, SENSOR_LOG_DOMAIN, "FlushInfoRecord" }; constexpr int32_t CHANNEL_NO_FLUSH = -1; -} // namespace +} // namespace std::unordered_map> FlushInfoRecord::GetFlushInfo() { @@ -94,5 +94,5 @@ ErrCode FlushInfoRecord::FlushProcess(const int32_t sensorId, const uint32_t fla } return ERR_OK; } -} // namespace Sensors -} // namespace OHOS +} // namespace Sensors +} // namespace OHOS diff --git a/services/src/sensor_data_processer.cpp b/services/src/sensor_data_processer.cpp index c73702c8a768a39e875fef52117b51486e9f7f76..8c1b010f234a0b736fa23226b75eb28171ef063a 100644 --- a/services/src/sensor_data_processer.cpp +++ b/services/src/sensor_data_processer.cpp @@ -33,7 +33,7 @@ using namespace OHOS::HiviewDFX; namespace { constexpr HiLogLabel LABEL = { LOG_CORE, SENSOR_LOG_DOMAIN, "SensorDataProcesser" }; const std::string SENSOR_REPORT_THREAD_NAME = "OS_SenProducer"; -} // namespace +} // namespace SensorDataProcesser::SensorDataProcesser(const std::unordered_map &sensorMap) { @@ -301,5 +301,5 @@ int32_t SensorDataProcesser::DataThread(sptr dataProcesser, } } while (1); } -} // namespace Sensors -} // namespace OHOS +} // namespace Sensors +} // namespace OHOS diff --git a/services/src/sensor_dump.cpp b/services/src/sensor_dump.cpp index 7a702a938d761101ed87f03142c5f0e03608e612..d82eb3de3ae9ab1495743ac5552cb278163ec258 100644 --- a/services/src/sensor_dump.cpp +++ b/services/src/sensor_dump.cpp @@ -47,7 +47,7 @@ enum { POSE_6DOF_DIMENSION = 15, DEFAULT_DIMENSION = 16, }; -} // namespace +} // namespace std::unordered_map SensorDump::sensorMap_ = { { SENSOR_TYPE_ID_ACCELEROMETER, "ACCELEROMETER" }, @@ -334,5 +334,5 @@ std::string SensorDump::GetDataBySensorId(int32_t sensorId, SensorData &sensorDa str.append("\n"); return str; } -} // namespace Sensors -} // namespace OHOS +} // namespace Sensors +} // namespace OHOS diff --git a/services/src/sensor_manager.cpp b/services/src/sensor_manager.cpp index 337c6b1f95546d68e786687f40b4dfb482d97329..fe870cb8cd7cd73a663fa70690554978986a2337 100644 --- a/services/src/sensor_manager.cpp +++ b/services/src/sensor_manager.cpp @@ -33,7 +33,7 @@ constexpr int32_t INVALID_SENSOR_ID = -1; #endif // HDF_DRIVERS_INTERFACE_SENSOR constexpr uint32_t PROXIMITY_SENSOR_ID = 50331904; constexpr float PROXIMITY_FAR = 5.0; -} // namespace +} // namespace #ifdef HDF_DRIVERS_INTERFACE_SENSOR void SensorManager::InitSensorMap(const std::unordered_map &sensorMap, @@ -212,5 +212,5 @@ void SensorManager::GetPackageName(AccessTokenID tokenId, std::string &packageNa } } } -} // namespace Sensors -} // namespace OHOS +} // namespace Sensors +} // namespace OHOS diff --git a/services/src/sensor_power_policy.cpp b/services/src/sensor_power_policy.cpp index 21d45239ed5ca679e94579842795f0e5f3786470..0a90ad243034247197b9e9816d3b8644d9ad83a1 100644 --- a/services/src/sensor_power_policy.cpp +++ b/services/src/sensor_power_policy.cpp @@ -34,7 +34,7 @@ SensorManager &sensorManager_ = SensorManager::GetInstance(); #ifdef HDF_DRIVERS_INTERFACE_SENSOR SensorHdiConnection &sensorHdiConnection_ = SensorHdiConnection::GetInstance(); #endif // HDF_DRIVERS_INTERFACE_SENSOR -} // namespace +} // namespace bool SensorPowerPolicy::CheckFreezingSensor(int32_t sensorId) { @@ -260,5 +260,5 @@ void SensorPowerPolicy::ReportActiveInfo(const ActiveInfo &activeInfo, } } } -} // namespace Sensors -} // namespace OHOS \ No newline at end of file +} // namespace Sensors +} // namespace OHOS \ No newline at end of file diff --git a/services/src/sensor_service.cpp b/services/src/sensor_service.cpp index 6ada9b6fbc21febc097c8490bd341f19efb29fee..b083a7317dc83dcdb75913794e81b0dd23086004 100644 --- a/services/src/sensor_service.cpp +++ b/services/src/sensor_service.cpp @@ -39,7 +39,7 @@ const bool G_REGISTER_RESULT = SystemAbility::MakeAndRegisterAbility(g_sensorSer constexpr int32_t INVALID_PID = -1; constexpr int64_t MAX_EVENT_COUNT = 1000; std::atomic_bool g_isRegister = false; -} // namespace +} // namespace SensorService::SensorService() : SystemAbility(SENSOR_SERVICE_ABILITY_ID, true), state_(SensorServiceState::STATE_STOPPED) @@ -582,5 +582,5 @@ void SensorService::PermStateChangeCb::PermStateChangeCallback(Security::AccessT server_->clientInfo_.ChangeSensorPerm(result.tokenID, result.permissionName, (result.permStateChangeType != 0)); } -} // namespace Sensors -} // namespace OHOS +} // namespace Sensors +} // namespace OHOS diff --git a/services/src/sensor_service_stub.cpp b/services/src/sensor_service_stub.cpp index c082767383bc4b72ed173b1db605da2d7f1541d0..e23c5866e7d1119a662907b974cdb8c74f440d28 100755 --- a/services/src/sensor_service_stub.cpp +++ b/services/src/sensor_service_stub.cpp @@ -33,7 +33,7 @@ namespace Sensors { using namespace OHOS::HiviewDFX; namespace { constexpr HiLogLabel LABEL = { LOG_CORE, SENSOR_LOG_DOMAIN, "SensorServiceStub" }; -} // namespace +} // namespace SensorServiceStub::SensorServiceStub() { @@ -311,5 +311,5 @@ ErrCode SensorServiceStub::ResetSensorsInner(MessageParcel &data, MessageParcel } return ResetSensors(); } -} // namespace Sensors -} // namespace OHOS +} // namespace Sensors +} // namespace OHOS diff --git a/services/src/stream_server.cpp b/services/src/stream_server.cpp index 05f7c6dc470277ce9dba8280da87a2deb6766f10..5a55d8c59bd02325c2ba2b604c7553e56efe5844 100644 --- a/services/src/stream_server.cpp +++ b/services/src/stream_server.cpp @@ -27,7 +27,7 @@ namespace { constexpr OHOS::HiviewDFX::HiLogLabel LABEL = { LOG_CORE, SENSOR_LOG_DOMAIN, "StreamServer" }; constexpr int32_t INVALID_PID = -1; constexpr int32_t INVALID_FD = -1; -} // namespace +} // namespace StreamServer::~StreamServer() { @@ -169,5 +169,5 @@ void StreamServer::DelSession(int32_t pid) } } } -} // namespace Sensors -} // namespace OHOS \ No newline at end of file +} // namespace Sensors +} // namespace OHOS \ No newline at end of file