From 0091235f79334ba70f44390091474c89b1753c83 Mon Sep 17 00:00:00 2001 From: cff-gite Date: Mon, 29 May 2023 07:38:44 +0000 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=A7=84=E8=8C=83?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: cff-gite Change-Id: I706e3f7c14ee95fd0684a73cc08374611506b228 --- services/sensor/src/sensor_manager.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) mode change 100644 => 100755 services/sensor/src/sensor_manager.cpp diff --git a/services/sensor/src/sensor_manager.cpp b/services/sensor/src/sensor_manager.cpp old mode 100644 new mode 100755 index 014ddf7a..329b156a --- a/services/sensor/src/sensor_manager.cpp +++ b/services/sensor/src/sensor_manager.cpp @@ -39,7 +39,7 @@ void SensorManager::InitSensorMap(std::unordered_map &sensorMap sensorMap_.insert(sensorMap.begin(), sensorMap.end()); sensorDataProcesser_ = dataProcesser; reportDataCallback_ = dataCallback; - SEN_HILOGD("begin sensorMap_.size:%{public}d", int32_t { sensorMap_.size() }); + SEN_HILOGD("Begin sensorMap_.size:%{public}d", int32_t { sensorMap_.size() }); return; } @@ -64,7 +64,7 @@ bool SensorManager::SetBestSensorParams(int32_t sensorId, int64_t samplingPeriod int64_t bestSamplingPeriodNs = sensorInfo.GetSamplingPeriodNs(); int64_t bestReportDelayNs = sensorInfo.GetMaxReportDelayNs(); if ((samplingPeriodNs > bestSamplingPeriodNs) && (maxReportDelayNs > bestReportDelayNs)) { - SEN_HILOGD("no need to reset sensor params"); + SEN_HILOGD("No need to reset sensor params"); return true; } bestSamplingPeriodNs = (samplingPeriodNs < bestSamplingPeriodNs) ? samplingPeriodNs : bestSamplingPeriodNs; @@ -116,7 +116,7 @@ SensorBasicInfo SensorManager::GetSensorInfo(int32_t sensorId, int64_t samplingP } int32_t maxEventCount = it->second.GetFifoMaxEventCount(); if ((samplingPeriodNs == 0) || (maxEventCount > (INT64_MAX / samplingPeriodNs))) { - SEN_HILOGE("failed, samplingPeriodNs overflow"); + SEN_HILOGE("Failed, samplingPeriodNs overflow"); return sensorInfo; } int64_t supportDelay = samplingPeriodNs * maxEventCount; @@ -160,7 +160,7 @@ bool SensorManager::IsOtherClientUsingSensor(int32_t sensorId, int32_t clientPid if (!ResetBestSensorParams(sensorId)) { SEN_HILOGW("ResetBestSensorParams is failed"); } - SEN_HILOGD("other client is using this sensor"); + SEN_HILOGD("Other client is using this sensor"); return true; } @@ -172,7 +172,7 @@ ErrCode SensorManager::AfterDisableSensor(int32_t sensorId) SensorData sensorData; auto ret = clientInfo_.GetStoreEvent(sensorId, sensorData); if (ret == ERR_OK) { - SEN_HILOGD("change the default state is far"); + SEN_HILOGD("Change the default state is far"); sensorData.data[0] = PROXIMITY_FAR; clientInfo_.StoreEvent(sensorData); } @@ -188,7 +188,7 @@ void SensorManager::GetPackageName(AccessTokenID tokenId, std::string &packageNa case ATokenTypeEnum::TOKEN_HAP: { HapTokenInfo hapInfo; if (AccessTokenKit::GetHapTokenInfo(tokenId, hapInfo) != 0) { - SEN_HILOGE("get hap token info fail"); + SEN_HILOGE("Get hap token info fail"); return; } packageName = hapInfo.bundleName; @@ -198,14 +198,14 @@ void SensorManager::GetPackageName(AccessTokenID tokenId, std::string &packageNa case ATokenTypeEnum::TOKEN_SHELL: { NativeTokenInfo tokenInfo; if (AccessTokenKit::GetNativeTokenInfo(tokenId, tokenInfo) != 0) { - SEN_HILOGE("get native token info fail"); + SEN_HILOGE("Get native token info fail"); return; } packageName = tokenInfo.processName; break; } default: { - SEN_HILOGW("token type not match"); + SEN_HILOGW("Token type not match"); break; } } -- Gitee From e07930c9b0f65c14537a0b2679d9e9efdf884e5e Mon Sep 17 00:00:00 2001 From: cff-gite Date: Mon, 29 May 2023 07:43:09 +0000 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=A7=84=E8=8C=83?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: cff-gite Change-Id: Id923c0fe0712485b4ecb9f69324aec774e685d23 --- services/sensor/src/sensor_service_stub.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/sensor/src/sensor_service_stub.cpp b/services/sensor/src/sensor_service_stub.cpp index b5fec2ab..7a6a88d8 100755 --- a/services/sensor/src/sensor_service_stub.cpp +++ b/services/sensor/src/sensor_service_stub.cpp @@ -62,11 +62,11 @@ SensorServiceStub::~SensorServiceStub() int32_t SensorServiceStub::OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) { - SEN_HILOGD("begin, cmd : %{public}u", code); + SEN_HILOGD("Begin, cmd : %{public}u", code); std::u16string descriptor = SensorServiceStub::GetDescriptor(); std::u16string remoteDescriptor = data.ReadInterfaceToken(); if (descriptor != remoteDescriptor) { - SEN_HILOGE("client and service descriptors are inconsistent"); + SEN_HILOGE("Client and service descriptors are inconsistent"); return OBJECT_NULL; } auto itFunc = baseFuncs_.find(code); @@ -76,7 +76,7 @@ int32_t SensorServiceStub::OnRemoteRequest(uint32_t code, MessageParcel &data, M return (this->*memberFunc)(data, reply); } } - SEN_HILOGD("no member func supporting, applying default process"); + SEN_HILOGD("No member func supporting, applying default process"); return IPCObjectStub::OnRemoteRequest(code, data, reply, option); } -- Gitee From 1880681d414e26715f27116ba530ee9302ff3a25 Mon Sep 17 00:00:00 2001 From: cff-gite Date: Mon, 29 May 2023 08:00:37 +0000 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=A7=84=E8=8C=83?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: cff-gite Change-Id: I3d4ad8456637ed81fa960cf9d30f11945df3190d --- services/sensor/src/sensor_manager.cpp | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 services/sensor/src/sensor_manager.cpp diff --git a/services/sensor/src/sensor_manager.cpp b/services/sensor/src/sensor_manager.cpp old mode 100755 new mode 100644 -- Gitee