diff --git a/frameworks/js/napi/src/devicestatus_event.cpp b/frameworks/js/napi/src/devicestatus_event.cpp index cbf166ff3..33e854134 100644 --- a/frameworks/js/napi/src/devicestatus_event.cpp +++ b/frameworks/js/napi/src/devicestatus_event.cpp @@ -82,7 +82,7 @@ bool DeviceStatusEvent::SaveCallbackByEvent(int32_t eventType, napi_value handle } auto iter = events_.find(eventType); if (iter == events_.end()) { - FI_HILOGE("EventType:%{public}d not exists", eventType); + FI_HILOGE("eventType:%{public}d not exists", eventType); events_[eventType] = std::list>(); } if (events_[eventType].empty()) { diff --git a/frameworks/native/interaction/test/unittest/src/interaction_manager_test.cpp b/frameworks/native/interaction/test/unittest/src/interaction_manager_test.cpp index cc9fea152..6168146e3 100644 --- a/frameworks/native/interaction/test/unittest/src/interaction_manager_test.cpp +++ b/frameworks/native/interaction/test/unittest/src/interaction_manager_test.cpp @@ -121,6 +121,7 @@ public: static void SimulateDownKeyEvent(int32_t key); static void SimulateUpKeyEvent(int32_t key); static void PrintDragAction(DragAction dragAction); + static void AssignToAnimationIn(PreviewAnimation &animationIn); }; void InteractionManagerTest::SetPermission(const std::string &level, const char** perms, size_t permAmount) @@ -555,6 +556,13 @@ void InteractionManagerTest::PrintDragAction(DragAction dragAction) } } +void InteractionManagerTest::AssignToAnimationIn(PreviewAnimation &animationIn) +{ + animationIn.duration = 500; + animationIn.curveName = CURVE_NAME; + animationIn.curve = { 0.33, 0, 0.67, 1 }; +} + class InputEventCallbackTest : public MMI::IInputEventConsumer { public: InputEventCallbackTest() {} @@ -1911,9 +1919,7 @@ HWTEST_F(InteractionManagerTest, InteractionManagerTest_UpdatePreviewStyleWithAn previewStyleIn.foregroundColor = FOREGROUND_COLOR_IN; previewStyleIn.radius = RADIUS_IN; PreviewAnimation animationIn; - animationIn.duration = 500; - animationIn.curveName = CURVE_NAME; - animationIn.curve = { 0.33, 0, 0.67, 1 }; + AssignToAnimationIn(animationIn); ret = InteractionManager::GetInstance()->UpdatePreviewStyleWithAnimation(previewStyleIn, animationIn); EXPECT_EQ(ret, RET_OK); SimulateMovePointerEvent({ enterPos.first, enterPos.second }, { leavePos.first, leavePos.second }, @@ -1923,9 +1929,7 @@ HWTEST_F(InteractionManagerTest, InteractionManagerTest_UpdatePreviewStyleWithAn previewStyleOut.foregroundColor = FOREGROUND_COLOR_OUT; previewStyleOut.radius = RADIUS_OUT; PreviewAnimation animationOut; - animationOut.duration = 500; - animationOut.curveName = CURVE_NAME; - animationOut.curve = { 0.33, 0, 0.67, 1 }; + AssignToAnimationIn(animationIn); ret = InteractionManager::GetInstance()->UpdatePreviewStyleWithAnimation(previewStyleOut, animationOut); EXPECT_EQ(ret, RET_OK); SimulateMovePointerEvent({ leavePos.first, leavePos.second }, { DRAG_DST_X, DRAG_DST_Y }, diff --git a/intention/cooperate/server/src/cooperate_softbus_adapter.cpp b/intention/cooperate/server/src/cooperate_softbus_adapter.cpp index fc3c84232..0a5a63061 100644 --- a/intention/cooperate/server/src/cooperate_softbus_adapter.cpp +++ b/intention/cooperate/server/src/cooperate_softbus_adapter.cpp @@ -491,13 +491,13 @@ int32_t CooperateSoftbusAdapter::StartCooperateOtherResult(const std::string &or void CooperateSoftbusAdapter::HandleSessionData(int32_t sessionId, const std::string &message) { if (message.empty()) { - FI_HILOGE("Message is empty"); + FI_HILOGE("message is empty"); return; } JsonParser parser; parser.json = cJSON_Parse(message.c_str()); if (!cJSON_IsObject(parser.json)) { - FI_HILOGI("Parser json is not object"); + FI_HILOGI("parser json is not object"); if (message.size() < sizeof(DataPacket)) { FI_HILOGE("Data packet is incomplete"); return; @@ -508,10 +508,10 @@ void CooperateSoftbusAdapter::HandleSessionData(int32_t sessionId, const std::st return; } if (registerRecvs_.find(dataPacket->messageId) == registerRecvs_.end()) { - FI_HILOGW("Message:%{public}d does not register", dataPacket->messageId); + FI_HILOGW("message:%{public}d does not register", dataPacket->messageId); return; } - FI_HILOGI("Message:%{public}d", dataPacket->messageId); + FI_HILOGI("message:%{public}d", dataPacket->messageId); if ((dataPacket->messageId == DRAGGING_DATA) || (dataPacket->messageId == STOPDRAG_DATA) || (dataPacket->messageId == IS_PULL_UP) || diff --git a/intention/cooperate/server/src/cooperate_state_free.cpp b/intention/cooperate/server/src/cooperate_state_free.cpp index 08c0f9b76..5334910fc 100644 --- a/intention/cooperate/server/src/cooperate_state_free.cpp +++ b/intention/cooperate/server/src/cooperate_state_free.cpp @@ -31,7 +31,7 @@ int32_t CooperateStateFree::ActivateCooperate( { CALL_INFO_TRACE; if (remoteNetworkId.empty()) { - FI_HILOGE("RemoteNetworkId is empty"); + FI_HILOGE("remoteNetworkId is empty"); return static_cast(CoordinationMessage::PARAMETER_ERROR); } std::string localNetworkId = COOPERATE::GetLocalNetworkId(); diff --git a/intention/cooperate/server/src/cooperate_state_in.cpp b/intention/cooperate/server/src/cooperate_state_in.cpp index 393fa3288..2a843536a 100644 --- a/intention/cooperate/server/src/cooperate_state_in.cpp +++ b/intention/cooperate/server/src/cooperate_state_in.cpp @@ -36,7 +36,7 @@ int32_t CooperateStateIn::ActivateCooperate(const std::string &remoteNetworkId, { CALL_INFO_TRACE; if (remoteNetworkId.empty()) { - FI_HILOGE("RemoteNetworkId is empty"); + FI_HILOGE("remoteNetworkId is empty"); return static_cast(CoordinationMessage::PARAMETER_ERROR); } std::string localNetworkId = COOPERATE::GetLocalNetworkId(); diff --git a/intention/cooperate/server/src/device_profile_adapter.cpp b/intention/cooperate/server/src/device_profile_adapter.cpp index bcafc71ad..81b8c11df 100644 --- a/intention/cooperate/server/src/device_profile_adapter.cpp +++ b/intention/cooperate/server/src/device_profile_adapter.cpp @@ -104,12 +104,12 @@ bool DeviceProfileAdapter::GetCrossingSwitchState(const std::string &networkId) JsonParser parser; parser.json = cJSON_Parse(jsonData.c_str()); if (!cJSON_IsObject(parser.json)) { - FI_HILOGE("Parser json is not object"); + FI_HILOGE("parser json is not object"); return false; } cJSON* state = cJSON_GetObjectItemCaseSensitive(parser.json, characteristicsName_.c_str()); if (!cJSON_IsNumber(state)) { - FI_HILOGE("State is not number type"); + FI_HILOGE("state is not number type"); return false; } return (static_cast(state->valueint)); diff --git a/intention/cooperate/state_machine/src/cooperate_out.cpp b/intention/cooperate/state_machine/src/cooperate_out.cpp index 870144038..a0726231c 100644 --- a/intention/cooperate/state_machine/src/cooperate_out.cpp +++ b/intention/cooperate/state_machine/src/cooperate_out.cpp @@ -34,7 +34,7 @@ void CooperateOut::OnEvent(Context &context, CooperateEvent &event) if (current_ != nullptr) { current_->OnEvent(context, event); } else { - FI_HILOGE("Current step is null"); + FI_HILOGE("current_ step is null"); } } diff --git a/intention/services/device_manager/src/monitor.cpp b/intention/services/device_manager/src/monitor.cpp index 8ba4bf37d..7e79a9c57 100644 --- a/intention/services/device_manager/src/monitor.cpp +++ b/intention/services/device_manager/src/monitor.cpp @@ -80,7 +80,7 @@ void Monitor::Disable() } if (inotifyFd_ >= 0) { if (close(inotifyFd_) < 0) { - FI_HILOGE("Close inotify fd failed, error:%{public}s, inotifyFd_:%{public}d", strerror(errno), inotifyFd_); + FI_HILOGE("close inotify fd failed, error:%{public}s, inotifyFd_:%{public}d", strerror(errno), inotifyFd_); } inotifyFd_ = -1; } diff --git a/libs/src/devicestatus_data_parse.cpp b/libs/src/devicestatus_data_parse.cpp index 5c4e4a869..e736b026c 100644 --- a/libs/src/devicestatus_data_parse.cpp +++ b/libs/src/devicestatus_data_parse.cpp @@ -44,20 +44,20 @@ int32_t DeviceStatusDataParse::CreateJsonFile() { int32_t fd = open(MSDP_DATA_PATH.c_str(), O_RDWR | O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP); if (fd < 0) { - FI_HILOGE("Open failed"); + FI_HILOGE("open failed"); return DEVICESTATUS_FAILED; } if (close(fd) < 0) { - FI_HILOGE("Close fd failed, error:%{public}s, fd:%{public}d", strerror(errno), fd); + FI_HILOGE("close fd failed, error:%{public}s, fd:%{public}d", strerror(errno), fd); } struct stat buf; if (stat(MSDP_DATA_DIR.c_str(), &buf) != 0) { - FI_HILOGE("Start folder path is invalid %{public}d", errno); + FI_HILOGE("start folder path is invalid %{public}d", errno); return DEVICESTATUS_FAILED; } if (chown(MSDP_DATA_PATH.c_str(), buf.st_uid, buf.st_gid) != 0) { - FI_HILOGE("Chown failed, errno:%{public}d", errno); + FI_HILOGE("chown failed, errno:%{public}d", errno); return DEVICESTATUS_FAILED; } diff --git a/rust/subsystem/device_profile/binding/src/fusion_device_profile_adapter.cpp b/rust/subsystem/device_profile/binding/src/fusion_device_profile_adapter.cpp index c60858e83..1acb9f300 100644 --- a/rust/subsystem/device_profile/binding/src/fusion_device_profile_adapter.cpp +++ b/rust/subsystem/device_profile/binding/src/fusion_device_profile_adapter.cpp @@ -196,7 +196,7 @@ bool FusionDeviceProfileAdapter::GetCrossSwitchState(const std::string &deviceId JsonParser parser; parser.json = cJSON_Parse(jsonData.c_str()); if (!cJSON_IsObject(parser.json)) { - FI_HILOGE("Parser json is not object"); + FI_HILOGE("parser json is not object"); return false; } cJSON* state = cJSON_GetObjectItemCaseSensitive(parser.json, characteristicsName_.c_str()); diff --git a/services/interaction/coordination/src/coordination_softbus_adapter.cpp b/services/interaction/coordination/src/coordination_softbus_adapter.cpp index 98b4c9ff5..de072a432 100644 --- a/services/interaction/coordination/src/coordination_softbus_adapter.cpp +++ b/services/interaction/coordination/src/coordination_softbus_adapter.cpp @@ -186,9 +186,9 @@ int32_t CoordinationSoftbusAdapter::Init() }; int32_t ret = InitSocket(info, SOCKET_SERVER, socketFd_); if (ret == RET_OK && socketFd_ != -1) { - FI_HILOGI("server set ok"); + FI_HILOGI("Server set ok"); } else { - FI_HILOGE("server set failed, ret:%{public}d", ret); + FI_HILOGE("Server set failed, ret:%{public}d", ret); } return ret; } @@ -271,7 +271,7 @@ int32_t CoordinationSoftbusAdapter::OpenInputSoftbus(const std::string &remoteNe sessionDevs_[remoteNetworkId] = socket; ConfigTcpAlive(socket); } else { - FI_HILOGE("bind failed, ret:%{public}d", ret); + FI_HILOGE("Bind failed, ret:%{public}d", ret); } return ret; } diff --git a/services/interaction/coordination/src/coordination_state_in.cpp b/services/interaction/coordination/src/coordination_state_in.cpp index 0a4c995e4..5120e6b4e 100644 --- a/services/interaction/coordination/src/coordination_state_in.cpp +++ b/services/interaction/coordination/src/coordination_state_in.cpp @@ -37,7 +37,7 @@ int32_t CoordinationStateIn::ActivateCoordination(const std::string &remoteNetwo { CALL_INFO_TRACE; if (remoteNetworkId.empty()) { - FI_HILOGE("RemoteNetworkId is empty"); + FI_HILOGE("remoteNetworkId is empty"); return static_cast(CoordinationMessage::PARAMETER_ERROR); } std::string localNetworkId = COORDINATION::GetLocalNetworkId(); diff --git a/services/interaction/drag/src/drag_manager.cpp b/services/interaction/drag/src/drag_manager.cpp index 6f9231864..72b9f43de 100644 --- a/services/interaction/drag/src/drag_manager.cpp +++ b/services/interaction/drag/src/drag_manager.cpp @@ -393,7 +393,7 @@ void DragManager::OnDragUp(std::shared_ptr pointerEvent) MMI::InputManager::GetInstance()->SetPointerVisible(true); } int32_t targetTid = DRAG_DATA_MGR.GetTargetTid(); - FI_HILOGD("SourceType:%{public}d, pointerId:%{public}d,Target window drag tid:%{public}d", + FI_HILOGD("sourceType:%{public}d, pointerId:%{public}d,Target window drag tid:%{public}d", targetTid, pointerEvent->GetSourceType(), pointerEvent->GetPointerId()); SendDragData(targetTid, dragData.udKey); CHKPV(context_); diff --git a/services/native/src/devicestatus_manager.cpp b/services/native/src/devicestatus_manager.cpp index 90ba94d58..b83df8542 100644 --- a/services/native/src/devicestatus_manager.cpp +++ b/services/native/src/devicestatus_manager.cpp @@ -141,7 +141,7 @@ int32_t DeviceStatusManager::NotifyDeviceStatusChange(const Data &devicestatusDa listeners = (std::set, classcomp>)(iter->second); for (const auto &listener : listeners) { if (listener == nullptr) { - FI_HILOGE("Listener is nullptr"); + FI_HILOGE("listener is nullptr"); return false; } FI_HILOGI("type:%{public}d, arrs_:%{public}d", devicestatusData.type, arrs_[devicestatusData.type]); diff --git a/services/native/test/unittest/src/drag_data_manager_test.cpp b/services/native/test/unittest/src/drag_data_manager_test.cpp index a8a2d8d82..78c5f2766 100644 --- a/services/native/test/unittest/src/drag_data_manager_test.cpp +++ b/services/native/test/unittest/src/drag_data_manager_test.cpp @@ -73,7 +73,7 @@ std::shared_ptr DragDataManagerTest::CreatePixelMap(int32_t wid int32_t colorLen = width * height; uint32_t *colorPixels = new (std::nothrow) uint32_t[colorLen]; if (colorPixels == nullptr) { - FI_HILOGE("ColorPixels is nullptr"); + FI_HILOGE("colorPixels is nullptr"); return nullptr; } int32_t colorByteCount = colorLen * INT32_BYTE; diff --git a/test/fuzztest/startdrag_fuzzer/startdrag_fuzzer.cpp b/test/fuzztest/startdrag_fuzzer/startdrag_fuzzer.cpp index 57c6cd75a..e4f9103d4 100644 --- a/test/fuzztest/startdrag_fuzzer/startdrag_fuzzer.cpp +++ b/test/fuzztest/startdrag_fuzzer/startdrag_fuzzer.cpp @@ -50,14 +50,14 @@ std::shared_ptr CreatePixelMap(int32_t width, int32_t height) int32_t colorLen = width * height; uint32_t* colorPixels = new (std::nothrow) uint32_t[colorLen]; if (colorPixels == nullptr) { - FI_HILOGE("ColorPixels is nullptr"); + FI_HILOGE("colorPixels is nullptr"); return nullptr; } int32_t colorByteCount = colorLen * INT32_BYTE; auto ret = memset_s(colorPixels, colorByteCount, DEFAULT_ICON_COLOR, colorByteCount); if (ret != EOK) { delete[] colorPixels; - FI_HILOGE("Memset_s failed"); + FI_HILOGE("memset_s failed"); return nullptr; } std::shared_ptr pixelMap = Media::PixelMap::Create(colorPixels, colorLen, opts); diff --git a/test/fuzztest/updateshadowpic_fuzzer/updateshadowpic_fuzzer.cpp b/test/fuzztest/updateshadowpic_fuzzer/updateshadowpic_fuzzer.cpp index 588ca8cee..794a7391e 100644 --- a/test/fuzztest/updateshadowpic_fuzzer/updateshadowpic_fuzzer.cpp +++ b/test/fuzztest/updateshadowpic_fuzzer/updateshadowpic_fuzzer.cpp @@ -50,13 +50,13 @@ std::shared_ptr CreatePixelMap(int32_t width, int32_t height) int32_t colorLen = width * height; uint32_t* colors = new (std::nothrow) uint32_t[colorLen]; if (colors == nullptr) { - FI_HILOGE("ColorPixels is nullptr"); + FI_HILOGE("colorPixels is nullptr"); return nullptr; } int32_t colorByteCount = colorLen * INT32_BYTE; auto ret = memset_s(colors, colorByteCount, DEFAULT_ICON_COLOR, colorByteCount); if (ret != EOK) { - FI_HILOGE("Memset_s failed"); + FI_HILOGE("memset_s failed"); delete[] colors; return nullptr; }