已合并
【日志整改】input模块日志级别规范化与维测信息补全 #9957
【日志整改】input模块日志级别规范化与维测信息补全 #9957
已合并
shangguodong创建于 8月29日
共 62 个文件变更+1205-1079
@@ -69,6 +69,7 @@ ErrCode AncoChannel::UpdateExcludedKeyEventWindow(
69 const AncoExcludedKeyEventWindow &excludedKeyEventWindow)69 const AncoExcludedKeyEventWindow &excludedKeyEventWindow)
70{70{
71 if (consumer_ == nullptr) {71 if (consumer_ == nullptr) {
72+ MMI_HILOGE("Consumer is nullptr");
72 return RET_ERR;73 return RET_ERR;
73 }74 }
74 return consumer_->UpdateExcludedKeyEventWindow(excludedKeyEventWindow);75 return consumer_->UpdateExcludedKeyEventWindow(excludedKeyEventWindow);
@@ -78,6 +79,7 @@ ErrCode AncoChannel::UpdateTripleFingerSnapshotState(
78 const AncoTripleFingerSnapshotState &snapshotState)79 const AncoTripleFingerSnapshotState &snapshotState)
79{80{
80 if (consumer_ == nullptr) {81 if (consumer_ == nullptr) {
82+ MMI_HILOGE("Consumer is nullptr");
81 return RET_ERR;83 return RET_ERR;
82 }84 }
83 return consumer_->UpdateTripleFingerSnapshotState(snapshotState);85 return consumer_->UpdateTripleFingerSnapshotState(snapshotState);
@@ -999,7 +999,7 @@ void AniInputMonitorConsumer::OnPerPointerEvent(std::shared_ptr<PointerEvent> po
999 bool retValue = false;999 bool retValue = false;
1000 auto itFind = funcTypeInfo_.find(funType_);1000 auto itFind = funcTypeInfo_.find(funType_);
1001 if (itFind == funcTypeInfo_.end()) {1001 if (itFind == funcTypeInfo_.end()) {
1002- MMI_HILOGI("This event is invalid");1002+ MMI_HILOGW("This event is invalid");
1003 pointerEvent->MarkProcessed();1003 pointerEvent->MarkProcessed();
1004 return;1004 return;
1005 }1005 }
@@ -967,7 +967,7 @@ napi_value SubscribeKeyCommand(napi_env env, napi_callback_info info, sptr<KeyEv
967 MMI_HILOGE("AddEventCallback failed");967 MMI_HILOGE("AddEventCallback failed");
968 if (event->subscribeId >= 0) {968 if (event->subscribeId >= 0) {
969 InputManager::GetInstance()->UnsubscribeKeyEvent(event->subscribeId);969 InputManager::GetInstance()->UnsubscribeKeyEvent(event->subscribeId);
970- MMI_HILOGI("UnsubscribeKeyEvent due to failure of AddEventCallback");970+ MMI_HILOGW("UnsubscribeKeyEvent due to failure of AddEventCallback");
971 }971 }
972 return nullptr;972 return nullptr;
973 }973 }
@@ -54,7 +54,7 @@ int32_t InputEventHookHandler::AddInputEventHookLocal(std::shared_ptr<IInputEven
54 consumer->OnInputEvent(event);54 consumer->OnInputEvent(event);
55 });55 });
56 }56 }
57- MMI_HILOGI("AddInputEventHookLocal success hookEventType:%{public}u", hookEventType);57+ MMI_HILOGI("AddInputEventHookLocal success hookEventType:%{public}u", hookEventType);
58 return RET_OK;58 return RET_OK;
59}59}
60 60 
@@ -64,24 +64,24 @@ int32_t InputEventHookHandler::AddInputEventHook(std::shared_ptr<IInputEventCons
64 CALL_DEBUG_ENTER;64 CALL_DEBUG_ENTER;
65 CHKPR(consumer, RET_ERR);65 CHKPR(consumer, RET_ERR);
66 if (!MMIEventHdl.InitClient()) {66 if (!MMIEventHdl.InitClient()) {
67- MMI_HILOGE("Client init failed");67+ MMI_HILOGE("Client init failed");
68 return RET_ERR;68 return RET_ERR;
69 }69 }
70 if (IsHookExisted(hookEventType)) {70 if (IsHookExisted(hookEventType)) {
71- MMI_HILOGE("Hook:%{public}u existed already hookEventType:%{public}u",71+ MMI_HILOGE("Hook:%{public}u existed already hookEventType:%{public}u",
72 currentHookStats_.load(std::memory_order_relaxed), hookEventType);72 currentHookStats_.load(std::memory_order_relaxed), hookEventType);
73 return ERROR_REPEAT_INTERCEPTOR;73 return ERROR_REPEAT_INTERCEPTOR;
74 }74 }
75 if (int32_t ret = AddInputEventHookToServer(hookEventType); ret != RET_OK) {75 if (int32_t ret = AddInputEventHookToServer(hookEventType); ret != RET_OK) {
76- MMI_HILOGE("AddInputEventHook failed hookEventType:%{public}u", hookEventType);76+ MMI_HILOGE("AddInputEventHook failed hookEventType:%{public}u", hookEventType);
77 RemoveInputEventHookLocal(hookEventType);77 RemoveInputEventHookLocal(hookEventType);
78 return ret;78 return ret;
79 }79 }
80 if (int32_t ret = AddInputEventHookLocal(consumer, hookEventType); ret != RET_OK) {80 if (int32_t ret = AddInputEventHookLocal(consumer, hookEventType); ret != RET_OK) {
81- MMI_HILOGE("AddInputEventHook failed hookEventType:%{public}u", hookEventType);81+ MMI_HILOGE("AddInputEventHook failed hookEventType:%{public}u", hookEventType);
82 return ret;82 return ret;
83 }83 }
84- MMI_HILOGI("AddInputEventHook success hookEventType:%{public}u", hookEventType);84+ MMI_HILOGI("AddInputEventHook success hookEventType:%{public}u", hookEventType);
85 return RET_OK;85 return RET_OK;
86}86}
87 87 
@@ -107,15 +107,15 @@ int32_t InputEventHookHandler::RemoveInputEventHookLocal(HookEventType hookEvent
107int32_t InputEventHookHandler::RemoveInputEventHook(HookEventType hookEventType)107int32_t InputEventHookHandler::RemoveInputEventHook(HookEventType hookEventType)
108{108{
109 if (int32_t ret = RemoveInputEventHookLocal(hookEventType); ret != RET_OK) {109 if (int32_t ret = RemoveInputEventHookLocal(hookEventType); ret != RET_OK) {
110- MMI_HILOGE("RemoveInputEventHookLocal failed ret:%{public}d, hookEventType:%{public}u", ret, hookEventType);110+ MMI_HILOGE("RemoveInputEventHookLocal failed ret:%{public}d, hookEventType:%{public}u", ret, hookEventType);
111 return ret;111 return ret;
112 }112 }
113 if (int32_t ret = RemoveInputEventHookOfServer(hookEventType); ret != RET_OK) {113 if (int32_t ret = RemoveInputEventHookOfServer(hookEventType); ret != RET_OK) {
114- MMI_HILOGE("Remove hook failed ret:%{public}d, hookEventType:%{public}u", ret, hookEventType);114+ MMI_HILOGE("Remove hook failed ret:%{public}d, hookEventType:%{public}u", ret, hookEventType);
115 return ret;115 return ret;
116 }116 }
117 INPUT_EVENT_STAGER.ClearStashEvents(hookEventType);117 INPUT_EVENT_STAGER.ClearStashEvents(hookEventType);
118- MMI_HILOGI("Remove hook success hookEventType:%{public}u", hookEventType);118+ MMI_HILOGI("Remove hook success hookEventType:%{public}u", hookEventType);
119 return RET_OK;119 return RET_OK;
120}120}
121 121 
@@ -134,6 +134,7 @@ int32_t InputEventHookHandler::DispatchToNextHandler(int32_t eventId, HookEventT
134 CHKPR(event, ERROR_INVALID_PARAMETER);134 CHKPR(event, ERROR_INVALID_PARAMETER);
135 return DispatchToNextHandler(event);135 return DispatchToNextHandler(event);
136 } else {136 } else {
137+ MMI_HILOGE("Invalid hook event state, hookEventType:%{public}d", hookEventType);
137 return RET_ERR;138 return RET_ERR;
138 }139 }
139}140}
@@ -161,7 +162,7 @@ void InputEventHookHandler::OnPointerEvent(std::shared_ptr<PointerEvent> pointer
161 CHKPV(hookConsumer_.mouseHookCallback_);162 CHKPV(hookConsumer_.mouseHookCallback_);
162 hookConsumer_.mouseHookCallback_(pointerEvent);163 hookConsumer_.mouseHookCallback_(pointerEvent);
163 } else {164 } else {
164- MMI_HILOGD("Unsupported sourceType:%{public}d", sourceType);165+ MMI_HILOGD("Unsupported sourceType:%{public}d", sourceType);
165 }166 }
166}167}
167 168 
@@ -169,11 +170,11 @@ void InputEventHookHandler::OnConnected()
169{170{
170 CALL_DEBUG_ENTER;171 CALL_DEBUG_ENTER;
171 if (currentHookStats_.load() == 0) {172 if (currentHookStats_.load() == 0) {
172- MMI_HILOGI("No hook existed");173+ MMI_HILOGI("No hook existed");
173 return;174 return;
174 }175 }
175 if (!MMIEventHdl.InitClient()) {176 if (!MMIEventHdl.InitClient()) {
176- MMI_HILOGE("Client init failed");177+ MMI_HILOGE("Client init failed");
177 return;178 return;
178 }179 }
179 uint32_t hookEventType { 0 };180 uint32_t hookEventType { 0 };
@@ -220,7 +221,7 @@ int32_t InputEventHookHandler::AddInputEventHookToServer(HookEventType hookEvent
220{221{
221 CALL_DEBUG_ENTER;222 CALL_DEBUG_ENTER;
222 if (int32_t ret = MULTIMODAL_INPUT_CONNECT_MGR->AddInputEventHook(hookEventType); ret != RET_OK) {223 if (int32_t ret = MULTIMODAL_INPUT_CONNECT_MGR->AddInputEventHook(hookEventType); ret != RET_OK) {
223- MMI_HILOGE("AddInputEventHook to server, ret:%{public}d", ret);224+ MMI_HILOGE("AddInputEventHook to server, ret:%{public}d", ret);
224 return ret;225 return ret;
225 }226 }
226 return RET_OK;227 return RET_OK;
@@ -230,7 +231,7 @@ int32_t InputEventHookHandler::RemoveInputEventHookOfServer(HookEventType hookEv
230{231{
231 CALL_DEBUG_ENTER;232 CALL_DEBUG_ENTER;
232 if (int32_t ret = MULTIMODAL_INPUT_CONNECT_MGR->RemoveInputEventHook(hookEventType); ret != RET_OK) {233 if (int32_t ret = MULTIMODAL_INPUT_CONNECT_MGR->RemoveInputEventHook(hookEventType); ret != RET_OK) {
233- MMI_HILOGE("RemoveInputEventHook of server, ret:%{public}d", ret);234+ MMI_HILOGE("RemoveInputEventHook of server, ret:%{public}d", ret);
234 return ret;235 return ret;
235 }236 }
236 return RET_OK;237 return RET_OK;
@@ -273,7 +274,7 @@ int32_t InputEventHookHandler::DispatchToNextHandler(std::shared_ptr<KeyEvent> k
273{274{
274 CALL_DEBUG_ENTER;275 CALL_DEBUG_ENTER;
275 if (int32_t ret = MULTIMODAL_INPUT_CONNECT_MGR->DispatchToNextHandler(keyEvent); ret != RET_OK) {276 if (int32_t ret = MULTIMODAL_INPUT_CONNECT_MGR->DispatchToNextHandler(keyEvent); ret != RET_OK) {
276- MMI_HILOGE("DispatchToNextHandler keyEvent of server, ret:%{public}d", ret);277+ MMI_HILOGE("DispatchToNextHandler keyEvent of server, ret:%{public}d", ret);
277 return ret;278 return ret;
278 }279 }
279 return RET_OK;280 return RET_OK;
@@ -283,7 +284,7 @@ int32_t InputEventHookHandler::DispatchToNextHandler(std::shared_ptr<PointerEven
283{284{
284 CALL_DEBUG_ENTER;285 CALL_DEBUG_ENTER;
285 if (int32_t ret = MULTIMODAL_INPUT_CONNECT_MGR->DispatchToNextHandler(pointerEvent); ret != RET_OK) {286 if (int32_t ret = MULTIMODAL_INPUT_CONNECT_MGR->DispatchToNextHandler(pointerEvent); ret != RET_OK) {
286- MMI_HILOGE("DispatchToNextHandler pointerEvent of server, ret:%{public}d", ret);287+ MMI_HILOGE("DispatchToNextHandler pointerEvent of server, ret:%{public}d", ret);
287 return ret;288 return ret;
288 }289 }
289 return RET_OK;290 return RET_OK;
@@ -254,6 +254,7 @@ int32_t InputHandlerManager::RemoveHandler(int32_t handlerId, InputHandlerType h
254 }254 }
255 return ret;255 return ret;
256 }256 }
257+ MMI_HILOGD("Handler not found, handlerId:%{public}d, handlerType:%{public}d", handlerId, handlerType);
257 return RET_ERR;258 return RET_ERR;
258}259}
259 260 
@@ -275,7 +276,7 @@ int32_t InputHandlerManager::AddGestureToLocal(int32_t handlerId, HandleEventTyp
275 ((handler.gestureHandler_.gestureType & gestureType) == gestureType) &&276 ((handler.gestureHandler_.gestureType & gestureType) == gestureType) &&
276 ((handler.gestureHandler_.fingers == ALL_FINGER_COUNT) || (handler.gestureHandler_.fingers == fingers)) &&277 ((handler.gestureHandler_.fingers == ALL_FINGER_COUNT) || (handler.gestureHandler_.fingers == fingers)) &&
277 (handler.consumer_ == consumer)) {278 (handler.consumer_ == consumer)) {
278- MMI_HILOGW("Duplicate monitor of TouchGesture(%{public}u, %{puglic}d)", gestureType, fingers);279+ MMI_HILOGW("Duplicate monitor of TouchGesture(%{public}u, %{public}d)", gestureType, fingers);
279 return RET_ERR;280 return RET_ERR;
280 }281 }
281 }282 }
@@ -566,7 +567,7 @@ void InputHandlerManager::GetConsumerInfos(std::shared_ptr<PointerEvent> pointer
566 CHKPV(consumer);567 CHKPV(consumer);
567 auto ret = consumerInfos.emplace(handlerId, consumer);568 auto ret = consumerInfos.emplace(handlerId, consumer);
568 if (!ret.second) {569 if (!ret.second) {
569- MMI_HILOGI("Duplicate handler:%{public}d", handlerId);570+ MMI_HILOGW("Duplicate handler:%{public}d", handlerId);
570 continue;571 continue;
571 }572 }
572 consumerCount++;573 consumerCount++;
@@ -733,7 +734,7 @@ int32_t InputHandlerManager::GetMonitorConsumerInfos(std::shared_ptr<PointerEven
733 CHKPR(consumer, INVALID_HANDLER_ID);734 CHKPR(consumer, INVALID_HANDLER_ID);
734 auto ret = consumerInfos.emplace(handlerId, consumer);735 auto ret = consumerInfos.emplace(handlerId, consumer);
735 if (!ret.second) {736 if (!ret.second) {
736- MMI_HILOGI("Duplicate handler:%{public}d", handlerId);737+ MMI_HILOGW("Duplicate handler:%{public}d", handlerId);
737 continue;738 continue;
738 }739 }
739 consumerCount++;740 consumerCount++;
@@ -748,7 +749,7 @@ int32_t InputHandlerManager::GetMonitorConsumerInfos(std::shared_ptr<PointerEven
748 CHKPR(consumer, INVALID_HANDLER_ID);749 CHKPR(consumer, INVALID_HANDLER_ID);
749 auto ret = consumerInfos.emplace(handlerId, consumer);750 auto ret = consumerInfos.emplace(handlerId, consumer);
750 if (!ret.second) {751 if (!ret.second) {
751- MMI_HILOGI("Duplicate handler:%{public}d", handlerId);752+ MMI_HILOGW("Duplicate handler:%{public}d", handlerId);
752 continue;753 continue;
753 }754 }
754 consumerCount++;755 consumerCount++;
@@ -225,6 +225,7 @@ int32_t KeyEventInputSubscribeManager::UnsubscribeKeyEvent(int32_t subscribeId)
225 return RET_OK;225 return RET_OK;
226 }226 }
227 }227 }
228+ MMI_HILOGD("SubscribeId not found, subscribeId:%{public}d", subscribeId);
228 return RET_ERR;229 return RET_ERR;
229}230}
230 231 
@@ -297,6 +298,7 @@ int32_t KeyEventInputSubscribeManager::UnsubscribeHotkey(int32_t subscribeId)
297 return RET_OK;298 return RET_OK;
298 }299 }
299 }300 }
301+ MMI_HILOGD("SubscribeId not found, subscribeId:%{public}d", subscribeId);
300 return RET_ERR;302 return RET_ERR;
301}303}
302 304 
@@ -49,16 +49,16 @@ int32_t LongPressEventSubscribeManager::SubscribeLongPressEvent(
49 CHKPR(callback, ERROR_NULL_POINTER);49 CHKPR(callback, ERROR_NULL_POINTER);
50 if (longPressRequest.fingerCount <= 0 || longPressRequest.fingerCount > MAX_FINGER_COUNT ||50 if (longPressRequest.fingerCount <= 0 || longPressRequest.fingerCount > MAX_FINGER_COUNT ||
51 longPressRequest.duration <= 0 || longPressRequest.duration > MAX_DURATION) {51 longPressRequest.duration <= 0 || longPressRequest.duration > MAX_DURATION) {
52- MMI_HILOGE("FingerCount or duration is invalid");52+ MMI_HILOGE("FingerCount or duration is invalid");
53 return RET_ERR;53 return RET_ERR;
54 }54 }
55 if (!MMIEventHdl.InitClient()) {55 if (!MMIEventHdl.InitClient()) {
56- MMI_HILOGE("Client init failed");56+ MMI_HILOGE("Client init failed");
57 return EVENT_REG_FAIL;57 return EVENT_REG_FAIL;
58 }58 }
59 std::lock_guard<std::mutex> guard(mtx_);59 std::lock_guard<std::mutex> guard(mtx_);
60 if (LongPressEventSubscribeManager::subscribeManagerId_ >= INT_MAX) {60 if (LongPressEventSubscribeManager::subscribeManagerId_ >= INT_MAX) {
61- MMI_HILOGE("The subscribeId has reached the upper limit, cannot continue the subscription");61+ MMI_HILOGE("The subscribeId has reached the upper limit, cannot continue the subscription");
62 return INVALID_SUBSCRIBE_ID;62 return INVALID_SUBSCRIBE_ID;
63 }63 }
64 int32_t subscribeId = LongPressEventSubscribeManager::subscribeManagerId_;64 int32_t subscribeId = LongPressEventSubscribeManager::subscribeManagerId_;
@@ -66,10 +66,11 @@ int32_t LongPressEventSubscribeManager::SubscribeLongPressEvent(
66 subscribeInfos_.emplace(std::make_pair(subscribeId, SubscribeLongPressEventInfo(longPressRequest, callback)));66 subscribeInfos_.emplace(std::make_pair(subscribeId, SubscribeLongPressEventInfo(longPressRequest, callback)));
67 int32_t ret = MMIEventHdl.SubscribeLongPressEvent(subscribeId, longPressRequest);67 int32_t ret = MMIEventHdl.SubscribeLongPressEvent(subscribeId, longPressRequest);
68 if (ret != RET_OK) {68 if (ret != RET_OK) {
69+ MMI_HILOGE("Subscribe long press event failed, ret:%{public}d", ret);
69 subscribeInfos_.erase(subscribeId);70 subscribeInfos_.erase(subscribeId);
70 return INVALID_SUBSCRIBE_ID;71 return INVALID_SUBSCRIBE_ID;
71 }72 }
72- MMI_HILOGI("The subscribeId:%{public}d, fingerCount:%{public}d, duration:%{public}d", subscribeId,73+ MMI_HILOGI("The subscribeId:%{public}d, fingerCount:%{public}d, duration:%{public}d", subscribeId,
73 longPressRequest.fingerCount, longPressRequest.duration);74 longPressRequest.fingerCount, longPressRequest.duration);
74 return subscribeId;75 return subscribeId;
75}76}
@@ -78,26 +79,26 @@ int32_t LongPressEventSubscribeManager::UnsubscribeLongPressEvent(int32_t subscr
78{79{
79 CALL_DEBUG_ENTER;80 CALL_DEBUG_ENTER;
80 if (subscribeId < 0) {81 if (subscribeId < 0) {
81- MMI_HILOGE("The subscribe id is less than 0");82+ MMI_HILOGE("The subscribe id is less than 0");
82 return RET_ERR;83 return RET_ERR;
83 }84 }
84 85 
85 std::lock_guard<std::mutex> guard(mtx_);86 std::lock_guard<std::mutex> guard(mtx_);
86 if (subscribeInfos_.empty()) {87 if (subscribeInfos_.empty()) {
87- MMI_HILOGE("The subscribeInfos is empty");88+ MMI_HILOGE("The subscribeInfos is empty");
88 return RET_ERR;89 return RET_ERR;
89 }90 }
90 91 
91 auto it = subscribeInfos_.find(subscribeId);92 auto it = subscribeInfos_.find(subscribeId);
92 if (it != subscribeInfos_.end()) {93 if (it != subscribeInfos_.end()) {
93 if (MMIEventHdl.UnsubscribeLongPressEvent(subscribeId) != RET_OK) {94 if (MMIEventHdl.UnsubscribeLongPressEvent(subscribeId) != RET_OK) {
94- MMI_HILOGE("Leave, unsubscribe long press event failed");95+ MMI_HILOGE("Leave, unsubscribe long press event failed");
95 return RET_ERR;96 return RET_ERR;
96 }97 }
97 subscribeInfos_.erase(it);98 subscribeInfos_.erase(it);
98 return RET_OK;99 return RET_OK;
99 }100 }
100- MMI_HILOGE("Failed to unsubscribe long press event, subscribeId:%{public}d", subscribeId);101+ MMI_HILOGE("Failed to unsubscribe long press event, subscribeId:%{public}d", subscribeId);
101 return RET_ERR;102 return RET_ERR;
102}103}
103 104 
@@ -106,7 +107,7 @@ int32_t LongPressEventSubscribeManager::OnSubscribeLongPressEventCallback(const
106{107{
107 CHK_PID_AND_TID();108 CHK_PID_AND_TID();
108 if (subscribeId < 0) {109 if (subscribeId < 0) {
109- MMI_HILOGE("The subscribe id is less than 0");110+ MMI_HILOGE("The subscribe id is less than 0");
110 return RET_ERR;111 return RET_ERR;
111 }112 }
112 std::function<void(LongPressEvent)> callback = nullptr;113 std::function<void(LongPressEvent)> callback = nullptr;
@@ -118,7 +119,7 @@ int32_t LongPressEventSubscribeManager::OnSubscribeLongPressEventCallback(const
118 }119 }
119 CHKPR(callback, ERROR_NULL_POINTER);120 CHKPR(callback, ERROR_NULL_POINTER);
120 callback(longPressEvent);121 callback(longPressEvent);
121- MMI_HILOGD("LongPressEvent fingerCount:%{public}d, duration:%{public}d, pid:%{public}d, displayId:%{public}d, "122+ MMI_HILOGD("LongPressEvent fingerCount:%{public}d, duration:%{public}d, pid:%{public}d, displayId:%{public}d, "
122 "displayX:%{private}d, displayY:%{private}d, result:%{public}d, windowId:%{public}d, pointerId:%{public}d, "123 "displayX:%{private}d, displayY:%{private}d, result:%{public}d, windowId:%{public}d, pointerId:%{public}d, "
123 "bundleName:%{public}s, subscribeId:%{public}d, downTime:%{public} " PRId64 "",124 "bundleName:%{public}s, subscribeId:%{public}d, downTime:%{public} " PRId64 "",
124 longPressEvent.fingerCount, longPressEvent.duration, longPressEvent.pid,125 longPressEvent.fingerCount, longPressEvent.duration, longPressEvent.pid,
@@ -133,7 +134,7 @@ void LongPressEventSubscribeManager::OnConnected()
133 CALL_DEBUG_ENTER;134 CALL_DEBUG_ENTER;
134 std::lock_guard<std::mutex> guard(mtx_);135 std::lock_guard<std::mutex> guard(mtx_);
135 if (subscribeInfos_.empty()) {136 if (subscribeInfos_.empty()) {
136- MMI_HILOGD("Leave, subscribeInfos_ is empty");137+ MMI_HILOGD("Leave, subscribeInfos_ is empty");
137 return;138 return;
138 }139 }
139 for (auto it = subscribeInfos_.begin(); it != subscribeInfos_.end(); ++it) {140 for (auto it = subscribeInfos_.begin(); it != subscribeInfos_.end(); ++it) {
@@ -141,7 +142,7 @@ void LongPressEventSubscribeManager::OnConnected()
141 LongPressRequest longPressRequest = subscribeInfo.GetLongPressRequest();142 LongPressRequest longPressRequest = subscribeInfo.GetLongPressRequest();
142 int32_t ret = MMIEventHdl.SubscribeLongPressEvent(it->first, longPressRequest);143 int32_t ret = MMIEventHdl.SubscribeLongPressEvent(it->first, longPressRequest);
143 if (ret != RET_OK) {144 if (ret != RET_OK) {
144- MMI_HILOGE("Subscribe long pres event failed, ret:%{public}d", ret);145+ MMI_HILOGE("Subscribe long pres event failed, ret:%{public}d", ret);
145 }146 }
146 }147 }
147}148}
@@ -102,6 +102,7 @@ int32_t SwitchEventInputSubscribeManager::UnsubscribeSwitchEvent(int32_t subscri
102 return RET_OK;102 return RET_OK;
103 }103 }
104 104 
105+ MMI_HILOGD("SubscribeId not found, subscribeId:%{public}d", subscribeId);
105 return RET_ERR;106 return RET_ERR;
106}107}
107 108 
@@ -85,6 +85,7 @@ int32_t TabletEventInputSubscribeManager::UnsubscribetabletProximity(int32_t sub
85 subscribeInfos_.erase(it);85 subscribeInfos_.erase(it);
86 return RET_OK;86 return RET_OK;
87 }87 }
88+ MMI_HILOGD("SubscribeId not found, subscribeId:%{public}d", subscribeId);
88 return RET_ERR;89 return RET_ERR;
89}90}
90 91 
@@ -130,7 +130,7 @@ private:
130 if (event->HasFlag(InputEvent::EVENT_FLAG_PRIVACY_MODE) || IsEnterableKey(event->GetKeyCode())) {130 if (event->HasFlag(InputEvent::EVENT_FLAG_PRIVACY_MODE) || IsEnterableKey(event->GetKeyCode())) {
131 MMI_HILOG_HEADER(LOG_INFO, lh, "See InputTracking-Dict, I:%{public}d,"131 MMI_HILOG_HEADER(LOG_INFO, lh, "See InputTracking-Dict, I:%{public}d,"
132 "KC:%{private}d, AT:%{public}" PRId64132 "KC:%{private}d, AT:%{public}" PRId64
133- ", ET:%{public}s, KA:%{public}s, NL:%{public}d, CL:%{public}d, SL:%{public}d, KIC:%zu, "133+ ", ET:%{public}s, KA:%{private}s, NL:%{private}d, CL:%{private}d, SL:%{private}d, KIC:%{private}zu, "
134 "DI:%{public}d, IR:%{public}s, SI:%{public}s",134 "DI:%{public}d, IR:%{public}s, SI:%{public}s",
135 event->GetId(), event->GetKeyCode(), event->GetActionTime(),135 event->GetId(), event->GetKeyCode(), event->GetActionTime(),
136 InputEvent::EventTypeToString(event->GetEventType()),136 InputEvent::EventTypeToString(event->GetEventType()),
@@ -175,7 +175,7 @@ private:
175 }175 }
176 if (IsBetaVersion()) {176 if (IsBetaVersion()) {
177 if (!event->HasFlag(InputEvent::EVENT_FLAG_PRIVACY_MODE)) {177 if (!event->HasFlag(InputEvent::EVENT_FLAG_PRIVACY_MODE)) {
178- MMI_HILOG_HEADER(LOG_INFO, lh, "%{public}s]", tmpStr.c_str());178+ MMI_HILOG_HEADER(LOG_INFO, lh, "%{private}s]", tmpStr.c_str());
179 }179 }
180 }180 }
181 }181 }
@@ -344,11 +344,15 @@ private:
344 item.GetTwist());344 item.GetTwist());
345 } else {345 } else {
346 if (event->HasFlag(InputEvent::EVENT_FLAG_PRIVACY_MODE)) {346 if (event->HasFlag(InputEvent::EVENT_FLAG_PRIVACY_MODE)) {
347- MMI_HILOG_HEADER(LOG_DEBUG, lh,"PI:%{public}d, DT:%{public}" PRId64 ", IP:%{public}d, DX:%d, DY:%d"347+ MMI_HILOG_HEADER(LOG_DEBUG, lh,
348- ", WX:%d, WY:%d, W:%{public}d, H:%{public}d, TX:%.2f, TY:%.2f, TDX:%d, TDY:%d, ToolWX:%d, "348+ "PI:%{public}d, DT:%{public}" PRId64 ", IP:%{public}d, DX:%{private}d, DY:%{private}d, "
349- "ToolWY:%d, ToolW:%{public}d, ToolH:%{public}d, P:%{public}.2f, MF:%{public}d, "349+ "WX:%{private}d, WY:%{private}d, W:%{public}d, H:%{public}d, TX:%{private}.2f, "
350- "ToolType:%{public}d, LA:%{public}d, SA:%{public}d, RawDx:%d, RawDy:%d, RawDisplayX:%d, "350+ "TY:%{private}.2f, TDX:%{private}d, TDY:%{private}d, ToolWX:%{private}d, "
351- "RawDisplayY:%d, T:%{public}d, DXP:%f, DYP:%f, FXP:%f, FYP:%f, WXP:%f, WYP:%f",351+ "ToolWY:%{private}d, ToolW:%{public}d, ToolH:%{public}d, P:%{public}.2f, MF:%{public}d, "
352+ "ToolType:%{public}d, LA:%{public}d, SA:%{public}d, "
353+ "RawDx:%{private}d, RawDy:%{private}d, RawDisplayX:%{private}d, "
354+ "RawDisplayY:%{private}d, T:%{public}d, DXP:%{private}f, DYP:%{private}f, "
355+ "FXP:%{private}f, FYP:%{private}f, WXP:%{private}f, WYP:%{private}f",
352 item.GetPointerId(), item.GetDownTime(), item.IsPressed(), item.GetDisplayX(),356 item.GetPointerId(), item.GetDownTime(), item.IsPressed(), item.GetDisplayX(),
353 item.GetDisplayY(), item.GetWindowX(), item.GetWindowY(), item.GetWidth(), item.GetHeight(),357 item.GetDisplayY(), item.GetWindowX(), item.GetWindowY(), item.GetWidth(), item.GetHeight(),
354 item.GetTiltX(), item.GetTiltY(), item.GetToolDisplayX(), item.GetToolDisplayY(),358 item.GetTiltX(), item.GetTiltY(), item.GetToolDisplayX(), item.GetToolDisplayY(),
@@ -386,11 +390,14 @@ private:
386 } else {390 } else {
387 if (event->HasFlag(InputEvent::EVENT_FLAG_PRIVACY_MODE)) {391 if (event->HasFlag(InputEvent::EVENT_FLAG_PRIVACY_MODE)) {
388 MMI_HILOG_HEADER(LOG_DEBUG, lh,392 MMI_HILOG_HEADER(LOG_DEBUG, lh,
389- "PI:%{public}d, DT:%{public}" PRId64 ", IP:%{public}d, DX:%d, DY:%d, WX:%d, WY:%d, "393+ "PI:%{public}d, DT:%{public}" PRId64 ", IP:%{public}d, DX:%{private}d, DY:%{private}d, "
390- "W:%{public}d, H:%{public}d, TX:%.2f, TY:%.2f, TDX:%d, TDY:%d, ToolWX:%d, ToolWY:%d, "394+ "WX:%{private}d, WY:%{private}d, W:%{public}d, H:%{public}d, TX:%{private}.2f, "
391- "ToolW:%{public}d, ToolH:%{public}d, P:%{public}.2f, MF:%{public}d, "395+ "TY:%{private}.2f, TDX:%{private}d, TDY:%{private}d, ToolWX:%{private}d, "
392- "ToolType:%{public}d, LA:%{public}d, SA:%{public}d, RawDx:%d, RawDy:%d, RawDisplayX:%d, "396+ "ToolWY:%{private}d, ToolW:%{public}d, ToolH:%{public}d, P:%{public}.2f, MF:%{public}d, "
393- "RawDisplayY:%d, T:%{public}d, DXP:%f, DYP:%f, FXP:%f, FYP:%f, WXP:%f, WYP:%f",397+ "ToolType:%{public}d, LA:%{public}d, SA:%{public}d, "
398+ "RawDx:%{private}d, RawDy:%{private}d, RawDisplayX:%{private}d, "
399+ "RawDisplayY:%{private}d, T:%{public}d, DXP:%{private}f, DYP:%{private}f, "
400+ "FXP:%{private}f, FYP:%{private}f, WXP:%{private}f, WYP:%{private}f",
394 item.GetPointerId(), item.GetDownTime(), item.IsPressed(), item.GetDisplayX(),401 item.GetPointerId(), item.GetDownTime(), item.IsPressed(), item.GetDisplayX(),
395 item.GetDisplayY(), item.GetWindowX(), item.GetWindowY(), item.GetWidth(), item.GetHeight(),402 item.GetDisplayY(), item.GetWindowX(), item.GetWindowY(), item.GetWidth(), item.GetHeight(),
396 item.GetTiltX(), item.GetTiltY(), item.GetToolDisplayX(), item.GetToolDisplayY(),403 item.GetTiltX(), item.GetTiltY(), item.GetToolDisplayX(), item.GetToolDisplayY(),
@@ -1273,6 +1273,7 @@ const char* KeyEvent::KeyCodeToString(int32_t keyCode)
1273std::shared_ptr<KeyEvent> KeyEvent::Clone(std::shared_ptr<KeyEvent> keyEvent)1273std::shared_ptr<KeyEvent> KeyEvent::Clone(std::shared_ptr<KeyEvent> keyEvent)
1274{1274{
1275 if (!keyEvent) {1275 if (!keyEvent) {
1276+ MMI_HILOGE("Clone key event failed, keyEvent is nullptr");
1276 return nullptr;1277 return nullptr;
1277 }1278 }
1278 auto event = std::shared_ptr<KeyEvent>(new (std::nothrow) KeyEvent(*keyEvent.get()));1279 auto event = std::shared_ptr<KeyEvent>(new (std::nothrow) KeyEvent(*keyEvent.get()));
@@ -251,7 +251,7 @@ void DSoftbusHandler::SendEvent(const CooperateEvent &event)
251void DSoftbusHandler::OnCommunicationFailure(const std::string &networkId)251void DSoftbusHandler::OnCommunicationFailure(const std::string &networkId)
252{252{
253 env_->GetDSoftbus().CloseSession(networkId);253 env_->GetDSoftbus().CloseSession(networkId);
254- FI_HILOGI("Notify communication failure with peer(%{public}s)", Utility::Anonymize(networkId).c_str());254+ FI_HILOGW("Notify communication failure with peer(%{public}s)", Utility::Anonymize(networkId).c_str());
255 SendEvent(CooperateEvent(255 SendEvent(CooperateEvent(
256 CooperateEventType::DSOFTBUS_SESSION_CLOSED,256 CooperateEventType::DSOFTBUS_SESSION_CLOSED,
257 DSoftbusSessionClosed {257 DSoftbusSessionClosed {
@@ -141,10 +141,10 @@ void MouseLocation::OnReplySubscribeMouseLocation(const DSoftbusReplySubscribeMo
141 CALL_DEBUG_ENTER;141 CALL_DEBUG_ENTER;
142 std::lock_guard<std::mutex> guard(mutex_);142 std::lock_guard<std::mutex> guard(mutex_);
143 if (notice.result) {143 if (notice.result) {
144- FI_HILOGI("SubscribeMouseLocation of networkId:%{public}s successfully, localNetworkId:%{public}s",144+ FI_HILOGW("SubscribeMouseLocation of networkId:%{public}s successfully, localNetworkId:%{public}s",
145 Utility::Anonymize(notice.networkId).c_str(), Utility::Anonymize(notice.remoteNetworkId).c_str());145 Utility::Anonymize(notice.networkId).c_str(), Utility::Anonymize(notice.remoteNetworkId).c_str());
146 } else {146 } else {
147- FI_HILOGI("SubscribeMouseLocation of networkId:%{public}s failed, localNetworkId:%{public}s",147+ FI_HILOGW("SubscribeMouseLocation of networkId:%{public}s failed, localNetworkId:%{public}s",
148 Utility::Anonymize(notice.networkId).c_str(), Utility::Anonymize(notice.remoteNetworkId).c_str());148 Utility::Anonymize(notice.networkId).c_str(), Utility::Anonymize(notice.remoteNetworkId).c_str());
149 }149 }
150}150}
@@ -154,10 +154,10 @@ void MouseLocation::OnReplyUnSubscribeMouseLocation(const DSoftbusReplyUnSubscri
154 CALL_DEBUG_ENTER;154 CALL_DEBUG_ENTER;
155 std::lock_guard<std::mutex> guard(mutex_);155 std::lock_guard<std::mutex> guard(mutex_);
156 if (notice.result) {156 if (notice.result) {
157- FI_HILOGI("UnSubscribeMouseLocation of networkId:%{public}s successfully, localNetworkId:%{public}s",157+ FI_HILOGW("UnSubscribeMouseLocation of networkId:%{public}s successfully, localNetworkId:%{public}s",
158 Utility::Anonymize(notice.networkId).c_str(), Utility::Anonymize(notice.remoteNetworkId).c_str());158 Utility::Anonymize(notice.networkId).c_str(), Utility::Anonymize(notice.remoteNetworkId).c_str());
159 } else {159 } else {
160- FI_HILOGI("UnSubscribeMouseLocation of networkId:%{public}s failed, localNetworkId:%{public}s",160+ FI_HILOGW("UnSubscribeMouseLocation of networkId:%{public}s failed, localNetworkId:%{public}s",
161 Utility::Anonymize(notice.networkId).c_str(), Utility::Anonymize(notice.remoteNetworkId).c_str());161 Utility::Anonymize(notice.networkId).c_str(), Utility::Anonymize(notice.remoteNetworkId).c_str());
162 }162 }
163}163}
@@ -150,6 +150,7 @@ int32_t CooperateDFX::WriteStop(OHOS::HiviewDFX::HiSysEvent::EventType type)
150int32_t CooperateDFX::WriteCooperateState(CooperateState curState)150int32_t CooperateDFX::WriteCooperateState(CooperateState curState)
151{151{
152 if (curState == CooperateState::N_COOPERATE_STATES) {152 if (curState == CooperateState::N_COOPERATE_STATES) {
153+ FI_HILOGE("Invalid cooperate state, curState:%{public}d", static_cast<int32_t>(curState));
153 return RET_ERR;154 return RET_ERR;
154 }155 }
155 if (CooperateState_.find(curState) == CooperateState_.end()) {156 if (CooperateState_.find(curState) == CooperateState_.end()) {
@@ -48,6 +48,7 @@ std::shared_ptr<SocketConnection> SocketConnection::Connect(std::function<int32_
48 CHKPP(socket);48 CHKPP(socket);
49 int32_t sockFd = socket();49 int32_t sockFd = socket();
50 if (sockFd < 0) {50 if (sockFd < 0) {
51+ FI_HILOGE("Create socket failed, sockFd:%{public}d", sockFd);
51 return nullptr;52 return nullptr;
52 }53 }
53 return std::make_shared<SocketConnection>(sockFd, recv, onDisconnected);54 return std::make_shared<SocketConnection>(sockFd, recv, onDisconnected);
@@ -139,7 +139,7 @@ void AccountManager::AccountSetting::AccShortcutTimeout(int32_t accountId, const
139 if (auto iter = accountMgr->accounts_.find(accountId); iter != accountMgr->accounts_.end()) {139 if (auto iter = accountMgr->accounts_.find(accountId); iter != accountMgr->accounts_.end()) {
140 iter->second->OnAccShortcutTimeoutChanged(key);140 iter->second->OnAccShortcutTimeoutChanged(key);
141 } else {141 } else {
142- MMI_HILOGW("No account(%d)", accountId);142+ MMI_HILOGW("No account(%{private}d)", accountId);
143 }143 }
144}144}
145 145 
@@ -150,7 +150,7 @@ void AccountManager::AccountSetting::AccShortcutEnabled(int32_t accountId, const
150 if (auto iter = accountMgr->accounts_.find(accountId); iter != accountMgr->accounts_.end()) {150 if (auto iter = accountMgr->accounts_.find(accountId); iter != accountMgr->accounts_.end()) {
151 iter->second->OnAccShortcutEnabled(key);151 iter->second->OnAccShortcutEnabled(key);
152 } else {152 } else {
153- MMI_HILOGW("No account(%{public}d)", accountId);153+ MMI_HILOGW("No account(%{private}d)", accountId);
154 }154 }
155}155}
156 156 
@@ -161,7 +161,7 @@ void AccountManager::AccountSetting::AccShortcutEnabledOnScreenLocked(int32_t ac
161 if (auto iter = accountMgr->accounts_.find(accountId); iter != accountMgr->accounts_.end()) {161 if (auto iter = accountMgr->accounts_.find(accountId); iter != accountMgr->accounts_.end()) {
162 iter->second->OnAccShortcutEnabledOnScreenLocked(key);162 iter->second->OnAccShortcutEnabledOnScreenLocked(key);
163 } else {163 } else {
164- MMI_HILOGW("No account(%{public}d)", accountId);164+ MMI_HILOGW("No account(%{private}d)", accountId);
165 }165 }
166}166}
167 167 
@@ -221,19 +221,19 @@ void AccountManager::AccountSetting::InitializeSetting()
221 221 
222void AccountManager::AccountSetting::OnAccShortcutTimeoutChanged(const std::string &key)222void AccountManager::AccountSetting::OnAccShortcutTimeoutChanged(const std::string &key)
223{223{
224- MMI_HILOGD("[AccountSetting][%d] Setting '%s' has changed", GetAccountId(), key.c_str());224+ MMI_HILOGD("[AccountSetting][%{private}d] Setting '%{public}s' has changed", GetAccountId(), key.c_str());
225 ReadLongPressTime();225 ReadLongPressTime();
226}226}
227 227 
228void AccountManager::AccountSetting::OnAccShortcutEnabled(const std::string &key)228void AccountManager::AccountSetting::OnAccShortcutEnabled(const std::string &key)
229{229{
230- MMI_HILOGD("[AccountSetting][%d] Setting '%s' has changed", GetAccountId(), key.c_str());230+ MMI_HILOGD("[AccountSetting][%{private}d] Setting '%{public}s' has changed", GetAccountId(), key.c_str());
231 accShortcutEnabled_ = ReadSwitchStatus(key, accShortcutEnabled_);231 accShortcutEnabled_ = ReadSwitchStatus(key, accShortcutEnabled_);
232}232}
233 233 
234void AccountManager::AccountSetting::OnAccShortcutEnabledOnScreenLocked(const std::string &key)234void AccountManager::AccountSetting::OnAccShortcutEnabledOnScreenLocked(const std::string &key)
235{235{
236- MMI_HILOGD("[AccountSetting][%d] Setting '%{public}s' has changed", GetAccountId(), key.c_str());236+ MMI_HILOGD("[AccountSetting][%{private}d] Setting '%{public}s' has changed", GetAccountId(), key.c_str());
237 accShortcutEnabledOnScreenLocked_ = ReadSwitchStatus(key, accShortcutEnabledOnScreenLocked_);237 accShortcutEnabledOnScreenLocked_ = ReadSwitchStatus(key, accShortcutEnabledOnScreenLocked_);
238}238}
239 239 
@@ -350,7 +350,7 @@ int32_t AccountManager::GetAccountIdFromUid(int32_t uid)
350 int32_t userId = INVALID_USER_ID;350 int32_t userId = INVALID_USER_ID;
351 auto errCode = AccountSA::OsAccountManager::GetOsAccountLocalIdFromUid(uid, userId);351 auto errCode = AccountSA::OsAccountManager::GetOsAccountLocalIdFromUid(uid, userId);
352 if (errCode != RET_OK) {352 if (errCode != RET_OK) {
353- MMI_HILOGI("GetOsAccountLocalIdFromUid failed, errCode:%{public}d", errCode);353+ MMI_HILOGW("GetOsAccountLocalIdFromUid failed, errCode:%{public}d", errCode);
354 }354 }
355 return userId;355 return userId;
356}356}
@@ -457,7 +457,7 @@ void AccountManager::SubscribeCommonEvent()
457 return;457 return;
458 }458 }
459 subscriber_ = nullptr;459 subscriber_ = nullptr;
460- MMI_HILOGI("SubscribeCommonEvent fail, retry later");460+ MMI_HILOGW("SubscribeCommonEvent fail, retry later");
461 timerId_ = TimerMgr->AddTimer(REPEAT_COOLING_TIME, REPEAT_ONCE, [this]() {461 timerId_ = TimerMgr->AddTimer(REPEAT_COOLING_TIME, REPEAT_ONCE, [this]() {
462 SubscribeCommonEvent();462 SubscribeCommonEvent();
463 timerId_ = -1;463 timerId_ = -1;
@@ -540,7 +540,7 @@ void AccountManager::SetupMainAccount()
540 currentAccountId_ = MAIN_ACCOUNT_ID;540 currentAccountId_ = MAIN_ACCOUNT_ID;
541 auto [_, isNew] = accounts_.emplace(MAIN_ACCOUNT_ID, std::make_unique<AccountSetting>(MAIN_ACCOUNT_ID));541 auto [_, isNew] = accounts_.emplace(MAIN_ACCOUNT_ID, std::make_unique<AccountSetting>(MAIN_ACCOUNT_ID));
542 if (!isNew) {542 if (!isNew) {
543- MMI_HILOGW("Account(%{public}d) has existed", MAIN_ACCOUNT_ID);543+ MMI_HILOGW("Account(%{private}d) has existed", MAIN_ACCOUNT_ID);
544 }544 }
545 // LCOV_EXCL_STOP545 // LCOV_EXCL_STOP
546}546}
@@ -560,10 +560,10 @@ void AccountManager::OnCommonEvent(const EventFwk::CommonEventData &data)
560void AccountManager::OnAddUser(const EventFwk::CommonEventData &data)560void AccountManager::OnAddUser(const EventFwk::CommonEventData &data)
561{561{
562 int32_t accountId = data.GetCode();562 int32_t accountId = data.GetCode();
563- MMI_HILOGD("Add account(%d)", accountId);563+ MMI_HILOGD("Add account(%{private}d)", accountId);
564 auto [_, isNew] = accounts_.emplace(accountId, std::make_unique<AccountSetting>(accountId));564 auto [_, isNew] = accounts_.emplace(accountId, std::make_unique<AccountSetting>(accountId));
565 if (!isNew) {565 if (!isNew) {
566- MMI_HILOGW("Account(%d) has existed", accountId);566+ MMI_HILOGW("Account(%{private}d) has existed", accountId);
567 }567 }
568 INPUT_SETTING_MANAGER->OnAddUser(accountId);568 INPUT_SETTING_MANAGER->OnAddUser(accountId);
569}569}
@@ -571,12 +571,12 @@ void AccountManager::OnAddUser(const EventFwk::CommonEventData &data)
571void AccountManager::OnRemoveUser(const EventFwk::CommonEventData &data)571void AccountManager::OnRemoveUser(const EventFwk::CommonEventData &data)
572{572{
573 int32_t accountId = data.GetCode();573 int32_t accountId = data.GetCode();
574- MMI_HILOGD("Remove account(%d)", accountId);574+ MMI_HILOGD("Remove account(%{private}d)", accountId);
575 if (auto iter = accounts_.find(accountId); iter != accounts_.end()) {575 if (auto iter = accounts_.find(accountId); iter != accounts_.end()) {
576 accounts_.erase(iter);576 accounts_.erase(iter);
577- MMI_HILOGD("Account(%d) has been removed", accountId);577+ MMI_HILOGD("Account(%{private}d) has been removed", accountId);
578 } else {578 } else {
579- MMI_HILOGW("No account(%d)", accountId);579+ MMI_HILOGW("No account(%{private}d)", accountId);
580 }580 }
581 INPUT_SETTING_MANAGER->OnRemoveUser(accountId);581 INPUT_SETTING_MANAGER->OnRemoveUser(accountId);
582}582}
@@ -591,7 +591,7 @@ void AccountManager::OnSwitchUser(const EventFwk::CommonEventData &data)
591 auto [ptr, ec] = std::from_chars(displayId.data(), displayId.data() + displayId.size(), num);591 auto [ptr, ec] = std::from_chars(displayId.data(), displayId.data() + displayId.size(), num);
592 if (ec == std::errc() && num <= UINT64_MAX) {592 if (ec == std::errc() && num <= UINT64_MAX) {
593 currentDisplayId = num;593 currentDisplayId = num;
594- MMI_HILOGD("Switch to {%{public}" PRIu64 ":%d}", currentDisplayId, accountId);594+ MMI_HILOGD("Switch to {%{public}" PRIu64 ":%{private}d}", currentDisplayId, accountId);
595 } else {595 } else {
596 MMI_HILOGE("Failed to convert or invalid displayId value");596 MMI_HILOGE("Failed to convert or invalid displayId value");
597 }597 }
@@ -601,7 +601,7 @@ void AccountManager::OnSwitchUser(const EventFwk::CommonEventData &data)
601 accounts_.emplace(accountId, std::make_unique<AccountSetting>(accountId));601 accounts_.emplace(accountId, std::make_unique<AccountSetting>(accountId));
602 }602 }
603 currentAccountId_ = accountId;603 currentAccountId_ = accountId;
604- MMI_HILOGD("Switched to account(%d)", currentAccountId_);604+ MMI_HILOGD("Switched to account(%{private}d)", currentAccountId_);
605 }605 }
606 INPUT_SETTING_MANAGER->OnSwitchUser(currentAccountId_);606 INPUT_SETTING_MANAGER->OnSwitchUser(currentAccountId_);
607#ifdef OHOS_BUILD_ENABLE_TRIPLE_FINGER_SNAPSHOT607#ifdef OHOS_BUILD_ENABLE_TRIPLE_FINGER_SNAPSHOT
@@ -136,6 +136,7 @@ void SettingDataShare::ExecRegisterCb(const sptr<SettingObserver>& observer)
136ErrCode SettingDataShare::RegisterObserver(const sptr<SettingObserver>& observer, const std::string &strUri)136ErrCode SettingDataShare::RegisterObserver(const sptr<SettingObserver>& observer, const std::string &strUri)
137{137{
138 if (observer == nullptr) {138 if (observer == nullptr) {
139+ MMI_HILOGE("Observer is nullptr");
139 BytraceAdapter::StopDataShare();140 BytraceAdapter::StopDataShare();
140 return RET_ERR;141 return RET_ERR;
141 }142 }
@@ -161,6 +162,7 @@ ErrCode SettingDataShare::RegisterObserver(const sptr<SettingObserver>& observer
161ErrCode SettingDataShare::UnregisterObserver(const sptr<SettingObserver>& observer, const std::string &strUri)162ErrCode SettingDataShare::UnregisterObserver(const sptr<SettingObserver>& observer, const std::string &strUri)
162{163{
163 if (observer == nullptr) {164 if (observer == nullptr) {
165+ MMI_HILOGE("Observer is nullptr");
164 BytraceAdapter::StopDataShare();166 BytraceAdapter::StopDataShare();
165 return RET_ERR;167 return RET_ERR;
166 }168 }
@@ -197,6 +199,7 @@ ErrCode SettingDataShare::GetStringValue(const std::string& key, std::string& va
197 auto resultSet = helper->Query(uri, predicates, columns);199 auto resultSet = helper->Query(uri, predicates, columns);
198 ReleaseDataShareHelper(helper);200 ReleaseDataShareHelper(helper);
199 if (resultSet == nullptr) {201 if (resultSet == nullptr) {
202+ MMI_HILOGE("Query result set is nullptr, key:%{public}s", key.c_str());
200 IPCSkeleton::SetCallingIdentity(callingIdentity);203 IPCSkeleton::SetCallingIdentity(callingIdentity);
201 BytraceAdapter::StopDataShare();204 BytraceAdapter::StopDataShare();
202 return ERR_INVALID_OPERATION;205 return ERR_INVALID_OPERATION;
@@ -204,6 +207,7 @@ ErrCode SettingDataShare::GetStringValue(const std::string& key, std::string& va
204 int32_t count = 0;207 int32_t count = 0;
205 resultSet->GetRowCount(count);208 resultSet->GetRowCount(count);
206 if (count == 0) {209 if (count == 0) {
210+ MMI_HILOGD("Setting item not found, key:%{public}s", key.c_str());
207 IPCSkeleton::SetCallingIdentity(callingIdentity);211 IPCSkeleton::SetCallingIdentity(callingIdentity);
208 BytraceAdapter::StopDataShare();212 BytraceAdapter::StopDataShare();
209 return ERR_NAME_NOT_FOUND;213 return ERR_NAME_NOT_FOUND;
@@ -212,6 +216,7 @@ ErrCode SettingDataShare::GetStringValue(const std::string& key, std::string& va
212 resultSet->GoToRow(tmpRow);216 resultSet->GoToRow(tmpRow);
213 int32_t ret = resultSet->GetString(tmpRow, value);217 int32_t ret = resultSet->GetString(tmpRow, value);
214 if (ret != RET_OK) {218 if (ret != RET_OK) {
219+ MMI_HILOGE("Get string failed, ret:%{public}d, key:%{public}s", ret, key.c_str());
215 IPCSkeleton::SetCallingIdentity(callingIdentity);220 IPCSkeleton::SetCallingIdentity(callingIdentity);
216 BytraceAdapter::StopDataShare();221 BytraceAdapter::StopDataShare();
217 return ERR_INVALID_VALUE;222 return ERR_INVALID_VALUE;
@@ -274,6 +279,9 @@ std::shared_ptr<DataShare::DataShareHelper> SettingDataShare::CreateDataShareHel
274 }279 }
275 }280 }
276 BytraceAdapter::StopDataShare();281 BytraceAdapter::StopDataShare();
282+ if (ret.second == nullptr) {
283+ MMI_HILOGE("Create data share helper failed");
284+ }
277 return ret.second;285 return ret.second;
278}286}
279 287 
@@ -115,6 +115,8 @@ int32_t CrownTransformProcessor::NormalizeRotateEvent(struct libinput_event *eve
115 inputEventNormalizeHandler->HandlePointerEvent(pointerEvent);115 inputEventNormalizeHandler->HandlePointerEvent(pointerEvent);
116#endif // OHOS_BUILD_ENABLE_POINTER116#endif // OHOS_BUILD_ENABLE_POINTER
117 }, "CrownTransformProcessor");117 }, "CrownTransformProcessor");
118+ MMI_HILOGD("Crown rotate session start, timerId:%{public}d, deviceId:%{private}d",
119+ timerId_, deviceId_);
118 120 
119 HandleCrownRotateBegin(rawPointerEvent);121 HandleCrownRotateBegin(rawPointerEvent);
120 }122 }
@@ -870,10 +870,13 @@ void InputDeviceManager::CheckInputDeviceCaps(int32_t deviceId)
870 }870 }
871 enum evdev_device_udev_tags udevTags = libinput_device_get_tags(rawDev);871 enum evdev_device_udev_tags udevTags = libinput_device_get_tags(rawDev);
872 if ((udevTags & EVDEV_UDEV_TAG_TABLET) != EVDEV_UDEV_TAG_TABLET) {872 if ((udevTags & EVDEV_UDEV_TAG_TABLET) != EVDEV_UDEV_TAG_TABLET) {
873+ MMI_HILOGD("Device is not tagged tablet, deviceId:%{private}d, udevTags:%{public}d",
874+ deviceId, static_cast<int32_t>(udevTags));
873 return;875 return;
874 }876 }
875 if (libinput_device_has_property(rawDev, INPUT_PROP_POINTER)) {877 if (libinput_device_has_property(rawDev, INPUT_PROP_POINTER)) {
876 devInfo.isPointerDevice = true;878 devInfo.isPointerDevice = true;
879+ MMI_HILOGD("Tablet device has pointer property, deviceId:%{private}d", deviceId);
877 return;880 return;
878 }881 }
879 if (auto physIter = physicalInputDevices_.find(devInfo.physicalId);882 if (auto physIter = physicalInputDevices_.find(devInfo.physicalId);
@@ -889,7 +892,8 @@ void InputDeviceManager::NotifyDevCallback(int32_t deviceId, struct InputDeviceI
889 NotifyDevCallbackExt(deviceId, inDevice.inputDeviceOrigin);892 NotifyDevCallbackExt(deviceId, inDevice.inputDeviceOrigin);
890#endif // OHOS_BUILD_ENABLE_KEYBOARD_EXT_FLAG893#endif // OHOS_BUILD_ENABLE_KEYBOARD_EXT_FLAG
891 if (!inDevice.isTouchableDevice || (deviceId < 0)) {894 if (!inDevice.isTouchableDevice || (deviceId < 0)) {
892- MMI_HILOGD("The device is not touchable device already existent");895+ MMI_HILOGD("The device is not touchable device already existent, deviceId:%{private}d, "
896+ "isTouchableDevice:%{public}d", deviceId, inDevice.isTouchableDevice);
893 return;897 return;
894 }898 }
895 std::string name = "null";899 std::string name = "null";
@@ -899,8 +903,8 @@ void InputDeviceManager::NotifyDevCallback(int32_t deviceId, struct InputDeviceI
899 if (!inDevice.sysUid.empty()) {903 if (!inDevice.sysUid.empty()) {
900 CHKPV(devCallbacks_);904 CHKPV(devCallbacks_);
901 devCallbacks_(deviceId, name, inDevice.sysUid, "add");905 devCallbacks_(deviceId, name, inDevice.sysUid, "add");
902- MMI_HILOGI("Send device info to window manager, device id:%{public}d, name:%{private}s,"906+ MMI_HILOGI("Send device info to window manager, device id:%{private}d, name:%{private}s,"
903- "system uid:%s, status:add", deviceId, name.c_str(), inDevice.sysUid.c_str());907+ "system uid:%{private}s, status:add", deviceId, name.c_str(), inDevice.sysUid.c_str());
904 } else {908 } else {
905 MMI_HILOGE("Get device system uid id is empty, deviceId:%{public}d", deviceId);909 MMI_HILOGE("Get device system uid id is empty, deviceId:%{public}d", deviceId);
906 }910 }
@@ -1059,7 +1063,8 @@ void InputDeviceManager::OnInputDeviceRemoved(struct libinput_device *inputDevic
1059 std::string name = libinput_device_get_name(inputDevice);1063 std::string name = libinput_device_get_name(inputDevice);
1060 CHKPV(devCallbacks_);1064 CHKPV(devCallbacks_);
1061 devCallbacks_(deviceId, name, sysUid, "remove");1065 devCallbacks_(deviceId, name, sysUid, "remove");
1062- MMI_HILOGI("Send device info to window manager, device id:%{public}d, name:%{private}s, system uid:%s, "1066+ MMI_HILOGI("Send device info to window manager, device id:%{private}d, name:%{private}s, "
1067+ "system uid:%{private}s, "
1063 "status:remove", deviceId, name.c_str(), sysUid.c_str());1068 "status:remove", deviceId, name.c_str(), sysUid.c_str());
1064 }1069 }
1065 1070 
@@ -1351,6 +1356,7 @@ int32_t InputDeviceManager::AddVirtualInputDevice(std::shared_ptr<InputDevice> d
1351 CALL_DEBUG_ENTER;1356 CALL_DEBUG_ENTER;
1352 CHKPR(device, RET_ERR);1357 CHKPR(device, RET_ERR);
1353 if (CheckDuplicateInputDevice(device)) {1358 if (CheckDuplicateInputDevice(device)) {
1359+ MMI_HILOGD("Duplicate input device, name:%{private}s", device->GetName().c_str());
1354 return RET_ERR;1360 return RET_ERR;
1355 }1361 }
1356 // if we have enabled physical/virtual pointer before adding this one.1362 // if we have enabled physical/virtual pointer before adding this one.
@@ -62,7 +62,8 @@ void EventDispatchHandler::HandleKeyEvent(const std::shared_ptr<KeyEvent> keyEve
62 CHKPV(keyEvent);62 CHKPV(keyEvent);
63#ifdef OHOS_BUILD_ENABLE_KEY_HOOK63#ifdef OHOS_BUILD_ENABLE_KEY_HOOK
64 if (KEY_EVENT_HOOK_MGR.IsHooksExisted() && KEY_EVENT_HOOK_MGR.OnKeyEvent(keyEvent)) {64 if (KEY_EVENT_HOOK_MGR.IsHooksExisted() && KEY_EVENT_HOOK_MGR.OnKeyEvent(keyEvent)) {
65- MMI_HILOGD("Keyevent is hooked");65+ MMI_HILOGD("Keyevent is hooked, keyCode:%{private}d, keyAction:%{private}d",
66+ keyEvent->GetKeyCode(), keyEvent->GetKeyAction());
66 return;67 return;
67 }68 }
68#endif // OHOS_BUILD_ENABLE_KEY_HOOK69#endif // OHOS_BUILD_ENABLE_KEY_HOOK
@@ -327,7 +327,7 @@ void EventNormalizeHandler::HandleEvent(libinput_event* event, int64_t frameTime
327 break;327 break;
328 }328 }
329 default: {329 default: {
330- MMI_HILOGD("This device does not support :%d", type);330+ MMI_HILOGD("This device does not support :%{public}d", type);
331 break;331 break;
332 }332 }
333 }333 }
@@ -1244,7 +1244,7 @@ void EventNormalizeHandler::CancelTwoFingerAxis(libinput_event* event)
1244 }1244 }
1245 bool result = MouseEventHdr->CheckAndPackageAxisEvent(event);1245 bool result = MouseEventHdr->CheckAndPackageAxisEvent(event);
1246 if (!result) {1246 if (!result) {
1247- MMI_HILOGI("Check or packet axis event failed");1247+ MMI_HILOGW("Check or packet axis event failed");
1248 return;1248 return;
1249 }1249 }
1250 auto pointerEvent = MouseEventHdr->GetPointerEvent();1250 auto pointerEvent = MouseEventHdr->GetPointerEvent();
@@ -1576,12 +1576,12 @@ bool EventNormalizeHandler::HandleTouchPadEdgeSwipe(libinput_event* event)
1576bool EventNormalizeHandler::HandleTouchpadSyncEvent(libinput_event *event)1576bool EventNormalizeHandler::HandleTouchpadSyncEvent(libinput_event *event)
1577{1577{
1578 if (event == nullptr) {1578 if (event == nullptr) {
1579- MMI_HILOGI("Event is null");1579+ MMI_HILOGE("Event is null");
1580 return false;1580 return false;
1581 }1581 }
1582 auto manager = InputPluginManager::GetInstance();1582 auto manager = InputPluginManager::GetInstance();
1583 if (manager == nullptr) {1583 if (manager == nullptr) {
1584- MMI_HILOGI("InputPluginManager is null");1584+ MMI_HILOGE("InputPluginManager is null");
1585 return false;1585 return false;
1586 }1586 }
1587 auto pData = std::make_shared<IPluginData>();1587 auto pData = std::make_shared<IPluginData>();
@@ -68,6 +68,7 @@ InputEventHandler::~InputEventHandler() {}
68 68 
69void InputEventHandler::Init(UDSServer& udsServer)69void InputEventHandler::Init(UDSServer& udsServer)
70{70{
71+ CALL_DEBUG_ENTER;
71 udsServer_ = &udsServer;72 udsServer_ = &udsServer;
72 BuildInputHandlerChain();73 BuildInputHandlerChain();
73}74}
@@ -132,10 +132,10 @@ void KeyAutoRepeat::SelectAutoRepeat(const std::shared_ptr<KeyEvent>& keyEvent)
132 timerId_ = -1;132 timerId_ = -1;
133 repeatCount_ = 0;133 repeatCount_ = 0;
134 if (!JudgeLimitPrint(keyEvent_)) {134 if (!JudgeLimitPrint(keyEvent_)) {
135- MMI_HILOGI("Stop autorepeat, code:%{private}d, repeatKeyCode:%{private}d, keyAction:%{public}d",135+ MMI_HILOGI("Stop autorepeat, code:%{private}d, repeatKeyCode:%{private}d, keyAction:%{private}d",
136 keyEvent_->GetKeyCode(), repeatKeyCode_, keyEvent_->GetKeyAction());136 keyEvent_->GetKeyCode(), repeatKeyCode_, keyEvent_->GetKeyAction());
137 } else {137 } else {
138- MMI_HILOGI("Stop autorepeat, code:%{private}d, repeatKeyCode:%{private}d, keyAction:%d",138+ MMI_HILOGI("Stop autorepeat, code:%{private}d, repeatKeyCode:%{private}d, keyAction:%{private}d",
139 keyEvent_->GetKeyCode(), repeatKeyCode_, keyEvent_->GetKeyAction());139 keyEvent_->GetKeyCode(), repeatKeyCode_, keyEvent_->GetKeyAction());
140 }140 }
141 if (keyEvent_->GetKeyAction() == KeyEvent::KEY_ACTION_UP && repeatKeyCode_ != keyEvent_->GetKeyCode()) {141 if (keyEvent_->GetKeyAction() == KeyEvent::KEY_ACTION_UP && repeatKeyCode_ != keyEvent_->GetKeyCode()) {
@@ -92,7 +92,7 @@ void EventResample::EventDump(const char *msg, MotionEvent &event)
92 msg, event.pointerAction, event.actionTime, event.pointerCount,92 msg, event.pointerAction, event.actionTime, event.pointerCount,
93 event.sourceType, event.deviceId, event.eventId);93 event.sourceType, event.deviceId, event.eventId);
94 for (auto &it : event.pointers) {94 for (auto &it : event.pointers) {
95- MMI_HILOGD("ID:%{public}d, coordX:%d, coordY:%d, toolType:%{public}d",95+ MMI_HILOGD("ID:%{public}d, coordX:%{private}d, coordY:%{private}d, toolType:%{public}d",
96 it.second.id, it.second.coordX, it.second.coordY, it.second.toolType);96 it.second.id, it.second.coordX, it.second.coordY, it.second.toolType);
97 }97 }
98}98}
@@ -34,7 +34,8 @@ void EventFilterHandler::HandleKeyEvent(const std::shared_ptr<KeyEvent> keyEvent
34 }34 }
35 if (HandleKeyEventFilter(keyEvent)) {35 if (HandleKeyEventFilter(keyEvent)) {
36 DfxHisysevent::ReportKeyEvent("filter");36 DfxHisysevent::ReportKeyEvent("filter");
37- MMI_HILOGD("Key event is filtered");37+ MMI_HILOGD("Key event is filtered, keyCode:%{private}d, deviceId:%{private}d",
38+ keyEvent->GetKeyCode(), keyEvent->GetDeviceId());
38 return;39 return;
39 }40 }
40 CHKPV(nextHandler_);41 CHKPV(nextHandler_);
@@ -59,7 +60,8 @@ void EventFilterHandler::HandleTouchEvent(const std::shared_ptr<PointerEvent> po
59{60{
60 CHKPV(pointerEvent);61 CHKPV(pointerEvent);
61 if (HandlePointerEventFilter(pointerEvent)) {62 if (HandlePointerEventFilter(pointerEvent)) {
62- MMI_HILOGD("Touch event is filtered");63+ MMI_HILOGD("Touch event is filtered, pointerAction:%{private}d, deviceId:%{private}d",
64+ pointerEvent->GetPointerAction(), pointerEvent->GetDeviceId());
63 return;65 return;
64 }66 }
65 CHKPV(nextHandler_);67 CHKPV(nextHandler_);
@@ -73,7 +75,7 @@ int32_t EventFilterHandler::AddInputEventFilter(sptr<IEventFilter> filter,
73 CALL_DEBUG_ENTER;75 CALL_DEBUG_ENTER;
74 std::lock_guard<std::mutex> guard(lockFilter_);76 std::lock_guard<std::mutex> guard(lockFilter_);
75 CHKPR(filter, ERROR_NULL_POINTER);77 CHKPR(filter, ERROR_NULL_POINTER);
76- MMI_HILOGI("Add filter, filterId:%{public}d, priority:%{public}d, clientPid:%{public}d, filters_ size:%{public}zu",78+ MMI_HILOGI("Add filter, filterId:%{public}d, priority:%{public}d, clientPid:%{public}d, filters_ size:%{public}zu",
77 filterId, priority, clientPid, filters_.size());79 filterId, priority, clientPid, filters_.size());
78 80 
79 std::weak_ptr<EventFilterHandler> weakPtr = shared_from_this();81 std::weak_ptr<EventFilterHandler> weakPtr = shared_from_this();
@@ -82,10 +84,10 @@ int32_t EventFilterHandler::AddInputEventFilter(sptr<IEventFilter> filter,
82 if (sharedPtr != nullptr) {84 if (sharedPtr != nullptr) {
83 auto ret = sharedPtr->RemoveInputEventFilter(filterId, clientPid);85 auto ret = sharedPtr->RemoveInputEventFilter(filterId, clientPid);
84 if (ret != RET_OK) {86 if (ret != RET_OK) {
85- MMI_HILOGW("Remove filter on dead return:%{public}d, filterId:%{public}d, clientPid:%{public}d",87+ MMI_HILOGW("Remove filter on dead return:%{public}d, filterId:%{public}d, clientPid:%{public}d",
86 ret, filterId, clientPid);88 ret, filterId, clientPid);
87 } else {89 } else {
88- MMI_HILOGW("Remove filter on dead success, filterId:%{public}d, clientPid:%{public}d",90+ MMI_HILOGW("Remove filter on dead success, filterId:%{public}d, clientPid:%{public}d",
89 filterId, clientPid);91 filterId, clientPid);
90 }92 }
91 }93 }
@@ -104,7 +106,7 @@ int32_t EventFilterHandler::AddInputEventFilter(sptr<IEventFilter> filter,
104 }106 }
105 auto it2 = filters_.emplace(it, std::move(info));107 auto it2 = filters_.emplace(it, std::move(info));
106 if (it2 == filters_.end()) {108 if (it2 == filters_.end()) {
107- MMI_HILOGE("Fail to add filter");109+ MMI_HILOGE("Fail to add filter");
108 return ERROR_FILTER_ADD_FAIL;110 return ERROR_FILTER_ADD_FAIL;
109 }111 }
110 return RET_OK;112 return RET_OK;
@@ -115,7 +117,7 @@ int32_t EventFilterHandler::RemoveInputEventFilter(int32_t filterId, int32_t cli
115 CALL_DEBUG_ENTER;117 CALL_DEBUG_ENTER;
116 std::lock_guard<std::mutex> guard(lockFilter_);118 std::lock_guard<std::mutex> guard(lockFilter_);
117 if (filters_.empty()) {119 if (filters_.empty()) {
118- MMI_HILOGD("Filter is empty");120+ MMI_HILOGD("Filter is empty");
119 return RET_OK;121 return RET_OK;
120 }122 }
121 for (auto it = filters_.begin(); it != filters_.end();) {123 for (auto it = filters_.begin(); it != filters_.end();) {
@@ -123,7 +125,7 @@ int32_t EventFilterHandler::RemoveInputEventFilter(int32_t filterId, int32_t cli
123 if (it->clientPid == clientPid) {125 if (it->clientPid == clientPid) {
124 auto id = it->filterId;126 auto id = it->filterId;
125 filters_.erase(it++);127 filters_.erase(it++);
126- MMI_HILOGI("Filter remove success, filterId:%{public}d, clientPid:%{public}d", id, clientPid);128+ MMI_HILOGI("Filter remove success, filterId:%{public}d, clientPid:%{public}d", id, clientPid);
127 continue;129 continue;
128 }130 }
129 ++it;131 ++it;
@@ -131,7 +133,7 @@ int32_t EventFilterHandler::RemoveInputEventFilter(int32_t filterId, int32_t cli
131 }133 }
132 if (it->IsSameClient(filterId, clientPid)) {134 if (it->IsSameClient(filterId, clientPid)) {
133 filters_.erase(it++);135 filters_.erase(it++);
134- MMI_HILOGI("Filter remove success, filterId:%{public}d, clientPid:%{public}d", filterId, clientPid);136+ MMI_HILOGI("Filter remove success, filterId:%{public}d, clientPid:%{public}d", filterId, clientPid);
135 return RET_OK;137 return RET_OK;
136 }138 }
137 ++it;139 ++it;
@@ -139,7 +141,7 @@ int32_t EventFilterHandler::RemoveInputEventFilter(int32_t filterId, int32_t cli
139 if (filterId == -1) {141 if (filterId == -1) {
140 return RET_OK;142 return RET_OK;
141 }143 }
142- MMI_HILOGI("Filter not found, filterId:%{public}d, clientPid:%{public}d", filterId, clientPid);144+ MMI_HILOGI("Filter not found, filterId:%{public}d, clientPid:%{public}d", filterId, clientPid);
143 return RET_OK;145 return RET_OK;
144}146}
145 147 
@@ -164,7 +166,7 @@ bool EventFilterHandler::HandleKeyEventFilter(std::shared_ptr<KeyEvent> event)
164 }166 }
165 std::vector<KeyEvent::KeyItem> keyItems = event->GetKeyItems();167 std::vector<KeyEvent::KeyItem> keyItems = event->GetKeyItems();
166 if (keyItems.empty()) {168 if (keyItems.empty()) {
167- MMI_HILOGE("keyItems is empty");169+ MMI_HILOGE("keyItems is empty");
168 DfxHisysevent::ReportFailHandleKey("HandleKeyEventFilter", event->GetKeyCode(),170 DfxHisysevent::ReportFailHandleKey("HandleKeyEventFilter", event->GetKeyCode(),
169 DfxHisysevent::KEY_ERROR_CODE::INVALID_PARAMETER);171 DfxHisysevent::KEY_ERROR_CODE::INVALID_PARAMETER);
170 return false;172 return false;
@@ -179,7 +181,8 @@ bool EventFilterHandler::HandleKeyEventFilter(std::shared_ptr<KeyEvent> event)
179 CHKPF(i.filter);181 CHKPF(i.filter);
180 i.filter->HandleKeyEvent(event, resultValue);182 i.filter->HandleKeyEvent(event, resultValue);
181 if (resultValue) {183 if (resultValue) {
182- MMI_HILOGD("Call HandleKeyEventFilter return true");184+ MMI_HILOGD("Call HandleKeyEventFilter return true, filterId:%{public}d, clientPid:%{public}d, "
185+ "keyCode:%{private}d", i.filterId, i.clientPid, event->GetKeyCode());
183 return true;186 return true;
184 }187 }
185 }188 }
@@ -213,9 +216,11 @@ bool EventFilterHandler::HandlePointerEventFilter(std::shared_ptr<PointerEvent>
213 action == PointerEvent::POINTER_ACTION_PULL_MOVE ||216 action == PointerEvent::POINTER_ACTION_PULL_MOVE ||
214 action == PointerEvent::POINTER_ACTION_HOVER_MOVE ||217 action == PointerEvent::POINTER_ACTION_HOVER_MOVE ||
215 action == PointerEvent::POINTER_ACTION_SWIPE_UPDATE) {218 action == PointerEvent::POINTER_ACTION_SWIPE_UPDATE) {
216- MMI_HILOGD("Call HandlePointerEvent return true");219+ MMI_HILOGD("Call HandlePointerEvent return true, filterId:%{public}d, clientPid:%{public}d, "
220+ "action:%{private}d", i.filterId, i.clientPid, action);
217 } else {221 } else {
218- MMI_HILOGW("Call HandlePointerEvent return true");222+ MMI_HILOGW("Call HandlePointerEvent return true, filterId:%{public}d, clientPid:%{public}d, "
223+ "action:%{private}d", i.filterId, i.clientPid, action);
219 }224 }
220 return true;225 return true;
221 }226 }
@@ -252,7 +257,7 @@ bool EventFilterHandler::TouchPadKnuckleDoubleClickHandle(std::shared_ptr<KeyEve
252 event->GetKeyAction() != KNUCKLE_2F_DOUBLE_CLICK) {257 event->GetKeyAction() != KNUCKLE_2F_DOUBLE_CLICK) {
253 return false;258 return false;
254 }259 }
255- MMI_HILOGI("Current is touchPad knuckle double click action");260+ MMI_HILOGI("Current is touchPad knuckle double click action");
256 nextHandler_->HandleKeyEvent(event);261 nextHandler_->HandleKeyEvent(event);
257 return true;262 return true;
258}263}
@@ -138,6 +138,7 @@ int32_t InfraredEmitterController::GetFrequencies(std::vector<InfraredFrequencyI
138 std::lock_guard<std::mutex> guard(mutex_);138 std::lock_guard<std::mutex> guard(mutex_);
139 InitInfraredEmitter();139 InitInfraredEmitter();
140 if (!irInterface_) {140 if (!irInterface_) {
141+ MMI_HILOGE("Infrared emitter interface is null");
141 return ERROR_UNSUPPORTED_IR_EMITTER;142 return ERROR_UNSUPPORTED_IR_EMITTER;
142 }143 }
143 bool outRet = false;144 bool outRet = false;
@@ -68,7 +68,8 @@ void EventInterceptorHandler::HandlePointerEvent(const std::shared_ptr<PointerEv
68 CHKPV(pointerEvent);68 CHKPV(pointerEvent);
69 if (OnHandleEvent(pointerEvent)) {69 if (OnHandleEvent(pointerEvent)) {
70 BytraceAdapter::StartBytrace(pointerEvent, BytraceAdapter::TRACE_STOP);70 BytraceAdapter::StartBytrace(pointerEvent, BytraceAdapter::TRACE_STOP);
71- MMI_HILOGD("Interception is succeeded");71+ MMI_HILOGD("Interception is succeeded, pointerAction:%{private}d, id:%{public}d",
72+ pointerEvent->GetPointerAction(), pointerEvent->GetId());
72 return;73 return;
73 }74 }
74 CHKPV(nextHandler_);75 CHKPV(nextHandler_);
@@ -82,7 +83,8 @@ void EventInterceptorHandler::HandleTouchEvent(const std::shared_ptr<PointerEven
82 CHKPV(pointerEvent);83 CHKPV(pointerEvent);
83 if (OnHandleEvent(pointerEvent)) {84 if (OnHandleEvent(pointerEvent)) {
84 BytraceAdapter::StartBytrace(pointerEvent, BytraceAdapter::TRACE_STOP);85 BytraceAdapter::StartBytrace(pointerEvent, BytraceAdapter::TRACE_STOP);
85- MMI_HILOGD("Interception is succeeded");86+ MMI_HILOGD("Interception is succeeded, pointerAction:%{private}d, id:%{public}d",
87+ pointerEvent->GetPointerAction(), pointerEvent->GetId());
86 return;88 return;
87 }89 }
88 CHKPV(nextHandler_);90 CHKPV(nextHandler_);
@@ -123,6 +125,7 @@ bool EventInterceptorHandler::OnHandleEvent(std::shared_ptr<KeyEvent> keyEvent)
123{125{
124 CHKPF(keyEvent);126 CHKPF(keyEvent);
125 if (keyEvent->HasFlag(InputEvent::EVENT_FLAG_NO_INTERCEPT)) {127 if (keyEvent->HasFlag(InputEvent::EVENT_FLAG_NO_INTERCEPT)) {
128+ MMI_HILOGD("Key event:%{private}d has been tagged as not to be intercepted", keyEvent->GetKeyCode());
126 return false;129 return false;
127 }130 }
128 return interceptors_.HandleEvent(keyEvent);131 return interceptors_.HandleEvent(keyEvent);
@@ -165,10 +165,11 @@ void KeyCommandHandler::HandlePointerEvent(const std::shared_ptr<PointerEvent> p
165 CHKPV(pointerEvent);165 CHKPV(pointerEvent);
166 if (OnHandleEvent(pointerEvent)) {166 if (OnHandleEvent(pointerEvent)) {
167 if (EventLogHelper::IsBetaVersion() && !pointerEvent->HasFlag(InputEvent::EVENT_FLAG_PRIVACY_MODE)) {167 if (EventLogHelper::IsBetaVersion() && !pointerEvent->HasFlag(InputEvent::EVENT_FLAG_PRIVACY_MODE)) {
168- MMI_HILOGD("The pointerEvent start launch an ability, pointAction:%{public}s",168+ MMI_HILOGD("The pointerEvent start launch an ability, pointAction:%{private}s",
169 pointerEvent->DumpPointerAction());169 pointerEvent->DumpPointerAction());
170 } else {170 } else {
171- MMI_HILOGD("The pointerEvent start launch an ability, pointAction:%s", pointerEvent->DumpPointerAction());171+ MMI_HILOGD("The pointerEvent start launch an ability, pointAction:%{private}s",
172+ pointerEvent->DumpPointerAction());
172 }173 }
173 }174 }
174 CHKPV(nextHandler_);175 CHKPV(nextHandler_);
@@ -552,7 +553,7 @@ void KeyCommandHandler::CreateStatusConfigObserver(T& item)
552 MMI_HILOGE("Get value from setting date fail");553 MMI_HILOGE("Get value from setting date fail");
553 return;554 return;
554 }555 }
555- MMI_HILOGD("Config changed key:%s, value:%{public}d", key.c_str(), statusValue);556+ MMI_HILOGD("Config changed key:%{public}s, value:%{public}d", key.c_str(), statusValue);
556 item.statusConfigValue = statusValue;557 item.statusConfigValue = statusValue;
557 };558 };
558 sptr<SettingObserver> statusObserver = SettingDataShare::GetInstance(MULTIMODAL_INPUT_SERVICE_ID)559 sptr<SettingObserver> statusObserver = SettingDataShare::GetInstance(MULTIMODAL_INPUT_SERVICE_ID)
@@ -569,7 +570,7 @@ void KeyCommandHandler::CreateStatusConfigObserver(T& item)
569 MMI_HILOGE("Get value from setting date fail");570 MMI_HILOGE("Get value from setting date fail");
570 return;571 return;
571 }572 }
572- MMI_HILOGD("Get value success key:%s, value:%{public}d", item.statusConfig.c_str(), configVlaue);573+ MMI_HILOGD("Get value success key:%{public}s, value:%{public}d", item.statusConfig.c_str(), configVlaue);
573 item.statusConfigValue = configVlaue;574 item.statusConfigValue = configVlaue;
574}575}
575 576 
@@ -1105,7 +1106,7 @@ void KeyCommandHandler::CallMistouchPrevention()
1105 if (mistouchLibHandle_ == nullptr) {1106 if (mistouchLibHandle_ == nullptr) {
1106 mistouchLibHandle_ = dlopen(LOADMISTOUCH_LIBPATH, RTLD_LAZY);1107 mistouchLibHandle_ = dlopen(LOADMISTOUCH_LIBPATH, RTLD_LAZY);
1107 if (!mistouchLibHandle_) {1108 if (!mistouchLibHandle_) {
1108- MMI_HILOGE("Failed to load library: %s", dlerror());1109+ MMI_HILOGE("Failed to load library: %{public}s", dlerror());
1109 return;1110 return;
1110 }1111 }
1111 typedef IMistouchPrevention* (*funCreate_ptr) (void);1112 typedef IMistouchPrevention* (*funCreate_ptr) (void);
@@ -91,7 +91,7 @@ bool KeyConfigParser::ParseExcludeConfig()
91 return ParseExcludeJson(defaultConfig);91 return ParseExcludeJson(defaultConfig);
92 }92 }
93 std::string customConfig = filePath;93 std::string customConfig = filePath;
94- MMI_HILOGD("The exclude_keys_config.json file path:%s", customConfig.c_str());94+ MMI_HILOGD("The exclude_keys_config.json file path:%{public}s", customConfig.c_str());
95 return ParseExcludeJson(customConfig) || ParseExcludeJson(defaultConfig);95 return ParseExcludeJson(customConfig) || ParseExcludeJson(defaultConfig);
96}96}
97 97 
@@ -304,9 +304,9 @@ void KeyConfigParser::Print()
304 MMI_HILOGI("The row:%{public}d", row++);304 MMI_HILOGI("The row:%{public}d", row++);
305 auto &shortcutKey = item.second;305 auto &shortcutKey = item.second;
306 for (const auto &prekey : shortcutKey.preKeys) {306 for (const auto &prekey : shortcutKey.preKeys) {
307- MMI_HILOGI("The preKey:%d", prekey);307+ MMI_HILOGI("The preKey:%{private}d", prekey);
308 }308 }
309- MMI_HILOGI("The finalKey:%d, keyDownDuration:%{public}d, triggerType:%{public}d,"309+ MMI_HILOGI("The finalKey:%{private}d, keyDownDuration:%{private}d, triggerType:%{public}d,"
310 " bundleName:%{public}s, abilityName:%{public}s", shortcutKey.finalKey,310 " bundleName:%{public}s, abilityName:%{public}s", shortcutKey.finalKey,
311 shortcutKey.keyDownDuration, shortcutKey.triggerType,311 shortcutKey.keyDownDuration, shortcutKey.triggerType,
312 shortcutKey.ability.bundleName.c_str(), shortcutKey.ability.abilityName.c_str());312 shortcutKey.ability.bundleName.c_str(), shortcutKey.ability.abilityName.c_str());
@@ -47,10 +47,10 @@ int32_t LongPressSubscriberHandler::SubscribeLongPressEvent(SessionPtr sess, int
47{47{
48 CALL_DEBUG_ENTER;48 CALL_DEBUG_ENTER;
49 CHKPR(sess, ERROR_NULL_POINTER);49 CHKPR(sess, ERROR_NULL_POINTER);
50- MMI_HILOGD("SubscribeId:%{public}d, fingerCount:%{public}d, duration:%{public}d",50+ MMI_HILOGD("SubscribeId:%{public}d, fingerCount:%{public}d, duration:%{public}d",
51 subscribeId, longPressRequest.fingerCount, longPressRequest.duration);51 subscribeId, longPressRequest.fingerCount, longPressRequest.duration);
52 if (subscribeId < 0) {52 if (subscribeId < 0) {
53- MMI_HILOGE("Invalid subscribeId");53+ MMI_HILOGE("Invalid subscribeId");
54 return RET_ERR;54 return RET_ERR;
55 }55 }
56 56 
@@ -69,7 +69,7 @@ int32_t LongPressSubscriberHandler::UnsubscribeLongPressEvent(SessionPtr sess, i
69 CALL_DEBUG_ENTER;69 CALL_DEBUG_ENTER;
70 CHKPR(sess, ERROR_NULL_POINTER);70 CHKPR(sess, ERROR_NULL_POINTER);
71 if (subscribeId < 0) {71 if (subscribeId < 0) {
72- MMI_HILOGE("Invalid subscribeId:%{public}d", subscribeId);72+ MMI_HILOGE("Invalid subscribeId:%{public}d", subscribeId);
73 return RET_ERR;73 return RET_ERR;
74 }74 }
75 75 
@@ -85,12 +85,12 @@ int32_t LongPressSubscriberHandler::UnsubscribeLongPressEvent(SessionPtr sess, i
85 }85 }
86 RemoveDurationTimer(fingerCount, duration);86 RemoveDurationTimer(fingerCount, duration);
87 RemoveSessSubscriber(sess, subscribeId);87 RemoveSessSubscriber(sess, subscribeId);
88- MMI_HILOGD("UnsubscribeLongPressEvent successed with %{public}d", subscribeId);88+ MMI_HILOGD("UnsubscribeLongPressEvent successed with %{public}d", subscribeId);
89 return RET_OK;89 return RET_OK;
90 }90 }
91 }91 }
92 }92 }
93- MMI_HILOGE("UnsubscribeLongPressEvent failed with %{public}d", subscribeId);93+ MMI_HILOGE("UnsubscribeLongPressEvent failed with %{public}d", subscribeId);
94 return RET_ERR;94 return RET_ERR;
95}95}
96 96 
@@ -142,7 +142,7 @@ void LongPressSubscriberHandler::RemoveSessSubscriber(SessionPtr sess, int32_t s
142 CHKPV(sess);142 CHKPV(sess);
143 auto it = sessManager_.find(sess);143 auto it = sessManager_.find(sess);
144 if (it == sessManager_.end()) {144 if (it == sessManager_.end()) {
145- MMI_HILOGE("Not found the sess");145+ MMI_HILOGE("Not found the sess");
146 return;146 return;
147 }147 }
148 std::vector<std::shared_ptr<Subscriber>> &subscribers = it->second;148 std::vector<std::shared_ptr<Subscriber>> &subscribers = it->second;
@@ -160,11 +160,11 @@ void LongPressSubscriberHandler::RemoveSessSubscriber(SessionPtr sess, int32_t s
160void LongPressSubscriberHandler::OnSubscribeLongPressEvent(int32_t fingerCount, int32_t duration)160void LongPressSubscriberHandler::OnSubscribeLongPressEvent(int32_t fingerCount, int32_t duration)
161{161{
162 CALL_DEBUG_ENTER;162 CALL_DEBUG_ENTER;
163- MMI_HILOGD("FingerCount:%{public}d, duration:%{public}d", fingerCount, duration);163+ MMI_HILOGD("FingerCount:%{public}d, duration:%{public}d", fingerCount, duration);
164 auto pair = std::make_pair(fingerCount, duration);164 auto pair = std::make_pair(fingerCount, duration);
165 auto it = subscriberInfos_.find(pair);165 auto it = subscriberInfos_.find(pair);
166 if (subscriberInfos_.find(pair) == subscriberInfos_.end()) {166 if (subscriberInfos_.find(pair) == subscriberInfos_.end()) {
167- MMI_HILOGE("Not found the subscriber, fingerCount:%{public}d, duration:%{public}d",167+ MMI_HILOGE("Not found the subscriber, fingerCount:%{public}d, duration:%{public}d",
168 fingerCount, duration);168 fingerCount, duration);
169 return;169 return;
170 }170 }
@@ -184,7 +184,7 @@ void LongPressSubscriberHandler::InsertSubScriber(const std::shared_ptr<Subscrib
184 std::vector<std::shared_ptr<Subscriber>> &subscribers = it->second;184 std::vector<std::shared_ptr<Subscriber>> &subscribers = it->second;
185 for (const auto &sub : subscribers) {185 for (const auto &sub : subscribers) {
186 if (subscriber->sess_ != nullptr && sub->id_ == subscriber->id_ && sub->sess_ == subscriber->sess_) {186 if (subscriber->sess_ != nullptr && sub->id_ == subscriber->id_ && sub->sess_ == subscriber->sess_) {
187- MMI_HILOGW("Repeat registration id:%{public}d, desc:%{public}s",187+ MMI_HILOGW("Repeat registration id:%{public}d, desc:%{public}s",
188 subscriber->id_, subscriber->sess_->GetDescript().c_str());188 subscriber->id_, subscriber->sess_->GetDescript().c_str());
189 return;189 return;
190 }190 }
@@ -238,7 +238,7 @@ void LongPressSubscriberHandler::HandleFingerGestureDownEvent(const std::shared_
238 }238 }
239 fingerGesture_.touches[fingerCount - 1].downTime = item.GetDownTime();239 fingerGesture_.touches[fingerCount - 1].downTime = item.GetDownTime();
240 } else {240 } else {
241- MMI_HILOGD("The number of finger count is not 1 or 2");241+ MMI_HILOGD("The number of finger count is not 1 or 2");
242 return;242 return;
243 }243 }
244 if (fingerCount == static_cast<size_t>(ONE_FINGER)) {244 if (fingerCount == static_cast<size_t>(ONE_FINGER)) {
@@ -249,13 +249,13 @@ void LongPressSubscriberHandler::HandleFingerGestureDownEvent(const std::shared_
249 auto secondFinger = fingerGesture_.touches[1];249 auto secondFinger = fingerGesture_.touches[1];
250 auto pressTimeInterval = fabs(firstFinger.downTime - secondFinger.downTime);250 auto pressTimeInterval = fabs(firstFinger.downTime - secondFinger.downTime);
251 if (pressTimeInterval > TWO_FINGERS_TIME_LIMIT) {251 if (pressTimeInterval > TWO_FINGERS_TIME_LIMIT) {
252- MMI_HILOGI("Two fingers time too long firstdownTime:%{public}" PRId64 ",seconddownTime:%{public}" PRId64,252+ MMI_HILOGI("Two fingers time too long firstdownTime:%{public}" PRId64 ",seconddownTime:%{public}" PRId64,
253 firstFinger.downTime, secondFinger.downTime);253 firstFinger.downTime, secondFinger.downTime);
254 return;254 return;
255 }255 }
256 StartFingerGesture(TWO_FINGER);256 StartFingerGesture(TWO_FINGER);
257 } else {257 } else {
258- MMI_HILOGW("The number of finger count is not 1 or 2");258+ MMI_HILOGW("The number of finger count is not 1 or 2");
259 StopFingerGesture();259 StopFingerGesture();
260 }260 }
261}261}
@@ -265,12 +265,12 @@ void LongPressSubscriberHandler::HandleFingerGestureMoveEvent(const std::shared_
265 CALL_DEBUG_ENTER;265 CALL_DEBUG_ENTER;
266 CHKPV(touchEvent);266 CHKPV(touchEvent);
267 if (isAllTimerClosed) {267 if (isAllTimerClosed) {
268- MMI_HILOGD("Finger gesture has stopped");268+ MMI_HILOGD("Finger gesture has stopped");
269 return;269 return;
270 }270 }
271 auto fingerCount = touchEvent->GetPointerIds().size();271 auto fingerCount = touchEvent->GetPointerIds().size();
272 if (fingerCount > static_cast<size_t>(TWO_FINGER)) {272 if (fingerCount > static_cast<size_t>(TWO_FINGER)) {
273- MMI_HILOGE("Not support more than two finger gesture");273+ MMI_HILOGE("Not support more than two finger gesture");
274 return;274 return;
275 }275 }
276 int32_t id = touchEvent->GetPointerId();276 int32_t id = touchEvent->GetPointerId();
@@ -279,7 +279,7 @@ void LongPressSubscriberHandler::HandleFingerGestureMoveEvent(const std::shared_
279 auto pos = std::find_if(std::begin(fingerGesture_.touches), std::end(fingerGesture_.touches),279 auto pos = std::find_if(std::begin(fingerGesture_.touches), std::end(fingerGesture_.touches),
280 [id](const auto& item) { return item.id == id; });280 [id](const auto& item) { return item.id == id; });
281 if (pos == std::end(fingerGesture_.touches)) {281 if (pos == std::end(fingerGesture_.touches)) {
282- MMI_HILOGE("Cant't find the pointer id");282+ MMI_HILOGE("Cant't find the pointer id");
283 return;283 return;
284 }284 }
285 int32_t dx = -1;285 int32_t dx = -1;
@@ -293,7 +293,7 @@ void LongPressSubscriberHandler::HandleFingerGestureMoveEvent(const std::shared_
293 }293 }
294 auto moveDistance = sqrt(pow(dx, TWO_FINGER) + pow(dy, TWO_FINGER));294 auto moveDistance = sqrt(pow(dx, TWO_FINGER) + pow(dy, TWO_FINGER));
295 if (moveDistance > TOUCH_MOVE_THRESHOLD) {295 if (moveDistance > TOUCH_MOVE_THRESHOLD) {
296- MMI_HILOGD("Finger movement distance greater than 15PX, defaultDistance:%{public}d, moveDistance:%{public}f",296+ MMI_HILOGD("Finger movement distance greater than 15PX, defaultDistance:%{public}d, moveDistance:%{public}f",
297 TOUCH_MOVE_THRESHOLD, moveDistance);297 TOUCH_MOVE_THRESHOLD, moveDistance);
298 CheckFingerGestureCancelEvent(touchEvent);298 CheckFingerGestureCancelEvent(touchEvent);
299 StopFingerGesture();299 StopFingerGesture();
@@ -305,11 +305,11 @@ void LongPressSubscriberHandler::HandleFingerGestureUpEvent(const std::shared_pt
305 CALL_DEBUG_ENTER;305 CALL_DEBUG_ENTER;
306 CHKPV(touchEvent);306 CHKPV(touchEvent);
307 if (isAllTimerClosed) {307 if (isAllTimerClosed) {
308- MMI_HILOGD("Finger gesture has stopped");308+ MMI_HILOGD("Finger gesture has stopped");
309 return;309 return;
310 }310 }
311 if (touchEvent->GetPointerIds().size() > static_cast<size_t>(TWO_FINGER)) {311 if (touchEvent->GetPointerIds().size() > static_cast<size_t>(TWO_FINGER)) {
312- MMI_HILOGE("Not support more than two finger gesture");312+ MMI_HILOGE("Not support more than two finger gesture");
313 return;313 return;
314 }314 }
315 CheckFingerGestureCancelEvent(touchEvent);315 CheckFingerGestureCancelEvent(touchEvent);
@@ -323,13 +323,13 @@ void LongPressSubscriberHandler::CheckFingerGestureCancelEvent(const std::shared
323 auto fingerCount = touchEvent->GetPointerIds().size();323 auto fingerCount = touchEvent->GetPointerIds().size();
324 size_t index = fingerCount - 1;324 size_t index = fingerCount - 1;
325 if (index < 0 || index > static_cast<size_t>(ONE_FINGER)) {325 if (index < 0 || index > static_cast<size_t>(ONE_FINGER)) {
326- MMI_HILOGE("Not support more than two finger gesture");326+ MMI_HILOGE("Not support more than two finger gesture");
327 return;327 return;
328 }328 }
329 int64_t currentTime = touchEvent->GetActionTime() - fingerGesture_.touches[index].downTime;329 int64_t currentTime = touchEvent->GetActionTime() - fingerGesture_.touches[index].downTime;
330 if (!durationTimers_.empty()) {330 if (!durationTimers_.empty()) {
331 if (currentTime < durationTimers_[0].duration * MS_TO_US) {331 if (currentTime < durationTimers_[0].duration * MS_TO_US) {
332- MMI_HILOGD("The current time is earlier than the minimum delay, the cancel event does not need to be sent");332+ MMI_HILOGD("The current time is earlier than the minimum delay, the cancel event does not need to be sent");
333 return;333 return;
334 }334 }
335 }335 }
@@ -364,7 +364,7 @@ void LongPressSubscriberHandler::OnSubscribeLongPressCancelEvent(SessionPtr sess
364 CALL_DEBUG_ENTER;364 CALL_DEBUG_ENTER;
365 auto it = sessManager_.find(sess);365 auto it = sessManager_.find(sess);
366 if (it == sessManager_.end()) {366 if (it == sessManager_.end()) {
367- MMI_HILOGE("Not found the sess");367+ MMI_HILOGE("Not found the sess");
368 return;368 return;
369 }369 }
370 const std::vector<std::shared_ptr<Subscriber>> &subscribers = sessManager_.at(sess);370 const std::vector<std::shared_ptr<Subscriber>> &subscribers = sessManager_.at(sess);
@@ -415,21 +415,21 @@ bool LongPressSubscriberHandler::CheckFingerGestureAction(int32_t fingerCount) c
415 auto firstFinger = fingerGesture_.touches[0];415 auto firstFinger = fingerGesture_.touches[0];
416 if (firstFinger.x <= leftLimit || firstFinger.x >= rightLimit ||416 if (firstFinger.x <= leftLimit || firstFinger.x >= rightLimit ||
417 firstFinger.y <= topLimit || firstFinger.y >= bottomLimit) {417 firstFinger.y <= topLimit || firstFinger.y >= bottomLimit) {
418- MMI_HILOGI("Any finger out of region");418+ MMI_HILOGI("Any finger out of region");
419 return false;419 return false;
420 }420 }
421 if (fingerCount == TWO_FINGER) {421 if (fingerCount == TWO_FINGER) {
422 auto secondFinger = fingerGesture_.touches[1];422 auto secondFinger = fingerGesture_.touches[1];
423 if (secondFinger.x <= leftLimit || secondFinger.x >= rightLimit ||423 if (secondFinger.x <= leftLimit || secondFinger.x >= rightLimit ||
424 secondFinger.y <= topLimit || secondFinger.y >= bottomLimit) {424 secondFinger.y <= topLimit || secondFinger.y >= bottomLimit) {
425- MMI_HILOGI("Any finger out of region");425+ MMI_HILOGI("Any finger out of region");
426 return false;426 return false;
427 }427 }
428 auto devX = firstFinger.x - secondFinger.x;428 auto devX = firstFinger.x - secondFinger.x;
429 auto devY = firstFinger.y - secondFinger.y;429 auto devY = firstFinger.y - secondFinger.y;
430 auto distance = sqrt(pow(devX, TWO_FINGER) + pow(devY, TWO_FINGER));430 auto distance = sqrt(pow(devX, TWO_FINGER) + pow(devY, TWO_FINGER));
431 if (distance < ConvertVPToPX(TWO_FINGERS_DISTANCE_LIMIT)) {431 if (distance < ConvertVPToPX(TWO_FINGERS_DISTANCE_LIMIT)) {
432- MMI_HILOGI("Two fingers distance:%{public}f too small", distance);432+ MMI_HILOGI("Two fingers distance:%{public}f too small", distance);
433 return false;433 return false;
434 }434 }
435 }435 }
@@ -440,7 +440,7 @@ bool LongPressSubscriberHandler::InitSessionDeleteCallback()
440{440{
441 CALL_DEBUG_ENTER;441 CALL_DEBUG_ENTER;
442 if (callbackInitialized_) {442 if (callbackInitialized_) {
443- MMI_HILOGD("Session delete callback has already been initialized");443+ MMI_HILOGD("Session delete callback has already been initialized");
444 return true;444 return true;
445 }445 }
446 auto udsServerPtr = InputHandler->GetUDSServer();446 auto udsServerPtr = InputHandler->GetUDSServer();
@@ -478,6 +478,7 @@ int32_t LongPressSubscriberHandler::GetBundleName(std::string &bundleName, int32
478 bundleName = sess->GetProgramName();478 bundleName = sess->GetProgramName();
479 return RET_OK;479 return RET_OK;
480 }480 }
481+ MMI_HILOGD("Session not found, windowPid:%{public}d", windowPid);
481 return RET_ERR;482 return RET_ERR;
482}483}
483 484 
@@ -488,19 +489,19 @@ void LongPressSubscriberHandler::NotifySubscriber(std::shared_ptr<Subscriber> su
488 auto udsServerPtr = InputHandler->GetUDSServer();489 auto udsServerPtr = InputHandler->GetUDSServer();
489 CHKPV(udsServerPtr);490 CHKPV(udsServerPtr);
490 if (subscriber->sess_ == nullptr) {491 if (subscriber->sess_ == nullptr) {
491- MMI_HILOGE("Subscriber's sess is null");492+ MMI_HILOGE("Subscriber's sess is null");
492 return;493 return;
493 }494 }
494 CHKPV(touchEvent_);495 CHKPV(touchEvent_);
495 int32_t windowPid = WIN_MGR->GetWindowAgentPid(touchEvent_->GetTargetWindowId());496 int32_t windowPid = WIN_MGR->GetWindowAgentPid(touchEvent_->GetTargetWindowId());
496 if (windowPid == RET_ERR) {497 if (windowPid == RET_ERR) {
497- MMI_HILOGE("Get window pid failed");498+ MMI_HILOGE("Get window pid failed");
498 return;499 return;
499 }500 }
500 501 
501 std::string bundleName;502 std::string bundleName;
502 if (GetBundleName(bundleName, windowPid) == RET_ERR) {503 if (GetBundleName(bundleName, windowPid) == RET_ERR) {
503- MMI_HILOGE("Failed to get bundle name, pid %{public}d", windowPid);504+ MMI_HILOGE("Failed to get bundle name, pid %{public}d", windowPid);
504 }505 }
505 int32_t id = touchEvent_->GetPointerId();506 int32_t id = touchEvent_->GetPointerId();
506 PointerEvent::PointerItem item;507 PointerEvent::PointerItem item;
@@ -523,13 +524,13 @@ void LongPressSubscriberHandler::NotifySubscriber(std::shared_ptr<Subscriber> su
523 InputEventDataTransformation::LongPressEventToNetPacket(longPressEvent, pkt);524 InputEventDataTransformation::LongPressEventToNetPacket(longPressEvent, pkt);
524 int32_t fd = subscriber->sess_->GetFd();525 int32_t fd = subscriber->sess_->GetFd();
525 pkt << fd << subscriber->id_;526 pkt << fd << subscriber->id_;
526- MMI_HILOGI("Notify subscriber id:%{public}d, pid:%{public}d", subscriber->id_, subscriber->sess_->GetPid());527+ MMI_HILOGI("Notify subscriber id:%{public}d, pid:%{public}d", subscriber->id_, subscriber->sess_->GetPid());
527 if (pkt.ChkRWError()) {528 if (pkt.ChkRWError()) {
528- MMI_HILOGE("Packet write dispatch subscriber failed");529+ MMI_HILOGE("Packet write dispatch subscriber failed");
529 return;530 return;
530 }531 }
531 if (!udsServerPtr->SendMsg(fd, pkt)) {532 if (!udsServerPtr->SendMsg(fd, pkt)) {
532- MMI_HILOGE("Leave, server dispatch subscriber failed");533+ MMI_HILOGE("Leave, server dispatch subscriber failed");
533 }534 }
534}535}
535} // namespace MMI536} // namespace MMI
@@ -52,7 +52,7 @@ bool ShortKeyHandler::HandleShortKeys(const std::shared_ptr<KeyEvent> keyEvent)
52 return false;52 return false;
53 }53 }
54 if (currentLaunchAbilityKey_.timerId >= 0 && IsKeyMatch(currentLaunchAbilityKey_, keyEvent)) {54 if (currentLaunchAbilityKey_.timerId >= 0 && IsKeyMatch(currentLaunchAbilityKey_, keyEvent)) {
55- MMI_HILOGD("repeat, current key %d has launched ability", currentLaunchAbilityKey_.finalKey);55+ MMI_HILOGD("repeat, current key %{private}d has launched ability", currentLaunchAbilityKey_.finalKey);
56 return true;56 return true;
57 }57 }
58 DfxHisysevent::GetComboStartTime();58 DfxHisysevent::GetComboStartTime();
@@ -197,7 +197,7 @@ bool ShortKeyHandler::HandleKeyDown(ShortcutKey &shortcutKey)
197 auto handler = InputHandler->GetSubscriberHandler();197 auto handler = InputHandler->GetSubscriberHandler();
198 CHKPF(handler);198 CHKPF(handler);
199 if (handler->IsKeyEventSubscribed(shortcutKey.finalKey, shortcutKey.triggerType)) {199 if (handler->IsKeyEventSubscribed(shortcutKey.finalKey, shortcutKey.triggerType)) {
200- MMI_HILOGI("Current shortcutKey %d is subSubcribed", shortcutKey.finalKey);200+ MMI_HILOGI("Current shortcutKey %{private}d is subSubcribed", shortcutKey.finalKey);
201 return false;201 return false;
202 }202 }
203 return true;203 return true;
@@ -129,6 +129,9 @@ void TwoFingerGestureHandler::StartTwoFingerGesture()
129 DfxHisysevent::ReportPointerEventExitTimes(PointerEventStatistics::AIBASE_GESTURE);129 DfxHisysevent::ReportPointerEventExitTimes(PointerEventStatistics::AIBASE_GESTURE);
130#endif // OHOS_BUILD_ENABLE_DFX_RADAR130#endif // OHOS_BUILD_ENABLE_DFX_RADAR
131 }, "TwoFingerGestureHandler-StartTwoFingerGesture");131 }, "TwoFingerGestureHandler-StartTwoFingerGesture");
132+ MMI_HILOGD("Two-finger gesture timer is started, timerId:%{public}d, "
133+ "abilityStartDelay:%{public}" PRId64, context_.twoFingerGesture_.timerId,
134+ context_.twoFingerGesture_.abilityStartDelay);
132}135}
133 136 
134void TwoFingerGestureHandler::StopTwoFingerGesture()137void TwoFingerGestureHandler::StopTwoFingerGesture()
@@ -222,6 +225,7 @@ int32_t TwoFingerGestureHandler::CheckTwoFingerGesture(int32_t pid)
222int32_t TwoFingerGestureHandler::LaunchAiScreenAbility(int32_t pid)225int32_t TwoFingerGestureHandler::LaunchAiScreenAbility(int32_t pid)
223{226{
224 if (CheckTwoFingerGesture(pid) != RET_OK) {227 if (CheckTwoFingerGesture(pid) != RET_OK) {
228+ MMI_HILOGD("Check two finger gesture failed, pid:%{public}d", pid);
225 context_.twoFingerGesture_.startTime = 0;229 context_.twoFingerGesture_.startTime = 0;
226 context_.twoFingerGesture_.longPressFlag = false;230 context_.twoFingerGesture_.longPressFlag = false;
227 context_.twoFingerGesture_.windowId = -1;231 context_.twoFingerGesture_.windowId = -1;
@@ -133,7 +133,7 @@ void AuthorizationDialog::DialogAbilityConnection::CloseDialog()
133 success = reply.ReadInt32(replyCode);133 success = reply.ReadInt32(replyCode);
134 }134 }
135 isDialogShow_ = false;135 isDialogShow_ = false;
136- MMI_HILOGI("CloseDialog: ret=%d, %d, %d", ret, success, replyCode);136+ MMI_HILOGI("CloseDialog: ret=%{public}d, %{public}d, %{public}d", ret, success, replyCode);
137}137}
138 138 
139void AuthorizationDialog::DialogAbilityConnection::OpenDialog()139void AuthorizationDialog::DialogAbilityConnection::OpenDialog()
@@ -110,19 +110,19 @@ int32_t AuthorizeHelper::AddAuthorizeProcess(int32_t pid, AuthorizeExitCallback
110{110{
111 CALL_DEBUG_ENTER;111 CALL_DEBUG_ENTER;
112 if (!isInit_) {112 if (!isInit_) {
113- MMI_HILOGI("Not init");113+ MMI_HILOGW("Not init");
114 return RET_ERR;114 return RET_ERR;
115 }115 }
116 116 
117 if (pid <= 0) {117 if (pid <= 0) {
118- MMI_HILOGI("Invalid process id, pid:%{public}d", pid);118+ MMI_HILOGW("Invalid process id, pid:%{public}d", pid);
119 return RET_ERR;119 return RET_ERR;
120 }120 }
121 121 
122 std::lock_guard<std::mutex> lock(mutex_);122 std::lock_guard<std::mutex> lock(mutex_);
123 if (state_ == AuthorizeState::STATE_UNAUTHORIZE) {123 if (state_ == AuthorizeState::STATE_UNAUTHORIZE) {
124 if (pid_ != INVALID_AUTHORIZE_PID) {124 if (pid_ != INVALID_AUTHORIZE_PID) {
125- MMI_HILOGI("Failed to authorize helper state.state:%{public}d,pid_:%{public}d,pid:%{public}d",125+ MMI_HILOGW("Failed to authorize helper state.state:%{public}d,pid_:%{public}d,pid:%{public}d",
126 state_, pid_, pid);126 state_, pid_, pid);
127 return RET_ERR;127 return RET_ERR;
128 }128 }
@@ -153,7 +153,7 @@ void AuthorizeHelper::CancelAuthorize(int32_t pid)
153{153{
154 CALL_DEBUG_ENTER;154 CALL_DEBUG_ENTER;
155 if (pid <= 0) {155 if (pid <= 0) {
156- MMI_HILOGI("Invalid process id, pid:%{public}d", pid);156+ MMI_HILOGW("Invalid process id, pid:%{public}d", pid);
157 return;157 return;
158 }158 }
159 std::lock_guard<std::mutex> lock(mutex_);159 std::lock_guard<std::mutex> lock(mutex_);
@@ -413,6 +413,8 @@ int32_t ServerMsgHandler::OnInjectPointerEventExt(int32_t userId,
413 }413 }
414 WIN_MGR->ProcessInjectEventGlobalXY(pointerEvent, useCoordinate);414 WIN_MGR->ProcessInjectEventGlobalXY(pointerEvent, useCoordinate);
415 if (!FixTargetWindowId(pointerEvent, pointerEvent->GetPointerAction(), isShell, useCoordinate)) {415 if (!FixTargetWindowId(pointerEvent, pointerEvent->GetPointerAction(), isShell, useCoordinate)) {
416+ MMI_HILOGD("Fix target window id failed, pointerAction:%{private}d, deviceId:%{private}d",
417+ pointerEvent->GetPointerAction(), pointerEvent->GetDeviceId());
416 return RET_ERR;418 return RET_ERR;
417 }419 }
418 DealGesturePointers(pointerEvent);420 DealGesturePointers(pointerEvent);
@@ -553,7 +555,7 @@ int32_t ServerMsgHandler::AccelerateMotion(int32_t userId, std::shared_ptr<Point
553 return ret;555 return ret;
554 }556 }
555 WIN_MGR->UpdateAndAdjustMouseLocation(cursorPos.displayId, cursorPos.cursorPos.x, cursorPos.cursorPos.y);557 WIN_MGR->UpdateAndAdjustMouseLocation(cursorPos.displayId, cursorPos.cursorPos.x, cursorPos.cursorPos.y);
556- MMI_HILOGD("Cursor move to (x:%.2f, y:%.2f, DisplayId:%d)",558+ MMI_HILOGD("Cursor move to (x:%{private}.2f, y:%{private}.2f, DisplayId:%{public}d)",
557 cursorPos.cursorPos.x, cursorPos.cursorPos.y, cursorPos.displayId);559 cursorPos.cursorPos.x, cursorPos.cursorPos.y, cursorPos.displayId);
558 return RET_OK;560 return RET_OK;
559}561}
@@ -621,7 +623,7 @@ int32_t ServerMsgHandler::AccelerateMotionTouchpad(int32_t userId, std::shared_p
621 return ret;623 return ret;
622 }624 }
623 WIN_MGR->UpdateAndAdjustMouseLocation(cursorPos.displayId, cursorPos.cursorPos.x, cursorPos.cursorPos.y);625 WIN_MGR->UpdateAndAdjustMouseLocation(cursorPos.displayId, cursorPos.cursorPos.x, cursorPos.cursorPos.y);
624- MMI_HILOGD("Cursor move to (x:%.2f, y:%.2f, DisplayId:%d)",626+ MMI_HILOGD("Cursor move to (x:%{private}.2f, y:%{private}.2f, DisplayId:%{public}d)",
625 cursorPos.cursorPos.x, cursorPos.cursorPos.y, cursorPos.displayId);627 cursorPos.cursorPos.x, cursorPos.cursorPos.y, cursorPos.displayId);
626 return RET_OK;628 return RET_OK;
627}629}
@@ -783,6 +785,8 @@ int32_t ServerMsgHandler::FixTargetWindowId(std::shared_ptr<PointerEvent> pointe
783 if (iter != targetWindowIdMap.end()) {785 if (iter != targetWindowIdMap.end()) {
784 return iter->second;786 return iter->second;
785 }787 }
788+ MMI_HILOGD("Target window not found, displayId:%{public}d, pointerId:%{public}d",
789+ displayId, pointerEvent->GetPointerId());
786 return RET_ERR;790 return RET_ERR;
787}791}
788 792 
@@ -949,12 +953,15 @@ int32_t ServerMsgHandler::OnDisplayInfo(SessionPtr sess, NetPacket &pkt)
949 oldDisplayGroupInfos_.clear();953 oldDisplayGroupInfos_.clear();
950 pkt >> userScreenInfo.userId >> userScreenInfo.userState;954 pkt >> userScreenInfo.userId >> userScreenInfo.userState;
951 if (ReadScreensInfo(pkt, userScreenInfo) != RET_OK) {955 if (ReadScreensInfo(pkt, userScreenInfo) != RET_OK) {
956+ MMI_HILOGD("Read screens info failed");
952 return RET_ERR;957 return RET_ERR;
953 }958 }
954 if (ReadDisplayGroupsInfo(pkt, userScreenInfo) != RET_OK) {959 if (ReadDisplayGroupsInfo(pkt, userScreenInfo) != RET_OK) {
960+ MMI_HILOGD("Read display groups info failed");
955 return RET_ERR;961 return RET_ERR;
956 }962 }
957 if (!ChangeToOld(userScreenInfo)) {963 if (!ChangeToOld(userScreenInfo)) {
964+ MMI_HILOGD("Change to old display info failed");
958 return RET_ERR;965 return RET_ERR;
959 }966 }
960 Printf(userScreenInfo);967 Printf(userScreenInfo);
@@ -991,9 +998,11 @@ int32_t ServerMsgHandler::ReadDisplayGroupsInfo(NetPacket &pkt, UserScreenInfo &
991 pkt >> info.id >> info.name >> info.type >> info.mainDisplayId >> info.focusWindowId;998 pkt >> info.id >> info.name >> info.type >> info.mainDisplayId >> info.focusWindowId;
992 CHKRWER(pkt, RET_ERR);999 CHKRWER(pkt, RET_ERR);
993 if (ReadDisplaysInfo(pkt, info) != RET_OK) {1000 if (ReadDisplaysInfo(pkt, info) != RET_OK) {
1001+ MMI_HILOGD("Read displays info failed, displayGroupId:%{public}d", info.id);
994 return RET_ERR;1002 return RET_ERR;
995 }1003 }
996 if (ReadWindowsInfo(pkt, info, oldInfo) != RET_OK) {1004 if (ReadWindowsInfo(pkt, info, oldInfo) != RET_OK) {
1005+ MMI_HILOGE("Read windows info failed, displayGroupId:%{public}d", info.id);
997 return RET_ERR;1006 return RET_ERR;
998 }1007 }
999 userScreenInfo.displayGroups.push_back(info);1008 userScreenInfo.displayGroups.push_back(info);
@@ -1094,6 +1103,7 @@ int32_t ServerMsgHandler::OnEnhanceConfig(SessionPtr sess, NetPacket &pkt)
1094 }1103 }
1095 int32_t result = Security::SecurityComponent::SecCompEnhanceKit::SetEnhanceCfg(cfg, num);1104 int32_t result = Security::SecurityComponent::SecCompEnhanceKit::SetEnhanceCfg(cfg, num);
1096 if (result != 0) {1105 if (result != 0) {
1106+ MMI_HILOGE("SetEnhanceCfg failed, result:%{public}d", result);
1097 return RET_ERR;1107 return RET_ERR;
1098 }1108 }
1099 return RET_OK;1109 return RET_OK;
@@ -1570,7 +1580,7 @@ int32_t ServerMsgHandler::OnAuthorize(bool isAuthorize)
1570 CloseInjectNotice(pid);1580 CloseInjectNotice(pid);
1571 });1581 });
1572 if (result != RET_OK) {1582 if (result != RET_OK) {
1573- MMI_HILOGI("Authorize process failed, pid:%{public}d", authorPid);1583+ MMI_HILOGW("Authorize process failed, pid:%{public}d", authorPid);
1574 }1584 }
1575 MMI_HILOGD("Agree to apply injection,pid:%{public}d", authorPid);1585 MMI_HILOGD("Agree to apply injection,pid:%{public}d", authorPid);
1576 return ERR_OK;1586 return ERR_OK;
@@ -556,7 +556,7 @@ void MMIService::OnStart()
556 MMI_HILOGI("Set thread status flag to false");556 MMI_HILOGI("Set thread status flag to false");
557 threadStatusFlag_ = false;557 threadStatusFlag_ = false;
558 } else {558 } else {
559- MMI_HILOGI("Mmi-server Timeout");559+ MMI_HILOGW("Mmi-server Timeout");
560 }560 }
561 };561 };
562 MMI_HILOGI("Run periodical task success");562 MMI_HILOGI("Run periodical task success");
@@ -1921,6 +1921,7 @@ int32_t MMIService::CheckInputHandlerVaild(InputHandlerType handlerType)
1921 return ERROR_NO_PERMISSION;1921 return ERROR_NO_PERMISSION;
1922 }1922 }
1923#else1923#else
1924+ MMI_HILOGE("Verify system APP failed");
1924 return ERROR_NOT_SYSAPI;1925 return ERROR_NOT_SYSAPI;
1925#endif1926#endif
1926 } else if (handlerType != InputHandlerType::INTERCEPTOR) {1927 } else if (handlerType != InputHandlerType::INTERCEPTOR) {
@@ -1989,6 +1990,7 @@ ErrCode MMIService::AddPreInputHandler(int32_t handlerId, uint32_t eventType, co
1989{1990{
1990 CALL_DEBUG_ENTER;1991 CALL_DEBUG_ENTER;
1991 if (!PER_HELPER->VerifySystemApp()) {1992 if (!PER_HELPER->VerifySystemApp()) {
1993+ MMI_HILOGE("Verify system APP failed");
1992 return ERROR_NOT_SYSAPI;1994 return ERROR_NOT_SYSAPI;
1993 }1995 }
1994 if (!IsRunning()) {1996 if (!IsRunning()) {
@@ -2021,6 +2023,7 @@ ErrCode MMIService::RemovePreInputHandler(int32_t handlerId)
2021{2023{
2022 CALL_DEBUG_ENTER;2024 CALL_DEBUG_ENTER;
2023 if (!PER_HELPER->VerifySystemApp()) {2025 if (!PER_HELPER->VerifySystemApp()) {
2026+ MMI_HILOGE("Verify system APP failed");
2024 return ERROR_NOT_SYSAPI;2027 return ERROR_NOT_SYSAPI;
2025 }2028 }
2026 if (!IsRunning()) {2029 if (!IsRunning()) {
@@ -2068,7 +2071,7 @@ int32_t MMIService::ObserverAddInputHandler(int32_t pid)
2068 CHKPR(sess, ERROR_NULL_POINTER);2071 CHKPR(sess, ERROR_NULL_POINTER);
2069 napData.bundleName = sess->GetProgramName();2072 napData.bundleName = sess->GetProgramName();
2070 int32_t syncState = SUBSCRIBED;2073 int32_t syncState = SUBSCRIBED;
2071- MMI_HILOGD("AddInputHandler info to observer : pid:%{public}d, uid:%d, bundleName:%{public}s",2074+ MMI_HILOGD("AddInputHandler info to observer : pid:%{public}d, uid:%{private}d, bundleName:%{public}s",
2072 napData.pid, napData.uid, napData.bundleName.c_str());2075 napData.pid, napData.uid, napData.bundleName.c_str());
2073 NapProcess::GetInstance()->AddMmiSubscribedEventData(napData, syncState);2076 NapProcess::GetInstance()->AddMmiSubscribedEventData(napData, syncState);
2074 if (NapProcess::GetInstance()->GetNapClientPid() != UNOBSERVED) {2077 if (NapProcess::GetInstance()->GetNapClientPid() != UNOBSERVED) {
@@ -2132,7 +2135,7 @@ ErrCode MMIService::RemoveInputHandler(int32_t handlerType, uint32_t eventType,
2132 CHKPR(sess, ERROR_NULL_POINTER);2135 CHKPR(sess, ERROR_NULL_POINTER);
2133 napData.bundleName = sess->GetProgramName();2136 napData.bundleName = sess->GetProgramName();
2134 int32_t syncState = UNSUBSCRIBED;2137 int32_t syncState = UNSUBSCRIBED;
2135- MMI_HILOGD("RemoveInputHandler info to observer : pid:%{public}d, uid:%{public}d, bundleName:%{public}s",2138+ MMI_HILOGD("RemoveInputHandler info to observer : pid:%{public}d, uid:%{private}d, bundleName:%{public}s",
2136 napData.pid, napData.uid, napData.bundleName.c_str());2139 napData.pid, napData.uid, napData.bundleName.c_str());
2137 NapProcess::GetInstance()->AddMmiSubscribedEventData(napData, syncState);2140 NapProcess::GetInstance()->AddMmiSubscribedEventData(napData, syncState);
2138 if (NapProcess::GetInstance()->GetNapClientPid() != UNOBSERVED) {2141 if (NapProcess::GetInstance()->GetNapClientPid() != UNOBSERVED) {
@@ -2784,7 +2787,7 @@ ErrCode MMIService::SubscribeKeyEvent(int32_t subscribeId, const KeyOption& keyO
2784 CHKPR(sess, ERROR_NULL_POINTER);2787 CHKPR(sess, ERROR_NULL_POINTER);
2785 napData.bundleName = sess->GetProgramName();2788 napData.bundleName = sess->GetProgramName();
2786 int32_t syncState = SUBSCRIBED;2789 int32_t syncState = SUBSCRIBED;
2787- MMI_HILOGD("SubscribeKeyEvent info to observer : pid:%{public}d, uid:%{public}d, bundleName:%{public}s",2790+ MMI_HILOGD("SubscribeKeyEvent info to observer : pid:%{public}d, uid:%{private}d, bundleName:%{public}s",
2788 napData.pid, napData.uid, napData.bundleName.c_str());2791 napData.pid, napData.uid, napData.bundleName.c_str());
2789 NapProcess::GetInstance()->AddMmiSubscribedEventData(napData, syncState);2792 NapProcess::GetInstance()->AddMmiSubscribedEventData(napData, syncState);
2790 if (NapProcess::GetInstance()->GetNapClientPid() != UNOBSERVED) {2793 if (NapProcess::GetInstance()->GetNapClientPid() != UNOBSERVED) {
@@ -2828,7 +2831,7 @@ ErrCode MMIService::UnsubscribeKeyEvent(int32_t subscribeId)
2828 CHKPR(sess, ERROR_NULL_POINTER);2831 CHKPR(sess, ERROR_NULL_POINTER);
2829 napData.bundleName = sess->GetProgramName();2832 napData.bundleName = sess->GetProgramName();
2830 int32_t syncState = UNSUBSCRIBED;2833 int32_t syncState = UNSUBSCRIBED;
2831- MMI_HILOGD("UnsubscribeKeyEvent info to observer : pid:%{public}d, uid:%{public}d, bundleName:%{public}s",2834+ MMI_HILOGD("UnsubscribeKeyEvent info to observer : pid:%{public}d, uid:%{private}d, bundleName:%{public}s",
2832 napData.pid, napData.uid, napData.bundleName.c_str());2835 napData.pid, napData.uid, napData.bundleName.c_str());
2833 NapProcess::GetInstance()->AddMmiSubscribedEventData(napData, syncState);2836 NapProcess::GetInstance()->AddMmiSubscribedEventData(napData, syncState);
2834 if (NapProcess::GetInstance()->GetNapClientPid() != UNOBSERVED) {2837 if (NapProcess::GetInstance()->GetNapClientPid() != UNOBSERVED) {
@@ -4440,9 +4443,11 @@ ErrCode MMIService::GetTouchpadDoubleTapAndDragState(bool &switchFlag)
4440{4443{
4441 CALL_DEBUG_ENTER;4444 CALL_DEBUG_ENTER;
4442 if (!IsRunning()) {4445 if (!IsRunning()) {
4446+ MMI_HILOGE("Service is not running");
4443 return MMISERVICE_NOT_RUNNING;4447 return MMISERVICE_NOT_RUNNING;
4444 }4448 }
4445 if (!PER_HELPER->VerifySystemApp()) {4449 if (!PER_HELPER->VerifySystemApp()) {
4450+ MMI_HILOGE("Verify system APP failed");
4446 return ERROR_NOT_SYSAPI;4451 return ERROR_NOT_SYSAPI;
4447 }4452 }
4448 switchFlag = true;4453 switchFlag = true;
@@ -6512,7 +6517,7 @@ int32_t MMIService::RedispatchInputEventInner(std::shared_ptr<PointerEvent> poin
6512 int32_t realWindowId = WIN_MGR->GetRealFingerDownWindowId(6517 int32_t realWindowId = WIN_MGR->GetRealFingerDownWindowId(
6513 pointerEvent->GetDeviceId(), pointerEvent->GetPointerId());6518 pointerEvent->GetDeviceId(), pointerEvent->GetPointerId());
6514 if (realWindowId >= 0 && realWindowId == pointerEvent->GetTargetWindowId()) {6519 if (realWindowId >= 0 && realWindowId == pointerEvent->GetTargetWindowId()) {
6515- MMI_HILOGI("Redispatch DOWN conflicts with real finger in same window, "6520+ MMI_HILOGW("Redispatch DOWN conflicts with real finger in same window, "
6516 "deviceId:%{public}d pointerId:%{public}d windowId:%{public}d",6521 "deviceId:%{public}d pointerId:%{public}d windowId:%{public}d",
6517 pointerEvent->GetDeviceId(), pointerEvent->GetPointerId(), realWindowId);6522 pointerEvent->GetDeviceId(), pointerEvent->GetPointerId(), realWindowId);
6518 auto& store = WIN_MGR->GetTouchRedispatchStore();6523 auto& store = WIN_MGR->GetTouchRedispatchStore();
@@ -6540,7 +6545,7 @@ int32_t MMIService::RedispatchInputEventInner(std::shared_ptr<PointerEvent> poin
6540 }6545 }
6541#endif // OHOS_BUILD_ENABLE_POINTER6546#endif // OHOS_BUILD_ENABLE_POINTER
6542 default:6547 default:
6543- MMI_HILOGE("Unsupported sourceType:%{public}d", pointerEvent->GetSourceType());6548+ MMI_HILOGE("Unsupported sourceType:%{private}d", pointerEvent->GetSourceType());
6544 return RET_ERR;6549 return RET_ERR;
6545 }6550 }
6546 MMI_HILOGD("Redispatch, id:%{public}d, source:%{public}d",6551 MMI_HILOGD("Redispatch, id:%{public}d, source:%{public}d",
@@ -965,6 +965,7 @@ PluginResult InputPlugin::HandleEvent(std::shared_ptr<AxisEvent> axisEvent, std:
965int32_t InputPlugin::AddTimer(std::function<void()> func, int32_t intervalMs, int32_t repeatCount)965int32_t InputPlugin::AddTimer(std::function<void()> func, int32_t intervalMs, int32_t repeatCount)
966{966{
967 if (timerCnt_ >= MAX_TIMER) {967 if (timerCnt_ >= MAX_TIMER) {
968+ MMI_HILOGE("Timer count reached the maximum number:%{public}d", MAX_TIMER);
968 return RET_ERR;969 return RET_ERR;
969 }970 }
970 int32_t timerId = TimerMgr->AddTimerInternal(intervalMs, repeatCount, func, name_);971 int32_t timerId = TimerMgr->AddTimerInternal(intervalMs, repeatCount, func, name_);
@@ -212,7 +212,7 @@ NativePreferences::PreferencesValue MultiModalInputPreferencesManager::GetPreVal
212 int32_t errCode = RET_OK;212 int32_t errCode = RET_OK;
213 auto iter = preferencesMap_.find(key);213 auto iter = preferencesMap_.find(key);
214 if (iter == preferencesMap_.end()) {214 if (iter == preferencesMap_.end()) {
215- MMI_HILOGI("do not find preferences value, return defaultValue.");215+ MMI_HILOGW("do not find preferences value, return defaultValue.");
216 return defaultValue;216 return defaultValue;
217 }217 }
218 std::string filePath = "";218 std::string filePath = "";
@@ -338,12 +338,12 @@ void UDSServer::RemoveEpollEvent(int32_t fd)
338 338 
339void UDSServer::DumpSession(const std::string &title)339void UDSServer::DumpSession(const std::string &title)
340{340{
341- MMI_HILOGD("in %s: %s", __func__, title.c_str());341+ MMI_HILOGD("in %{public}s: %{public}s", __func__, title.c_str());
342 int32_t i = 0;342 int32_t i = 0;
343 auto tmpMap = GetSessionMapCopy();343 auto tmpMap = GetSessionMapCopy();
344 for (auto &[key, value] : tmpMap) {344 for (auto &[key, value] : tmpMap) {
345 CHKPV(value);345 CHKPV(value);
346- MMI_HILOGD("%d, %s", i, value->GetDescript().c_str());346+ MMI_HILOGD("%{public}d, %{public}s", i, value->GetDescript().c_str());
347 i++;347 i++;
348 }348 }
349}349}
@@ -64,12 +64,14 @@ void EventMonitorHandler::HandlePointerEvent(const std::shared_ptr<PointerEvent>
64 CHKPV(pointerEvent);64 CHKPV(pointerEvent);
65 if (OnHandleEvent(pointerEvent)) {65 if (OnHandleEvent(pointerEvent)) {
66 BytraceAdapter::StartBytrace(pointerEvent, BytraceAdapter::TRACE_STOP);66 BytraceAdapter::StartBytrace(pointerEvent, BytraceAdapter::TRACE_STOP);
67- MMI_HILOGD("Monitor is succeeded");67+ MMI_HILOGD("Monitor is succeeded, pointerAction:%{private}d, id:%{public}d",
68+ pointerEvent->GetPointerAction(), pointerEvent->GetId());
68 return;69 return;
69 }70 }
70 // This filter touch-gesture events being dispatched to applications.71 // This filter touch-gesture events being dispatched to applications.
71 // This is a quick win solution, should be optimized later.72 // This is a quick win solution, should be optimized later.
72 if (TOUCH_GESTURE_ACTIONS.find(pointerEvent->GetPointerAction()) != TOUCH_GESTURE_ACTIONS.cend()) {73 if (TOUCH_GESTURE_ACTIONS.find(pointerEvent->GetPointerAction()) != TOUCH_GESTURE_ACTIONS.cend()) {
74+ MMI_HILOGD("Touch gesture action:%{private}d filtered", pointerEvent->GetPointerAction());
73 return;75 return;
74 }76 }
75 CHKPV(nextHandler_);77 CHKPV(nextHandler_);
@@ -83,7 +85,8 @@ void EventMonitorHandler::HandleTouchEvent(const std::shared_ptr<PointerEvent> p
83 CHKPV(pointerEvent);85 CHKPV(pointerEvent);
84 if (OnHandleEvent(pointerEvent)) {86 if (OnHandleEvent(pointerEvent)) {
85 BytraceAdapter::StartBytrace(pointerEvent, BytraceAdapter::TRACE_STOP);87 BytraceAdapter::StartBytrace(pointerEvent, BytraceAdapter::TRACE_STOP);
86- MMI_HILOGD("Monitor is succeeded");88+ MMI_HILOGD("Monitor is succeeded, pointerAction:%{private}d, id:%{public}d",
89+ pointerEvent->GetPointerAction(), pointerEvent->GetId());
87 return;90 return;
88 }91 }
89 int32_t pointerId = pointerEvent->GetPointerId();92 int32_t pointerId = pointerEvent->GetPointerId();
@@ -97,6 +100,7 @@ void EventMonitorHandler::HandleTouchEvent(const std::shared_ptr<PointerEvent> p
97 // This filter touch-gesture events being dispatched to applications.100 // This filter touch-gesture events being dispatched to applications.
98 // This is a quick win solution, should be optimized later.101 // This is a quick win solution, should be optimized later.
99 if (TOUCH_GESTURE_ACTIONS.find(pointerEvent->GetPointerAction()) != TOUCH_GESTURE_ACTIONS.cend()) {102 if (TOUCH_GESTURE_ACTIONS.find(pointerEvent->GetPointerAction()) != TOUCH_GESTURE_ACTIONS.cend()) {
103+ MMI_HILOGD("Touch gesture action:%{private}d filtered", pointerEvent->GetPointerAction());
100 return;104 return;
101 }105 }
102 CHKPV(nextHandler_);106 CHKPV(nextHandler_);
@@ -197,7 +201,8 @@ bool EventMonitorHandler::OnHandleEvent(std::shared_ptr<KeyEvent> keyEvent)
197 MMI_HILOGD("This event has been tagged as not to be monitored");201 MMI_HILOGD("This event has been tagged as not to be monitored");
198 } else {202 } else {
199 if (monitors_.HandleEvent(keyEvent)) {203 if (monitors_.HandleEvent(keyEvent)) {
200- MMI_HILOGD("Key event was consumed");204+ MMI_HILOGD("Key event was consumed, keyCode:%{private}d, id:%{public}d",
205+ keyEvent->GetKeyCode(), keyEvent->GetId());
201 return true;206 return true;
202 }207 }
203 }208 }
@@ -215,7 +220,8 @@ bool EventMonitorHandler::OnHandleEvent(std::shared_ptr<PointerEvent> pointerEve
215 MMI_HILOGD("Target window has FLAG_SKIP_MONITOR, skip monitoring");220 MMI_HILOGD("Target window has FLAG_SKIP_MONITOR, skip monitoring");
216 } else {221 } else {
217 if (monitors_.HandleEvent(pointerEvent)) {222 if (monitors_.HandleEvent(pointerEvent)) {
218- MMI_HILOGD("Pointer event was monitor");223+ MMI_HILOGD("Pointer event was monitor, pointerAction:%{private}d, id:%{public}d",
224+ pointerEvent->GetPointerAction(), pointerEvent->GetId());
219 return true;225 return true;
220 }226 }
221 }227 }
@@ -197,6 +197,7 @@ void EventPreMonitorHandler::MonitorCollection::RemoveMonitor(SessionPtr sess, i
197 continue;197 continue;
198 }198 }
199 if ((*it)->handlerId_ == handlerId && (*it)->session_ == sess) {199 if ((*it)->handlerId_ == handlerId && (*it)->session_ == sess) {
200+ MMI_HILOGD("Remove pre-monitor handler, handlerId:%{public}d", handlerId);
200 it = sessionHandlers.erase(it);201 it = sessionHandlers.erase(it);
201 } else {202 } else {
202 ++it;203 ++it;
@@ -606,7 +606,7 @@ void MouseEventInterface::OnDeviceRemoved(std::shared_ptr<MouseEventInterface> s
606 CALL_DEBUG_ENTER;606 CALL_DEBUG_ENTER;
607 auto mouse = GetMouse();607 auto mouse = GetMouse();
608 if (mouse == nullptr) {608 if (mouse == nullptr) {
609- MMI_HILOGI("Mouse is nullptr");609+ MMI_HILOGE("Mouse is nullptr");
610 return;610 return;
611 }611 }
612 mouse->OnDeviceRemoved(deviceId);612 mouse->OnDeviceRemoved(deviceId);
@@ -622,7 +622,7 @@ void MouseEventInterface::OnDeviceEnabled(std::shared_ptr<MouseEventInterface> s
622 CALL_DEBUG_ENTER;622 CALL_DEBUG_ENTER;
623 auto mouse = GetMouse();623 auto mouse = GetMouse();
624 if (mouse == nullptr) {624 if (mouse == nullptr) {
625- MMI_HILOGI("Mouse is nullptr");625+ MMI_HILOGE("Mouse is nullptr");
626 return;626 return;
627 }627 }
628 mouse->OnDeviceEnabled(deviceId);628 mouse->OnDeviceEnabled(deviceId);
@@ -633,7 +633,7 @@ void MouseEventInterface::OnDeviceDisabled(std::shared_ptr<MouseEventInterface>
633 CALL_DEBUG_ENTER;633 CALL_DEBUG_ENTER;
634 auto mouse = GetMouse();634 auto mouse = GetMouse();
635 if (mouse == nullptr) {635 if (mouse == nullptr) {
636- MMI_HILOGI("Mouse is nullptr");636+ MMI_HILOGE("Mouse is nullptr");
637 return;637 return;
638 }638 }
639 mouse->OnDeviceDisabled(deviceId);639 mouse->OnDeviceDisabled(deviceId);
@@ -765,6 +765,7 @@ void MouseEventInterface::RemoveUnloadingTimer()
765 unloadTimerId_ = -1;765 unloadTimerId_ = -1;
766 }766 }
767 if (timerId >= 0) {767 if (timerId >= 0) {
768+ MMI_HILOGD("Remove unloading timer, timerId:%{public}d", timerId);
768 TimerMgr->RemoveTimer(timerId);769 TimerMgr->RemoveTimer(timerId);
769 }770 }
770}771}
@@ -187,6 +187,7 @@ void MouseEventNormalize::OnDisplayLost(int32_t displayId)
187int32_t MouseEventNormalize::GetDisplayId() const187int32_t MouseEventNormalize::GetDisplayId() const
188{188{
189 if (env_ == nullptr) {189 if (env_ == nullptr) {
190+ MMI_HILOGE("Mouse env is nullptr");
190 return RET_ERR;191 return RET_ERR;
191 }192 }
192 return MouseTransformProcessor::GetDisplayId(*env_);193 return MouseTransformProcessor::GetDisplayId(*env_);
@@ -289,6 +290,7 @@ bool MouseEventNormalize::CheckAndPackageAxisEvent(libinput_event* event)
289int32_t MouseEventNormalize::SetPointerLocation(int32_t x, int32_t y, int32_t displayId)290int32_t MouseEventNormalize::SetPointerLocation(int32_t x, int32_t y, int32_t displayId)
290{291{
291 if (env_ == nullptr) {292 if (env_ == nullptr) {
293+ MMI_HILOGE("Mouse env is nullptr");
292 return RET_ERR;294 return RET_ERR;
293 }295 }
294 return MouseTransformProcessor::SetPointerLocation(*env_, x, y, displayId);296 return MouseTransformProcessor::SetPointerLocation(*env_, x, y, displayId);
@@ -297,6 +299,7 @@ int32_t MouseEventNormalize::SetPointerLocation(int32_t x, int32_t y, int32_t di
297int32_t MouseEventNormalize::GetPointerLocation(int32_t &displayId, double &displayX, double &displayY)299int32_t MouseEventNormalize::GetPointerLocation(int32_t &displayId, double &displayX, double &displayY)
298{300{
299 if (env_ == nullptr) {301 if (env_ == nullptr) {
302+ MMI_HILOGE("Mouse env is nullptr");
300 return RET_ERR;303 return RET_ERR;
301 }304 }
302 return MouseTransformProcessor::GetPointerLocation(*env_, displayId, displayX, displayY);305 return MouseTransformProcessor::GetPointerLocation(*env_, displayId, displayX, displayY);
@@ -283,7 +283,7 @@ int32_t MouseTransformProcessor::UpdateMotionEventState(MotionDataContext& ctx)
283 pointerEvent_->SetButtonId(buttonId_);283 pointerEvent_->SetButtonId(buttonId_);
284 pointerEvent_->SetTargetDisplayId(ctx.displayId);284 pointerEvent_->SetTargetDisplayId(ctx.displayId);
285 WIN_MGR->ApplyBoundDisplayId(pointerEvent_);285 WIN_MGR->ApplyBoundDisplayId(pointerEvent_);
286- MMI_HILOGD("Change coordinate: x:%.2f, y:%.2f, currentDisplayId:%d",286+ MMI_HILOGD("Change coordinate: x:%{private}.2f, y:%{private}.2f, currentDisplayId:%{public}d",
287 ctx.cursorX, ctx.cursorY, ctx.displayId);287 ctx.cursorX, ctx.cursorY, ctx.displayId);
288 return RET_OK;288 return RET_OK;
289}289}
@@ -303,7 +303,8 @@ int32_t MouseTransformProcessor::UpdateMouseMoveLocation(const OLD::DisplayInfo*
303 abs_x += offset.dx;303 abs_x += offset.dx;
304 abs_y += offset.dy;304 abs_y += offset.dy;
305 ret = RET_OK;305 ret = RET_OK;
306- MMI_HILOGD("Skip mouse acceleration motion");306+ MMI_HILOGD("Skip mouse acceleration motion, dx:%{private}.2f, dy:%{private}.2f, "
307+ "filterDeltaTime:%{public}" PRIu64, offset.dx, offset.dy, dalta_time);
307 return ret;308 return ret;
308 }309 }
309 auto winMgr = GetInputWindowsManager();310 auto winMgr = GetInputWindowsManager();
@@ -422,6 +423,8 @@ int32_t MouseTransformProcessor::UpdateTouchpadMoveLocation(const OLD::DisplayIn
422 double touchpadSize = libinput_touchpad_device_get_hypot_size(device) * touchpadPPi;423 double touchpadSize = libinput_touchpad_device_get_hypot_size(device) * touchpadPPi;
423 int32_t frequency = libinput_touchpad_device_get_frequency(device);424 int32_t frequency = libinput_touchpad_device_get_frequency(device);
424 if (touchpadPPi < CONST_DOUBLE_ONE || touchpadSize < CONST_DOUBLE_ONE || frequency < CONST_DOUBLE_ONE) {425 if (touchpadPPi < CONST_DOUBLE_ONE || touchpadSize < CONST_DOUBLE_ONE || frequency < CONST_DOUBLE_ONE) {
426+ MMI_HILOGE("Invalid touchpad parameters, ppi:%{public}.2f, size:%{public}.2f, frequency:%{public}d",
427+ touchpadPPi, touchpadSize, frequency);
425 return RET_ERR;428 return RET_ERR;
426 }429 }
427 ret = PointerMotionAcceleration::DynamicAccelerateTouchpad(offset,430 ret = PointerMotionAcceleration::DynamicAccelerateTouchpad(offset,
@@ -678,7 +681,8 @@ bool MouseTransformProcessor::IsTouchpadTapEnabled(int32_t type)
678#endif // OHOS_BUILD_ENABLE_VKEYBOARD681#endif // OHOS_BUILD_ENABLE_VKEYBOARD
679 682 
680 if (type == LIBINPUT_EVENT_POINTER_TAP && !tpTapSwitch) {683 if (type == LIBINPUT_EVENT_POINTER_TAP && !tpTapSwitch) {
681- MMI_HILOGD("Touch pad is disabled");684+ MMI_HILOGD("Touch pad is disabled, type:%{public}d, tpTapSwitch:%{public}d, userId:%{private}d",
685+ type, tpTapSwitch, userId);
682 return false;686 return false;
683 }687 }
684 return true;688 return true;
@@ -848,7 +852,8 @@ int32_t MouseTransformProcessor::HandleButtonValueInner(struct libinput_event_po
848 buttonId = PointerEvent::MOUSE_BUTTON_LEFT;852 buttonId = PointerEvent::MOUSE_BUTTON_LEFT;
849 button = MouseDeviceState::LIBINPUT_BUTTON_CODE::LIBINPUT_LEFT_BUTTON_CODE;853 button = MouseDeviceState::LIBINPUT_BUTTON_CODE::LIBINPUT_LEFT_BUTTON_CODE;
850 } else {854 } else {
851- MMI_HILOGD("The buttonId does not switch");855+ MMI_HILOGD("The buttonId does not switch, buttonId:%{private}d, primaryButton:%{private}d",
856+ buttonId, primaryButton);
852 }857 }
853 }858 }
854 859 
@@ -1534,7 +1539,7 @@ void MouseTransformProcessor::Dump(int32_t fd, const std::vector<std::string> &a
1534 1539 
1535int32_t MouseTransformProcessor::SetPointerLocation(IInputServiceContext &env, int32_t x, int32_t y, int32_t displayId)1540int32_t MouseTransformProcessor::SetPointerLocation(IInputServiceContext &env, int32_t x, int32_t y, int32_t displayId)
1536{1541{
1537- MMI_HILOGI("SetPointerLocation x:%d, y:%d, displayId:%d", x, y, displayId);1542+ MMI_HILOGI("SetPointerLocation x:%{private}d, y:%{private}d, displayId:%{public}d", x, y, displayId);
1538 CursorPosition cursorPos = env.GetInputWindowsManager()->GetCursorPos();1543 CursorPosition cursorPos = env.GetInputWindowsManager()->GetCursorPos();
1539 if (cursorPos.displayId < 0) {1544 if (cursorPos.displayId < 0) {
1540 MMI_HILOGE("No display");1545 MMI_HILOGE("No display");
@@ -1551,7 +1556,7 @@ int32_t MouseTransformProcessor::SetPointerLocation(IInputServiceContext &env, i
1551 env.GetCursorDrawingComponent().SetPointerLocation(cursorPos.cursorPos.x, cursorPos.cursorPos.y,1556 env.GetCursorDrawingComponent().SetPointerLocation(cursorPos.cursorPos.x, cursorPos.cursorPos.y,
1552 cursorPos.displayId);1557 cursorPos.displayId);
1553 1558 
1554- MMI_HILOGI("CursorPosX:%f, cursorPosY:%f", cursorPos.cursorPos.x, cursorPos.cursorPos.y);1559+ MMI_HILOGI("CursorPosX:%{private}f, cursorPosY:%{private}f", cursorPos.cursorPos.x, cursorPos.cursorPos.y);
1555 return RET_OK;1560 return RET_OK;
1556}1561}
1557 1562 
@@ -1771,7 +1776,8 @@ void MouseTransformProcessor::TransTouchpadRightButton(struct libinput_event_poi
1771 MMI_HILOGD("Event not from touchpad");1776 MMI_HILOGD("Event not from touchpad");
1772 return;1777 return;
1773 }1778 }
1774- MMI_HILOGD("Transform right button event, evenType:%d, switchType:%d, button:%d", evenType, switchType, button);1779+ MMI_HILOGD("Transform right button event, evenType:%{public}d, switchType:%{public}d, button:%{private}d",
1780+ evenType, switchType, button);
1775 uint32_t btn = button;1781 uint32_t btn = button;
1776 auto state = libinput_event_pointer_get_button_state(data);1782 auto state = libinput_event_pointer_get_button_state(data);
1777 if (state == LIBINPUT_BUTTON_STATE_RELEASED) {1783 if (state == LIBINPUT_BUTTON_STATE_RELEASED) {
@@ -1832,7 +1838,7 @@ void MouseTransformProcessor::HandleFilterMouseEvent(Offset* offset)
1832 filterInsertionPoint_.filterX = 0.0;1838 filterInsertionPoint_.filterX = 0.0;
1833 filterInsertionPoint_.filterY = 0.0;1839 filterInsertionPoint_.filterY = 0.0;
1834 filterInsertionPoint_.filterFlag = false;1840 filterInsertionPoint_.filterFlag = false;
1835- MMI_HILOGD("x:%.2f, y:%.2f", offset->dx, offset->dy);1841+ MMI_HILOGD("x:%{private}.2f, y:%{private}.2f", offset->dx, offset->dy);
1836 }1842 }
1837}1843}
1838 1844 
@@ -1864,7 +1870,8 @@ bool MouseTransformProcessor::CheckFilterMouseEvent(struct libinput_event *event
1864 CHKPF(device);1870 CHKPF(device);
1865 if (filterInsertionPoint_.filterDeltaTime < FilterInsertionPoint::FILTER_THRESHOLD_US &&1871 if (filterInsertionPoint_.filterDeltaTime < FilterInsertionPoint::FILTER_THRESHOLD_US &&
1866 libinput_device_get_id_bustype(device) == BUS_USB) {1872 libinput_device_get_id_bustype(device) == BUS_USB) {
1867- MMI_HILOGD("Mouse motion event delta time is too short");1873+ MMI_HILOGD("Mouse motion event delta time is too short, filterDeltaTime:%{public}" PRIu64
1874+ ", currentTime:%{public}" PRIu64, filterInsertionPoint_.filterDeltaTime, currentTime);
1868 return true;1875 return true;
1869 }1876 }
1870 1877 
@@ -157,6 +157,8 @@ bool InputActiveSubscriberHandler::IsImmediateNotifySubscriber(
157void InputActiveSubscriberHandler::StartIntervalTimer(std::shared_ptr<Subscriber> subscriber, int64_t eventTime)157void InputActiveSubscriberHandler::StartIntervalTimer(std::shared_ptr<Subscriber> subscriber, int64_t eventTime)
158{158{
159 if (subscriber->timerId_ >= 0) {159 if (subscriber->timerId_ >= 0) {
160+ MMI_HILOGD("Interval timer is already running, timerId:%{public}d, interval:%{public}" PRId64,
161+ subscriber->timerId_, subscriber->interval_);
160 return;162 return;
161 }163 }
162 auto timerIntervalMs = subscriber->interval_ - (eventTime - subscriber->sendEventLastTime_);164 auto timerIntervalMs = subscriber->interval_ - (eventTime - subscriber->sendEventLastTime_);
@@ -60,7 +60,7 @@ void KeyGestureManager::Handler::ClearData()
60 60 
61void KeyGestureManager::Handler::Trigger(std::shared_ptr<KeyEvent> keyEvent)61void KeyGestureManager::Handler::Trigger(std::shared_ptr<KeyEvent> keyEvent)
62{62{
63- MMI_HILOGI("[Handler] Handler(%{public}d) will run after %{public}dms", GetId(), GetLongPressTime());63+ MMI_HILOGI("[Handler] Handler(%{public}d) will run after %{public}dms", GetId(), GetLongPressTime());
64 keyEvent_ = KeyEvent::Clone(keyEvent);64 keyEvent_ = KeyEvent::Clone(keyEvent);
65 timerId_ = TimerMgr->AddTimer(GetLongPressTime(), REPEAT_ONCE,65 timerId_ = TimerMgr->AddTimer(GetLongPressTime(), REPEAT_ONCE,
66 [this]() {66 [this]() {
@@ -70,14 +70,14 @@ void KeyGestureManager::Handler::Trigger(std::shared_ptr<KeyEvent> keyEvent)
70 timerId_ = INVALID_ENTITY_ID;70 timerId_ = INVALID_ENTITY_ID;
71 }, "KeyGestureManager");71 }, "KeyGestureManager");
72 if (timerId_ < 0) {72 if (timerId_ < 0) {
73- MMI_HILOGI("[Handler] AddTimer fail");73+ MMI_HILOGE("[Handler] AddTimer fail");
74 }74 }
75}75}
76 76 
77void KeyGestureManager::Handler::Run(std::shared_ptr<KeyEvent> keyEvent) const77void KeyGestureManager::Handler::Run(std::shared_ptr<KeyEvent> keyEvent) const
78{78{
79 if (callback_ != nullptr) {79 if (callback_ != nullptr) {
80- MMI_HILOGI("[Handler] Run handler(%{public}d)", GetId());80+ MMI_HILOGI("[Handler] Run handler(%{public}d)", GetId());
81 callback_(keyEvent);81 callback_(keyEvent);
82 }82 }
83}83}
@@ -110,7 +110,7 @@ bool KeyGestureManager::KeyGesture::RemoveHandler(int32_t id)
110 if (iter->GetId() == id) {110 if (iter->GetId() == id) {
111 iter->ResetTimer();111 iter->ResetTimer();
112 handlers_.erase(iter);112 handlers_.erase(iter);
113- MMI_HILOGD("Handler(%{public}d) of key gesture was removed", id);113+ MMI_HILOGD("Handler(%{public}d) of key gesture was removed", id);
114 return true;114 return true;
115 }115 }
116 }116 }
@@ -161,7 +161,7 @@ std::set<int32_t> KeyGestureManager::KeyGesture::GetForegroundPids() const
161 ++nItems;161 ++nItems;
162 }162 }
163 }163 }
164- MMI_HILOGI("Foreground pids: {%{public}zu}[%{public}s]", pids.size(), sPids.str().c_str());164+ MMI_HILOGI("Foreground pids: {%{public}zu}[%{public}s]", pids.size(), sPids.str().c_str());
165 return pids;165 return pids;
166}166}
167 167 
@@ -224,7 +224,7 @@ void KeyGestureManager::KeyGesture::ShowHandlers(
224 output << "[" << handler.GetId() << "," << handler.GetPid()224 output << "[" << handler.GetId() << "," << handler.GetPid()
225 << (foregroundPids.find(handler.GetPid()) != foregroundPids.cend() ? ",F]" : ",B]");225 << (foregroundPids.find(handler.GetPid()) != foregroundPids.cend() ? ",F]" : ",B]");
226 }226 }
227- MMI_HILOGI("[KeyGesture] %{public}s {%{public}zu}%{public}s",227+ MMI_HILOGI("[KeyGesture] %{public}s {%{public}zu}%{public}s",
228 prefix.c_str(), handlers_.size(), output.str().c_str());228 prefix.c_str(), handlers_.size(), output.str().c_str());
229}229}
230 230 
@@ -267,7 +267,7 @@ bool KeyGestureManager::LongPressSingleKey::Intercept(std::shared_ptr<KeyEvent>
267#ifdef OHOS_BUILD_ENABLE_KEY_PRESSED_HANDLER267#ifdef OHOS_BUILD_ENABLE_KEY_PRESSED_HANDLER
268 bool ret = KEY_MONITOR_MGR->NotifyPendingMonitors();268 bool ret = KEY_MONITOR_MGR->NotifyPendingMonitors();
269 if (!ret) {269 if (!ret) {
270- MMI_HILOGW("Do not consume volume keys");270+ MMI_HILOGW("Do not consume volume keys");
271 return false;271 return false;
272 }272 }
273#endif // OHOS_BUILD_ENABLE_KEY_PRESSED_HANDLER273#endif // OHOS_BUILD_ENABLE_KEY_PRESSED_HANDLER
@@ -334,19 +334,19 @@ bool KeyGestureManager::LongPressCombinationKey::Intercept(std::shared_ptr<KeyEv
334 if (IsActive()) {334 if (IsActive()) {
335 std::ostringstream output;335 std::ostringstream output;
336 Dump(output);336 Dump(output);
337- MMI_HILOGI("[LongPressCombinationKey] %s is active now", output.str().c_str());337+ MMI_HILOGI("[LongPressCombinationKey] %{private}s is active now", output.str().c_str());
338 return true;338 return true;
339 }339 }
340 if (!IsWorking()) {340 if (!IsWorking()) {
341 std::ostringstream output;341 std::ostringstream output;
342 Dump(output);342 Dump(output);
343- MMI_HILOGI("[LongPressCombinationKey] Switch off %s", output.str().c_str());343+ MMI_HILOGI("[LongPressCombinationKey] Switch off %{private}s", output.str().c_str());
344 return false;344 return false;
345 }345 }
346 if (handlers_.empty()) {346 if (handlers_.empty()) {
347 std::ostringstream output;347 std::ostringstream output;
348 Dump(output);348 Dump(output);
349- MMI_HILOGI("[LongPressCombinationKey] No handler for %s", output.str().c_str());349+ MMI_HILOGI("[LongPressCombinationKey] No handler for %{private}s", output.str().c_str());
350 return false;350 return false;
351 }351 }
352 if (RecognizeGesture(keyEvent)) {352 if (RecognizeGesture(keyEvent)) {
@@ -409,7 +409,7 @@ void KeyGestureManager::LongPressCombinationKey::TriggerAll(std::shared_ptr<KeyE
409 MarkActive(true);409 MarkActive(true);
410 std::ostringstream output;410 std::ostringstream output;
411 Dump(output);411 Dump(output);
412- MMI_HILOGI("[LongPressCombinationKey] trigger %s", output.str().c_str());412+ MMI_HILOGI("[LongPressCombinationKey] trigger %{private}s", output.str().c_str());
413 OnTriggerAll(keyEvent);413 OnTriggerAll(keyEvent);
414 TriggerHandlers(keyEvent);414 TriggerHandlers(keyEvent);
415}415}
@@ -444,7 +444,7 @@ int32_t KeyGestureManager::PullUpAccessibility::AddHandler(int32_t pid,
444 444 
445void KeyGestureManager::PullUpAccessibility::OnTriggerAll(std::shared_ptr<KeyEvent> keyEvent)445void KeyGestureManager::PullUpAccessibility::OnTriggerAll(std::shared_ptr<KeyEvent> keyEvent)
446{446{
447- MMI_HILOGI("[PullUpAccessibility] Current AccShortcutTimeout setting:%{public}dms",447+ MMI_HILOGI("[PullUpAccessibility] Current AccShortcutTimeout setting:%{public}dms",
448 ACCOUNT_MGR->GetCurrentAccountSetting().GetAccShortcutTimeout());448 ACCOUNT_MGR->GetCurrentAccountSetting().GetAccShortcutTimeout());
449 for (auto &handler : handlers_) {449 for (auto &handler : handlers_) {
450 handler.SetLongPressTime(ACCOUNT_MGR->GetCurrentAccountSetting().GetAccShortcutTimeout());450 handler.SetLongPressTime(ACCOUNT_MGR->GetCurrentAccountSetting().GetAccShortcutTimeout());
@@ -479,6 +479,8 @@ int32_t KeyGestureManager::AddKeyGesture(int32_t pid, std::shared_ptr<KeyOption>
479 return keyGesture->AddHandler(pid, downDuration, callback);479 return keyGesture->AddHandler(pid, downDuration, callback);
480 }480 }
481 }481 }
482+ MMI_HILOGD("No key gesture matched, pid:%{public}d, finalKey:%{private}d",
483+ pid, keyOption->GetFinalKey());
482 return INVALID_ENTITY_ID;484 return INVALID_ENTITY_ID;
483}485}
484 486 
@@ -499,7 +501,7 @@ bool KeyGestureManager::Intercept(std::shared_ptr<KeyEvent> keyEvent)
499 if ((*iter)->Intercept(keyEvent)) {501 if ((*iter)->Intercept(keyEvent)) {
500 std::ostringstream output;502 std::ostringstream output;
501 (*iter)->Dump(output);503 (*iter)->Dump(output);
502- MMI_HILOGI("Intercepted by %s", output.str().c_str());504+ MMI_HILOGI("Intercepted by %{private}s", output.str().c_str());
503 for (++iter; iter != keyGestures_.end(); ++iter) {505 for (++iter; iter != keyGestures_.end(); ++iter) {
504 (*iter)->Reset();506 (*iter)->Reset();
505 }507 }
@@ -524,7 +526,7 @@ void KeyGestureManager::Dump() const
524 std::ostringstream output;526 std::ostringstream output;
525 CHKPC(keyGesture);527 CHKPC(keyGesture);
526 keyGesture->Dump(output);528 keyGesture->Dump(output);
527- MMI_HILOGI("%s", output.str().c_str());529+ MMI_HILOGI("%{public}s", output.str().c_str());
528 }530 }
529}531}
530 532 
@@ -220,6 +220,7 @@ int32_t KeySubscriberHandler::RemoveSubscriber(SessionPtr sess, int32_t subscrib
220 }220 }
221 }221 }
222 }222 }
223+ MMI_HILOGD("Subscriber not found, subscribeId:%{public}d, pid:%{public}d", subscribeId, sess->GetPid());
223 return RET_ERR;224 return RET_ERR;
224}225}
225 226 
@@ -271,6 +272,8 @@ int32_t KeySubscriberHandler::RemoveKeyGestureSubscriber(SessionPtr sess, int32_
271 return RET_OK;272 return RET_OK;
272 }273 }
273 }274 }
275+ MMI_HILOGD("Key gesture subscriber not found, subscribeId:%{public}d, pid:%{public}d",
276+ subscribeId, sess->GetPid());
274 return RET_ERR;277 return RET_ERR;
275}278}
276 279 
@@ -440,19 +443,23 @@ bool KeySubscriberHandler::IsEqualKeyOption(std::shared_ptr<KeyOption> newOption
440 return false;443 return false;
441 }444 }
442 if (newOption->GetFinalKey() != oldOption->GetFinalKey()) {445 if (newOption->GetFinalKey() != oldOption->GetFinalKey()) {
443- MMI_HILOGD("Final key not match");446+ MMI_HILOGD("Final key not match, newFinalKey:%{private}d, oldFinalKey:%{private}d",
447+ newOption->GetFinalKey(), oldOption->GetFinalKey());
444 return false;448 return false;
445 }449 }
446 if (newOption->IsFinalKeyDown() != oldOption->IsFinalKeyDown()) {450 if (newOption->IsFinalKeyDown() != oldOption->IsFinalKeyDown()) {
447- MMI_HILOGD("Is final key down not match");451+ MMI_HILOGD("Is final key down not match, newIsDown:%{public}d, oldIsDown:%{public}d",
452+ newOption->IsFinalKeyDown(), oldOption->IsFinalKeyDown());
448 return false;453 return false;
449 }454 }
450 if (newOption->GetFinalKeyDownDuration() != oldOption->GetFinalKeyDownDuration()) {455 if (newOption->GetFinalKeyDownDuration() != oldOption->GetFinalKeyDownDuration()) {
451- MMI_HILOGD("Final key down duration not match");456+ MMI_HILOGD("Final key down duration not match, newDuration:%{public}d, oldDuration:%{public}d",
457+ newOption->GetFinalKeyDownDuration(), oldOption->GetFinalKeyDownDuration());
452 return false;458 return false;
453 }459 }
454 if (newOption->GetFinalKeyUpDelay() != oldOption->GetFinalKeyUpDelay()) {460 if (newOption->GetFinalKeyUpDelay() != oldOption->GetFinalKeyUpDelay()) {
455- MMI_HILOGD("Is final key up delay not match");461+ MMI_HILOGD("Is final key up delay not match, newDelay:%{private}d, oldDelay:%{private}d",
462+ newOption->GetFinalKeyUpDelay(), oldOption->GetFinalKeyUpDelay());
456 return false;463 return false;
457 }464 }
458 MMI_HILOGD("Key option match");465 MMI_HILOGD("Key option match");
@@ -694,7 +701,8 @@ bool KeySubscriberHandler::OnSubscribeKeyEvent(std::shared_ptr<KeyEvent> keyEven
694 return false;701 return false;
695 }702 }
696 if (keyGestureMgr_.Intercept(keyEvent)) {703 if (keyGestureMgr_.Intercept(keyEvent)) {
697- MMI_HILOGD("Key gesture recognized");704+ MMI_HILOGD("Key gesture recognized, keyCode:%{private}d, keyAction:%{private}d",
705+ keyEvent->GetKeyCode(), keyEvent->GetKeyAction());
698 powerKeyLogger("keyGestureMgr::Intercept");706 powerKeyLogger("keyGestureMgr::Intercept");
699 return true;707 return true;
700 }708 }
@@ -711,7 +719,8 @@ bool KeySubscriberHandler::OnSubscribeKeyEvent(std::shared_ptr<KeyEvent> keyEven
711 MMI_HILOGI("Repeat KeyEvent but new triggerType needs processing,(KC:%{private}d, KA:%{public}d)",719 MMI_HILOGI("Repeat KeyEvent but new triggerType needs processing,(KC:%{private}d, KA:%{public}d)",
712 keyEvent->GetKeyCode(), keyEvent->GetKeyAction());720 keyEvent->GetKeyCode(), keyEvent->GetKeyAction());
713 } else {721 } else {
714- MMI_HILOGD("Repeat KeyEvent, skip");722+ MMI_HILOGD("Repeat KeyEvent, skip, keyCode:%{private}d, keyAction:%{private}d",
723+ keyEvent->GetKeyCode(), keyEvent->GetKeyAction());
715 powerKeyLogger("IsRepeatedKeyEvent");724 powerKeyLogger("IsRepeatedKeyEvent");
716 return true;725 return true;
717 }726 }
@@ -151,7 +151,7 @@ std::shared_ptr<PointerEvent> GestureTransformProcessor::OnEvent(struct libinput
151 return nullptr;151 return nullptr;
152 }152 }
153 default: {153 default: {
154- MMI_HILOGE("Unknown event_type of pointer class has been reported!\n");154+ MMI_HILOGE("Unknown event_type of pointer class has been reported!");
155 return nullptr;155 return nullptr;
156 }156 }
157 }157 }
@@ -64,11 +64,11 @@ std::shared_ptr<PointerEvent> Remote_ControlTransformProcessor::OnEvent(struct l
64 pointerEvent_->ClearAxisValue();64 pointerEvent_->ClearAxisValue();
65 switch (type) {65 switch (type) {
66 case LIBINPUT_EVENT_TOUCH_DOWN: {66 case LIBINPUT_EVENT_TOUCH_DOWN: {
67- MMI_HILOGD("Tv Touch event is not Motion");67+ MMI_HILOGD("Tv Touch down event is not Motion, deviceId:%{private}d", deviceId_);
68 return pointerEvent_;68 return pointerEvent_;
69 }69 }
70 case LIBINPUT_EVENT_TOUCH_UP: {70 case LIBINPUT_EVENT_TOUCH_UP: {
71- MMI_HILOGD("Tv Touch event is not Motion");71+ MMI_HILOGD("Tv Touch up event is not Motion, deviceId:%{private}d", deviceId_);
72 return pointerEvent_;72 return pointerEvent_;
73 }73 }
74 case LIBINPUT_EVENT_TOUCH_MOTION: {74 case LIBINPUT_EVENT_TOUCH_MOTION: {
@@ -116,11 +116,11 @@ bool Remote_ControlTransformProcessor::OnEventTouchMotion(struct libinput_event*
116 }116 }
117 double x = touchInfo.point.x;117 double x = touchInfo.point.x;
118 double y = touchInfo.point.y;118 double y = touchInfo.point.y;
119- MMI_HILOGD("Change coordinate: x:%.2f, y:%.2f, currentDisplayId:%d",119+ MMI_HILOGD("Change coordinate: x:%{private}.2f, y:%{private}.2f, currentDisplayId:%{public}d",
120 x, y, logicalDisplayId);120 x, y, logicalDisplayId);
121 WIN_MGR->UpdateAndAdjustMouseLocation(logicalDisplayId, x, y);121 WIN_MGR->UpdateAndAdjustMouseLocation(logicalDisplayId, x, y);
122 pointerEvent_->SetTargetDisplayId(logicalDisplayId);122 pointerEvent_->SetTargetDisplayId(logicalDisplayId);
123- MMI_HILOGD("Change coordinate: x:%.2f, y:%.2f, currentDisplayId:%d",123+ MMI_HILOGD("Change coordinate: x:%{private}.2f, y:%{private}.2f, currentDisplayId:%{public}d",
124 x, y, logicalDisplayId);124 x, y, logicalDisplayId);
125#endif // OHOS_BUILD_ENABLE_WATCH125#endif // OHOS_BUILD_ENABLE_WATCH
126 return true;126 return true;
@@ -843,7 +843,7 @@ bool TabletToolTransformProcessor::CalculateScreenCoordinateWithCalibration(
843 }843 }
844 double rawX = libinput_event_tablet_tool_get_x_transformed(tabletEvent, static_cast<uint32_t>(tabletWidth));844 double rawX = libinput_event_tablet_tool_get_x_transformed(tabletEvent, static_cast<uint32_t>(tabletWidth));
845 double rawY = libinput_event_tablet_tool_get_y_transformed(tabletEvent, static_cast<uint32_t>(tabletHeight));845 double rawY = libinput_event_tablet_tool_get_y_transformed(tabletEvent, static_cast<uint32_t>(tabletHeight));
846- MMI_HILOGD("Raw hardware coordinates: (%.1f, %.1f)", rawX, rawY);846+ MMI_HILOGD("Raw hardware coordinates: (%{private}.1f, %{private}.1f)", rawX, rawY);
847 rawX = std::clamp(rawX, calibration_->calibratedMinX, calibration_->calibratedMaxX);847 rawX = std::clamp(rawX, calibration_->calibratedMinX, calibration_->calibratedMaxX);
848 rawY = std::clamp(rawY, calibration_->calibratedMinY, calibration_->calibratedMaxY);848 rawY = std::clamp(rawY, calibration_->calibratedMinY, calibration_->calibratedMaxY);
849 849 
@@ -865,7 +865,7 @@ bool TabletToolTransformProcessor::CalculateScreenCoordinateWithCalibration(
865 coord.x = normalizedX * screenWidth;865 coord.x = normalizedX * screenWidth;
866 coord.y = normalizedY * screenHeight;866 coord.y = normalizedY * screenHeight;
867 }867 }
868- MMI_HILOGD("Calibrated screen coordinates: (%.1f, %.1f)", coord.x, coord.y);868+ MMI_HILOGD("Calibrated screen coordinates: (%{private}.1f, %{private}.1f)", coord.x, coord.y);
869 return true;869 return true;
870}870}
871 871 
@@ -67,6 +67,8 @@ std::shared_ptr<PointerEvent> TouchEventNormalize::OnLibInput(struct libinput_ev
67 CHKPP(device);67 CHKPP(device);
68 std::shared_ptr<TransformProcessor> processor{ nullptr };68 std::shared_ptr<TransformProcessor> processor{ nullptr };
69 auto deviceId = INPUT_DEV_MGR->FindInputDeviceId(device);69 auto deviceId = INPUT_DEV_MGR->FindInputDeviceId(device);
70+ MMI_HILOGD("Transform event by device, deviceType:%{public}d, deviceId:%{private}d",
71+ static_cast<int32_t>(deviceType), deviceId);
70 if (deviceType == TouchEventNormalize::DeviceType::TOUCH_PAD) {72 if (deviceType == TouchEventNormalize::DeviceType::TOUCH_PAD) {
71 if (auto it = touchpad_processors_.find(deviceId); it != touchpad_processors_.end()) {73 if (auto it = touchpad_processors_.find(deviceId); it != touchpad_processors_.end()) {
72 processor = it->second;74 processor = it->second;
@@ -126,7 +126,7 @@ int32_t TouchPadTransformProcessor::OnEventTouchPadMotion(struct libinput_event
126 pointerEvent_->SetPointerAction(PointerEvent::POINTER_ACTION_MOVE);126 pointerEvent_->SetPointerAction(PointerEvent::POINTER_ACTION_MOVE);
127 PointerEvent::PointerItem item;127 PointerEvent::PointerItem item;
128 if (!pointerEvent_->GetPointerItem(seatSlot, item)) {128 if (!pointerEvent_->GetPointerItem(seatSlot, item)) {
129- MMI_HILOGD("Can't find the pointer item data, seatSlot:%{public}d, errCode:%{public}d",129+ MMI_HILOGD("Can't find the pointer item data, seatSlot:%{public}d, errCode:%{public}d",
130 seatSlot, PARAM_INPUT_FAIL);130 seatSlot, PARAM_INPUT_FAIL);
131 return RET_ERR;131 return RET_ERR;
132 }132 }
@@ -178,7 +178,7 @@ int32_t TouchPadTransformProcessor::OnEventTouchPadUp(struct libinput_event *eve
178 }178 }
179 PointerEvent::PointerItem item;179 PointerEvent::PointerItem item;
180 if (!pointerEvent_->GetPointerItem(seatSlot, item)) {180 if (!pointerEvent_->GetPointerItem(seatSlot, item)) {
181- MMI_HILOGE("Can't find pointer item data, seatSlot:%{public}d, errCode:%{public}d",181+ MMI_HILOGE("Can't find pointer item data, seatSlot:%{public}d, errCode:%{public}d",
182 seatSlot, PARAM_INPUT_FAIL);182 seatSlot, PARAM_INPUT_FAIL);
183 return RET_ERR;183 return RET_ERR;
184 }184 }
@@ -277,7 +277,7 @@ std::shared_ptr<PointerEvent> TouchPadTransformProcessor::OnEvent(struct libinpu
277 OnEventTouchPadPinchGesture(event);277 OnEventTouchPadPinchGesture(event);
278 break;278 break;
279 default: {279 default: {
280- MMI_HILOGW("Touch pad action is not found");280+ MMI_HILOGW("Touch pad action is not found");
281 return nullptr;281 return nullptr;
282 }282 }
283 }283 }
@@ -288,7 +288,7 @@ std::shared_ptr<PointerEvent> TouchPadTransformProcessor::OnEvent(struct libinpu
288 288 
289 pointerEvent_->UpdateId();289 pointerEvent_->UpdateId();
290 StartLogTraceId(pointerEvent_->GetId(), pointerEvent_->GetEventType(), pointerEvent_->GetPointerAction());290 StartLogTraceId(pointerEvent_->GetId(), pointerEvent_->GetEventType(), pointerEvent_->GetPointerAction());
291- MMI_HILOGD("Pointer event dispatcher of server:");291+ MMI_HILOGD("Pointer event dispatcher of server:");
292 EventLogHelper::PrintEventData(pointerEvent_, pointerEvent_->GetPointerAction(),292 EventLogHelper::PrintEventData(pointerEvent_, pointerEvent_->GetPointerAction(),
293 pointerEvent_->GetPointerIds().size(), MMI_LOG_FREEZE);293 pointerEvent_->GetPointerIds().size(), MMI_LOG_FREEZE);
294 auto device = INPUT_DEV_MGR->GetInputDevice(pointerEvent_->GetDeviceId());294 auto device = INPUT_DEV_MGR->GetInputDevice(pointerEvent_->GetDeviceId());
@@ -316,11 +316,11 @@ int32_t TouchPadTransformProcessor::GetTouchPadToolType(
316 return PointerEvent::TOOL_TYPE_PEN;316 return PointerEvent::TOOL_TYPE_PEN;
317 }317 }
318 case MT_TOOL_PALM: {318 case MT_TOOL_PALM: {
319- MMI_HILOGD("toolType is MT_TOOL_PALM");319+ MMI_HILOGD("toolType is MT_TOOL_PALM");
320 return PointerEvent::TOOL_TYPE_PALM;320 return PointerEvent::TOOL_TYPE_PALM;
321 }321 }
322 default : {322 default : {
323- MMI_HILOGW("Unknown tool type, identified as finger, toolType:%{public}d", toolType);323+ MMI_HILOGW("Unknown tool type, identified as finger, toolType:%{public}d", toolType);
324 return PointerEvent::TOOL_TYPE_FINGER;324 return PointerEvent::TOOL_TYPE_FINGER;
325 }325 }
326 }326 }
@@ -333,7 +333,7 @@ int32_t TouchPadTransformProcessor::GetTouchPadToolType(struct libinput_device *
333 return item.second;333 return item.second;
334 }334 }
335 }335 }
336- MMI_HILOGD("Unknown Btn tool type, identified as finger");336+ MMI_HILOGD("Unknown Btn tool type, identified as finger");
337 return PointerEvent::TOOL_TYPE_FINGER;337 return PointerEvent::TOOL_TYPE_FINGER;
338}338}
339 339 
@@ -346,7 +346,7 @@ int32_t TouchPadTransformProcessor::SetTouchPadSwipeData(struct libinput_event *
346 GetTouchpadSwipeSwitch(userId, tpSwipeSwitch);346 GetTouchpadSwipeSwitch(userId, tpSwipeSwitch);
347 347 
348 if (!tpSwipeSwitch) {348 if (!tpSwipeSwitch) {
349- MMI_HILOGD("Touchpad swipe switch is false");349+ MMI_HILOGD("Touchpad swipe switch is false, userId:%{private}d, action:%{private}d", userId, action);
350 return RET_ERR;350 return RET_ERR;
351 }351 }
352 352 
@@ -362,7 +362,7 @@ int32_t TouchPadTransformProcessor::SetTouchPadSwipeData(struct libinput_event *
362 362 
363 int32_t fingerCount = libinput_event_gesture_get_finger_count(gesture);363 int32_t fingerCount = libinput_event_gesture_get_finger_count(gesture);
364 if (fingerCount < 0 || fingerCount > FINGER_COUNT_MAX) {364 if (fingerCount < 0 || fingerCount > FINGER_COUNT_MAX) {
365- MMI_HILOGE("Finger count is invalid");365+ MMI_HILOGE("Finger count is invalid");
366 return RET_ERR;366 return RET_ERR;
367 }367 }
368 if (fingerCount == FINGER_TAP_THREE) {368 if (fingerCount == FINGER_TAP_THREE) {
@@ -375,14 +375,14 @@ int32_t TouchPadTransformProcessor::SetTouchPadSwipeData(struct libinput_event *
375 pointerEvent_->SetFingerCount(fingerCount);375 pointerEvent_->SetFingerCount(fingerCount);
376 376 
377 if (fingerCount == 0) {377 if (fingerCount == 0) {
378- MMI_HILOGD("There is no finger in swipe action:%{public}d", action);378+ MMI_HILOGD("There is no finger in swipe action:%{public}d", action);
379 return RET_ERR;379 return RET_ERR;
380 }380 }
381 381 
382 AddItemForEventWhileSetSwipeData(time, gesture, fingerCount);382 AddItemForEventWhileSetSwipeData(time, gesture, fingerCount);
383 383
384 if (action == PointerEvent::POINTER_ACTION_SWIPE_BEGIN) {384 if (action == PointerEvent::POINTER_ACTION_SWIPE_BEGIN) {
385- MMI_HILOGE("Start report for POINTER_ACTION_SWIPE_BEGIN");385+ MMI_HILOGE("Start report for POINTER_ACTION_SWIPE_BEGIN");
386 swipeHistory_.clear();386 swipeHistory_.clear();
387 DfxHisysevent::StatisticTouchpadGesture(pointerEvent_);387 DfxHisysevent::StatisticTouchpadGesture(pointerEvent_);
388 }388 }
@@ -394,7 +394,7 @@ int32_t TouchPadTransformProcessor::AddItemForEventWhileSetSwipeData(int64_t tim
394 int32_t fingerCount)394 int32_t fingerCount)
395{395{
396 if (fingerCount == 0 || fingerCount > FINGER_COUNT_MAX) {396 if (fingerCount == 0 || fingerCount > FINGER_COUNT_MAX) {
397- MMI_HILOGD("There are wrong finger counts in swipe action");397+ MMI_HILOGD("There are wrong finger counts in swipe action");
398 return RET_ERR;398 return RET_ERR;
399 }399 }
400 Coords avgCoord {0, 0};400 Coords avgCoord {0, 0};
@@ -551,7 +551,7 @@ void TouchPadTransformProcessor::ProcessTouchPadPinchDataEvent
551 }551 }
552 if (!MMI_EQ(angle, 0.0)) {552 if (!MMI_EQ(angle, 0.0)) {
553 rotateAngle_ += angle;553 rotateAngle_ += angle;
554- MMI_HILOGD("The rotate angle is %{public}f", rotateAngle_);554+ MMI_HILOGD("The rotate angle is %{public}f", rotateAngle_);
555 pointerEvent_->SetAxisValue(PointerEvent::AXIS_TYPE_ROTATE, rotateAngle_);555 pointerEvent_->SetAxisValue(PointerEvent::AXIS_TYPE_ROTATE, rotateAngle_);
556 }556 }
557 557 
@@ -582,11 +582,11 @@ int32_t TouchPadTransformProcessor::OnEventTouchPadPinchGesture(libinput_event *
582 double scale = libinput_event_gesture_get_scale(gesture);582 double scale = libinput_event_gesture_get_scale(gesture);
583 double angle = libinput_event_gesture_get_angle_delta(gesture);583 double angle = libinput_event_gesture_get_angle_delta(gesture);
584 auto action = GetPinchGestureType(type, angle);584 auto action = GetPinchGestureType(type, angle);
585- MMI_HILOGD("The action is %{public}d, scale is %{public}f, angle is %{public}f", action, scale, angle);585+ MMI_HILOGD("The action is %{public}d, scale is %{public}f, angle is %{public}f", action, scale, angle);
586 int32_t fingerCount = libinput_event_gesture_get_finger_count(gesture);586 int32_t fingerCount = libinput_event_gesture_get_finger_count(gesture);
587- MMI_HILOGD("The finger count is %{public}d", fingerCount);587+ MMI_HILOGD("The finger count is %{public}d", fingerCount);
588 if (fingerCount <= 0 || fingerCount > FINGER_COUNT_MAX) {588 if (fingerCount <= 0 || fingerCount > FINGER_COUNT_MAX) {
589- MMI_HILOGE("Finger count is invalid");589+ MMI_HILOGE("Finger count is invalid");
590 return RET_ERR;590 return RET_ERR;
591 }591 }
592 bool tpPinchSwitch = false;592 bool tpPinchSwitch = false;
@@ -596,7 +596,8 @@ int32_t TouchPadTransformProcessor::OnEventTouchPadPinchGesture(libinput_event *
596 (action == PointerEvent::POINTER_ACTION_AXIS_BEGIN ||596 (action == PointerEvent::POINTER_ACTION_AXIS_BEGIN ||
597 action == PointerEvent::POINTER_ACTION_AXIS_UPDATE ||597 action == PointerEvent::POINTER_ACTION_AXIS_UPDATE ||
598 action == PointerEvent::POINTER_ACTION_AXIS_END)) {598 action == PointerEvent::POINTER_ACTION_AXIS_END)) {
599- MMI_HILOGD("Touchpad pinch switch is false");599+ MMI_HILOGD("Touchpad pinch switch is false, userId:%{private}d, fingerCount:%{private}d, "
600+ "action:%{private}d", userId, fingerCount, action);
600 return RET_ERR;601 return RET_ERR;
601 }602 }
602 bool tpRotateSwitch = false;603 bool tpRotateSwitch = false;
@@ -605,7 +606,8 @@ int32_t TouchPadTransformProcessor::OnEventTouchPadPinchGesture(libinput_event *
605 (action == PointerEvent::POINTER_ACTION_ROTATE_BEGIN ||606 (action == PointerEvent::POINTER_ACTION_ROTATE_BEGIN ||
606 action == PointerEvent::POINTER_ACTION_ROTATE_UPDATE ||607 action == PointerEvent::POINTER_ACTION_ROTATE_UPDATE ||
607 action == PointerEvent::POINTER_ACTION_ROTATE_END)) {608 action == PointerEvent::POINTER_ACTION_ROTATE_END)) {
608- MMI_HILOGD("Touchpad rotate switch is false");609+ MMI_HILOGD("Touchpad rotate switch is false, userId:%{private}d, fingerCount:%{private}d, "
610+ "action:%{private}d", userId, fingerCount, action);
609 return RET_ERR;611 return RET_ERR;
610 }612 }
611 int64_t time = static_cast<int64_t>(libinput_event_gesture_get_time(gesture));613 int64_t time = static_cast<int64_t>(libinput_event_gesture_get_time(gesture));
@@ -638,7 +640,7 @@ int32_t TouchPadTransformProcessor::GetPinchGestureType(int32_t type, double ang
638 default:640 default:
639 break;641 break;
640 }642 }
641- MMI_HILOGE("Check pinch gesture failed. type:%{public}d", type);643+ MMI_HILOGE("Check pinch gesture failed. type:%{public}d", type);
642 return RET_ERR;644 return RET_ERR;
643}645}
644 646 
@@ -657,7 +659,7 @@ void TouchPadTransformProcessor::InitToolType()
657int32_t TouchPadTransformProcessor::SetTouchpadSwipeSwitch(int32_t userId, bool switchFlag)659int32_t TouchPadTransformProcessor::SetTouchpadSwipeSwitch(int32_t userId, bool switchFlag)
658{660{
659 if (PutConfigDataToDatabase(userId, TOUCHPAD_KEY_SETTING, FIELD_TOUCHPAD_SWIPE_SWITCH, switchFlag) != RET_OK) {661 if (PutConfigDataToDatabase(userId, TOUCHPAD_KEY_SETTING, FIELD_TOUCHPAD_SWIPE_SWITCH, switchFlag) != RET_OK) {
660- MMI_HILOGE("Failed to set touchpad swpie switch flag to mem");662+ MMI_HILOGE("Failed to set touchpad swpie switch flag to mem");
661 return RET_ERR;663 return RET_ERR;
662 }664 }
663 665 
@@ -674,7 +676,7 @@ void TouchPadTransformProcessor::GetTouchpadSwipeSwitch(int32_t userId, bool &sw
674int32_t TouchPadTransformProcessor::SetTouchpadPinchSwitch(int32_t userId, bool switchFlag)676int32_t TouchPadTransformProcessor::SetTouchpadPinchSwitch(int32_t userId, bool switchFlag)
675{677{
676 if (PutConfigDataToDatabase(userId, TOUCHPAD_KEY_SETTING, FIELD_TOUCHPAD_PINCH_SWITCH, switchFlag) != RET_OK) {678 if (PutConfigDataToDatabase(userId, TOUCHPAD_KEY_SETTING, FIELD_TOUCHPAD_PINCH_SWITCH, switchFlag) != RET_OK) {
677- MMI_HILOGE("Failed to set touchpad pinch switch flag to mem");679+ MMI_HILOGE("Failed to set touchpad pinch switch flag to mem");
678 return RET_ERR;680 return RET_ERR;
679 }681 }
680 682 
@@ -691,7 +693,7 @@ void TouchPadTransformProcessor::GetTouchpadPinchSwitch(int32_t userId, bool &sw
691int32_t TouchPadTransformProcessor::SetTouchpadRotateSwitch(int32_t userId, bool rotateSwitch)693int32_t TouchPadTransformProcessor::SetTouchpadRotateSwitch(int32_t userId, bool rotateSwitch)
692{694{
693 if (PutConfigDataToDatabase(userId, TOUCHPAD_KEY_SETTING, FIELD_TOUCHPAD_ROTATE_SWITCH, rotateSwitch) != RET_OK) {695 if (PutConfigDataToDatabase(userId, TOUCHPAD_KEY_SETTING, FIELD_TOUCHPAD_ROTATE_SWITCH, rotateSwitch) != RET_OK) {
694- MMI_HILOGE("PutConfigDataToDatabase failed");696+ MMI_HILOGE("PutConfigDataToDatabase failed");
695 return RET_ERR;697 return RET_ERR;
696 }698 }
697 699 
@@ -710,7 +712,7 @@ int32_t TouchPadTransformProcessor::SetTouchpadDoubleTapAndDragState(int32_t use
710 if (dataShareReady_.load()) {712 if (dataShareReady_.load()) {
711 if (PutConfigDataToDatabase(userId, TOUCHPAD_KEY_SETTING, FIELD_TOUCHPAD_DOUBLE_TAP_AND_DRAG,713 if (PutConfigDataToDatabase(userId, TOUCHPAD_KEY_SETTING, FIELD_TOUCHPAD_DOUBLE_TAP_AND_DRAG,
712 switchFlag) != RET_OK) {714 switchFlag) != RET_OK) {
713- MMI_HILOGE("PutConfigDataToDatabase failed");715+ MMI_HILOGE("PutConfigDataToDatabase failed");
714 return RET_ERR;716 return RET_ERR;
715 }717 }
716 NotifyLibinputDragState(switchFlag);718 NotifyLibinputDragState(switchFlag);
@@ -753,7 +755,7 @@ void TouchPadTransformProcessor::NotifyLibinputDragState(bool switchFlag)
753 continue;755 continue;
754 }756 }
755 auto ret = libinput_device_config_tap_set_drag_enabled(originDevice, state);757 auto ret = libinput_device_config_tap_set_drag_enabled(originDevice, state);
756- MMI_HILOGI("Touchpad set double tap and drag state successfully, "758+ MMI_HILOGI("Touchpad set double tap and drag state successfully, "
757 "state:%{public}d, ret:%{public}d", state, ret);759 "state:%{public}d, ret:%{public}d", state, ret);
758 }760 }
759}761}
@@ -772,10 +774,10 @@ int32_t TouchPadTransformProcessor::SetTouchpadScrollRows(int32_t userId, int32_
772 bool isSuccess = INPUT_SETTING_MANAGER->SetIntValue(userId, TOUCHPAD_KEY_SETTING,774 bool isSuccess = INPUT_SETTING_MANAGER->SetIntValue(userId, TOUCHPAD_KEY_SETTING,
773 FIELD_TOUCHPAD_SCROLL_ROWS, newRows);775 FIELD_TOUCHPAD_SCROLL_ROWS, newRows);
774 if (!isSuccess) {776 if (!isSuccess) {
775- MMI_HILOGE("Set touchpad scroll rows failed, rows:%{public}d", newRows);777+ MMI_HILOGE("Set touchpad scroll rows failed, rows:%{public}d", newRows);
776 return RET_ERR;778 return RET_ERR;
777 }779 }
778- MMI_HILOGD("Set touchpad scroll rows successfully, rows:%{public}d", newRows);780+ MMI_HILOGD("Set touchpad scroll rows successfully, rows:%{public}d", newRows);
779 return RET_OK;781 return RET_OK;
780}782}
781 783 
@@ -784,7 +786,7 @@ int32_t TouchPadTransformProcessor::GetTouchpadScrollRows(int32_t userId)
784 CALL_DEBUG_ENTER;786 CALL_DEBUG_ENTER;
785 int32_t rows = DEFAULT_ROWS;787 int32_t rows = DEFAULT_ROWS;
786 INPUT_SETTING_MANAGER->GetIntValue(userId, TOUCHPAD_KEY_SETTING, FIELD_TOUCHPAD_SCROLL_ROWS, rows);788 INPUT_SETTING_MANAGER->GetIntValue(userId, TOUCHPAD_KEY_SETTING, FIELD_TOUCHPAD_SCROLL_ROWS, rows);
787- MMI_HILOGD("Get touchpad scroll rows successfully, rows:%{public}d", rows);789+ MMI_HILOGD("Get touchpad scroll rows successfully, rows:%{public}d", rows);
788 return rows;790 return rows;
789}791}
790 792 
@@ -793,7 +795,7 @@ int32_t TouchPadTransformProcessor::PutConfigDataToDatabase(int32_t userId, cons
793{795{
794 bool isSuccess = INPUT_SETTING_MANAGER->SetBoolValue(userId, settingKey, key, value);796 bool isSuccess = INPUT_SETTING_MANAGER->SetBoolValue(userId, settingKey, key, value);
795 if (!isSuccess) {797 if (!isSuccess) {
796- MMI_HILOGE("SetBoolValue failed, key:%{public}s, value:%{public}d", key.c_str(), (int32_t)(value));798+ MMI_HILOGE("SetBoolValue failed, key:%{public}s, value:%{public}d", key.c_str(), (int32_t)(value));
797 return RET_ERR;799 return RET_ERR;
798 }800 }
799 return RET_OK;801 return RET_OK;
@@ -803,7 +805,7 @@ void TouchPadTransformProcessor::GetConfigDataFromDatabase(int32_t userId, const
803 const std::string &key, bool &value)805 const std::string &key, bool &value)
804{806{
805 INPUT_SETTING_MANAGER->GetBoolValue(userId, settingKey, key, value);807 INPUT_SETTING_MANAGER->GetBoolValue(userId, settingKey, key, value);
806- MMI_HILOGE("GetConfigDataFromDatabase, settingKey:%{public}s, key:%{public}s, value:%{public}d",808+ MMI_HILOGE("GetConfigDataFromDatabase, settingKey:%{public}s, key:%{public}s, value:%{public}d",
807 settingKey.c_str(), key.c_str(), (int32_t)(value));809 settingKey.c_str(), key.c_str(), (int32_t)(value));
808}810}
809 811 
@@ -819,7 +821,7 @@ void TouchPadTransformProcessor::RemoveSurplusPointerItem()
819{821{
820 std::list<PointerEvent::PointerItem> pointerItems = pointerEvent_->GetAllPointerItems();822 std::list<PointerEvent::PointerItem> pointerItems = pointerEvent_->GetAllPointerItems();
821 if (pointerItems.size() >= MAX_N_POINTER_ITEMS) {823 if (pointerItems.size() >= MAX_N_POINTER_ITEMS) {
822- MMI_HILOGW("Exceed maximum allowed number of pointer items");824+ MMI_HILOGW("Exceed maximum allowed number of pointer items");
823 pointerEvent_->RemovePointerItem(pointerItems.begin()->GetPointerId());825 pointerEvent_->RemovePointerItem(pointerItems.begin()->GetPointerId());
824 }826 }
825}827}
@@ -846,7 +848,7 @@ int32_t MultiFingersTapHandler::HandleMulFingersTap(struct libinput_event_touch
846 }848 }
847 lastTime = time;849 lastTime = time;
848 if ((deltaTime > perTimeThreshold) || ((lastTime - beginTime) > totalTimeThreshold)) {850 if ((deltaTime > perTimeThreshold) || ((lastTime - beginTime) > totalTimeThreshold)) {
849- MMI_HILOGD("Not multitap, single time interval or total time interval is out of range."851+ MMI_HILOGD("Not multitap, single time interval or total time interval is out of range."
850 "single:%{public}" PRId64 ", total:%{public}" PRId64, deltaTime, (lastTime - beginTime));852 "single:%{public}" PRId64 ", total:%{public}" PRId64, deltaTime, (lastTime - beginTime));
851 SetMultiFingersTapHdrDefault();853 SetMultiFingersTapHdrDefault();
852 return RET_OK;854 return RET_OK;
@@ -854,12 +856,12 @@ int32_t MultiFingersTapHandler::HandleMulFingersTap(struct libinput_event_touch
854 if (type == LIBINPUT_EVENT_TOUCHPAD_DOWN) {856 if (type == LIBINPUT_EVENT_TOUCHPAD_DOWN) {
855 // if trends is up, is not multifigners tap, return.857 // if trends is up, is not multifigners tap, return.
856 if ((tapTrends_ == TapTrends::UPING) || !CanAddToPointerMaps(event)) {858 if ((tapTrends_ == TapTrends::UPING) || !CanAddToPointerMaps(event)) {
857- MMI_HILOGD("The trends is up, is not a multifigners tap event");859+ MMI_HILOGD("The trends is up, is not a multifigners tap event");
858 SetMultiFingersTapHdrDefault();860 SetMultiFingersTapHdrDefault();
859 return RET_OK;861 return RET_OK;
860 } else {862 } else {
861 if (tapTrends_ == TapTrends::BEGIN && multiFingersState_ != MulFingersTap::NO_TAP) {863 if (tapTrends_ == TapTrends::BEGIN && multiFingersState_ != MulFingersTap::NO_TAP) {
862- MMI_HILOGD("Clear residual multiFingersState_ before new tap sequence");864+ MMI_HILOGD("Clear residual multiFingersState_ before new tap sequence");
863 multiFingersState_ = MulFingersTap::NO_TAP;865 multiFingersState_ = MulFingersTap::NO_TAP;
864 }866 }
865 downCnt++;867 downCnt++;
@@ -872,7 +874,7 @@ int32_t MultiFingersTapHandler::HandleMulFingersTap(struct libinput_event_touch
872 874 
873 if ((upCnt == downCnt) && (upCnt >= FINGER_TAP_MIN) && (upCnt <= FINGER_COUNT_MAX)) {875 if ((upCnt == downCnt) && (upCnt >= FINGER_TAP_MIN) && (upCnt <= FINGER_COUNT_MAX)) {
874 multiFingersState_ = static_cast<MulFingersTap>(upCnt);876 multiFingersState_ = static_cast<MulFingersTap>(upCnt);
875- MMI_HILOGD("This is multifinger tap event, finger count:%{public}d", upCnt);877+ MMI_HILOGD("This is multifinger tap event, finger count:%{public}d", upCnt);
876 }878 }
877 return RET_OK;879 return RET_OK;
878}880}
@@ -934,7 +936,7 @@ int32_t TouchPadTransformProcessor::SetTouchpadThreeFingersTapSwitch(int32_t use
934{936{
935 if (PutConfigDataToDatabase(userId, TOUCHPAD_KEY_SETTING, FIELD_TOUCHPAD_THREE_FINGERTAP_SWITCH,937 if (PutConfigDataToDatabase(userId, TOUCHPAD_KEY_SETTING, FIELD_TOUCHPAD_THREE_FINGERTAP_SWITCH,
936 switchFlag) != RET_OK) {938 switchFlag) != RET_OK) {
937- MMI_HILOGE("Failed to set touchpad three fingers switch flag to mem, switchFlag:%{public}d",939+ MMI_HILOGE("Failed to set touchpad three fingers switch flag to mem, switchFlag:%{public}d",
938 static_cast<int32_t>(switchFlag));940 static_cast<int32_t>(switchFlag));
939 return RET_ERR;941 return RET_ERR;
940 }942 }
@@ -951,16 +953,16 @@ int32_t TouchPadTransformProcessor::GetTouchpadThreeFingersTapSwitch(int32_t use
951 953 
952void TouchPadTransformProcessor::OnDeviceEnabled()954void TouchPadTransformProcessor::OnDeviceEnabled()
953{955{
954- MMI_HILOGI("TouchPad[%{public}d] received enable notification", deviceId_);956+ MMI_HILOGI("TouchPad[%{public}d] received enable notification", deviceId_);
955}957}
956 958 
957void TouchPadTransformProcessor::OnDeviceDisabled()959void TouchPadTransformProcessor::OnDeviceDisabled()
958{960{
959- MMI_HILOGI("TouchPad[%{public}d] received disable notification", deviceId_);961+ MMI_HILOGI("TouchPad[%{public}d] received disable notification", deviceId_);
960 RecordActiveOperations();962 RecordActiveOperations();
961 CancelAllGestures();963 CancelAllGestures();
962 964 
963- MMI_HILOGI("TouchPad[%{public}d] disabled, reset state data", deviceId_);965+ MMI_HILOGI("TouchPad[%{public}d] disabled, reset state data", deviceId_);
964 isRotateGesture_ = false;966 isRotateGesture_ = false;
965 rotateAngle_ = 0.0;967 rotateAngle_ = 0.0;
966 pointerEvent_ = nullptr;968 pointerEvent_ = nullptr;
@@ -995,20 +997,20 @@ void TouchPadTransformProcessor::CancelAllGestures()
995 case PointerEvent::POINTER_ACTION_SWIPE_UPDATE:997 case PointerEvent::POINTER_ACTION_SWIPE_UPDATE:
996 case PointerEvent::POINTER_ACTION_SWIPE_BEGIN: {998 case PointerEvent::POINTER_ACTION_SWIPE_BEGIN: {
997 pointerEvent_->SetPointerAction(PointerEvent::POINTER_ACTION_SWIPE_END);999 pointerEvent_->SetPointerAction(PointerEvent::POINTER_ACTION_SWIPE_END);
998- MMI_HILOGI("TouchPad[%{public}d] cancelled swipe gesture", deviceId_);1000+ MMI_HILOGI("TouchPad[%{public}d] cancelled swipe gesture", deviceId_);
999 break;1001 break;
1000 }1002 }
1001 case PointerEvent::POINTER_ACTION_AXIS_UPDATE:1003 case PointerEvent::POINTER_ACTION_AXIS_UPDATE:
1002 case PointerEvent::POINTER_ACTION_AXIS_BEGIN: {1004 case PointerEvent::POINTER_ACTION_AXIS_BEGIN: {
1003 pointerEvent_->SetPointerAction(PointerEvent::POINTER_ACTION_AXIS_END);1005 pointerEvent_->SetPointerAction(PointerEvent::POINTER_ACTION_AXIS_END);
1004 pointerEvent_->SetAxisValue(PointerEvent::AXIS_TYPE_PINCH, 1.0);1006 pointerEvent_->SetAxisValue(PointerEvent::AXIS_TYPE_PINCH, 1.0);
1005- MMI_HILOGI("TouchPad[%{public}d] cancelled pinch gesture", deviceId_);1007+ MMI_HILOGI("TouchPad[%{public}d] cancelled pinch gesture", deviceId_);
1006 break;1008 break;
1007 }1009 }
1008 case PointerEvent::POINTER_ACTION_ROTATE_UPDATE:1010 case PointerEvent::POINTER_ACTION_ROTATE_UPDATE:
1009 case PointerEvent::POINTER_ACTION_ROTATE_BEGIN: {1011 case PointerEvent::POINTER_ACTION_ROTATE_BEGIN: {
1010 pointerEvent_->SetPointerAction(PointerEvent::POINTER_ACTION_ROTATE_END);1012 pointerEvent_->SetPointerAction(PointerEvent::POINTER_ACTION_ROTATE_END);
1011- MMI_HILOGI("TouchPad[%{public}d] cancelled rotate gesture", deviceId_);1013+ MMI_HILOGI("TouchPad[%{public}d] cancelled rotate gesture", deviceId_);
1012 break;1014 break;
1013 }1015 }
1014 default: {1016 default: {
@@ -1017,7 +1019,7 @@ void TouchPadTransformProcessor::CancelAllGestures()
1017 }1019 }
1018 1020 
1019 pointerEvent_->UpdateId();1021 pointerEvent_->UpdateId();
1020- MMI_HILOGI("TouchPad[%{public}d] has active gesture, sending gesture end", deviceId_);1022+ MMI_HILOGI("TouchPad[%{public}d] has active gesture, sending gesture end", deviceId_);
1021 1023 
1022 auto inputChannel = InputHandler->GetEventNormalizeHandler();1024 auto inputChannel = InputHandler->GetEventNormalizeHandler();
1023 if (inputChannel != nullptr) {1025 if (inputChannel != nullptr) {
@@ -783,7 +783,7 @@ void CursorDrawingInformation::CheckMouseIconPath()
783 }783 }
784 for (auto iter = mouseIcons_.begin(); iter != mouseIcons_.end();) {784 for (auto iter = mouseIcons_.begin(); iter != mouseIcons_.end();) {
785 if ((ReadCursorStyleFile(iter->second.iconPath)) != RET_OK) {785 if ((ReadCursorStyleFile(iter->second.iconPath)) != RET_OK) {
786- MMI_HILOGI("invalid iconPath");786+ MMI_HILOGW("invalid iconPath");
787 iter = mouseIcons_.erase(iter);787 iter = mouseIcons_.erase(iter);
788 continue;788 continue;
789 }789 }
@@ -719,12 +719,12 @@ int32_t InputDisplayBindHelper::SetDisplayBind(int32_t deviceId, int32_t display
719 MMI_HILOGI("Param: deviceId:%{public}d, displayId:%{public}d", deviceId, displayId);719 MMI_HILOGI("Param: deviceId:%{public}d, displayId:%{public}d", deviceId, displayId);
720 if ((deviceId == -1) || (displayId == -1)) {720 if ((deviceId == -1) || (displayId == -1)) {
721 msg = "The deviceId or displayId is invalid";721 msg = "The deviceId or displayId is invalid";
722- MMI_HILOGE("%s", msg.c_str());722+ MMI_HILOGE("%{public}s", msg.c_str());
723 return RET_ERR;723 return RET_ERR;
724 }724 }
725 if (infos_ == nullptr) {725 if (infos_ == nullptr) {
726 msg = "Infos_ is nullptr";726 msg = "Infos_ is nullptr";
727- MMI_HILOGE("%s", msg.c_str());727+ MMI_HILOGE("%{public}s", msg.c_str());
728 return RET_ERR;728 return RET_ERR;
729 }729 }
730 730 
@@ -749,19 +749,19 @@ int32_t InputDisplayBindHelper::SetDisplayBind(int32_t deviceId, int32_t display
749 MMI_HILOGI("bindByDevice:%{public}d", bindByDevice.GetInputDeviceId());749 MMI_HILOGI("bindByDevice:%{public}d", bindByDevice.GetInputDeviceId());
750 } else {750 } else {
751 msg = "The deviceId is invalid";751 msg = "The deviceId is invalid";
752- MMI_HILOGE("%s", msg.c_str());752+ MMI_HILOGE("%{public}s", msg.c_str());
753 return RET_ERR;753 return RET_ERR;
754 }754 }
755 }755 }
756 if (bindByDisplay.GetDisplayId() == -1) {756 if (bindByDisplay.GetDisplayId() == -1) {
757 msg = "The displayId is invalid";757 msg = "The displayId is invalid";
758- MMI_HILOGE("%s", msg.c_str());758+ MMI_HILOGE("%{public}s", msg.c_str());
759 return RET_ERR;759 return RET_ERR;
760 }760 }
761 761 
762 if (infos_->GetBindDisplayIdByInputDevice(deviceId) == displayId) {762 if (infos_->GetBindDisplayIdByInputDevice(deviceId) == displayId) {
763 msg = "The input device and display has alread bind";763 msg = "The input device and display has alread bind";
764- MMI_HILOGE("%s", msg.c_str());764+ MMI_HILOGE("%{public}s", msg.c_str());
765 return RET_ERR;765 return RET_ERR;
766 }766 }
767 767 
@@ -800,6 +800,7 @@ int32_t InputDisplayBindHelper::SetDisplayBind(int32_t deviceId, int32_t display
800 }800 }
801 801 
802 msg = "Can not reach here";802 msg = "Can not reach here";
803+ MMI_HILOGD("InputDisplayBindHelper::%{public}s", msg.c_str());
803 return RET_ERR;804 return RET_ERR;
804}805}
805 806 
@@ -244,6 +244,7 @@ void InputWindowsManager::DeviceStatusChanged(int32_t deviceId, const std::strin
244 244 
245void InputWindowsManager::Init(UDSServer& udsServer)245void InputWindowsManager::Init(UDSServer& udsServer)
246{246{
247+ CALL_DEBUG_ENTER;
247 udsServer_ = &udsServer;248 udsServer_ = &udsServer;
248 CHKPV(udsServer_);249 CHKPV(udsServer_);
249 bindInfo_.Load();250 bindInfo_.Load();
@@ -1138,7 +1139,7 @@ int32_t InputWindowsManager::BindToDisplay(int32_t deviceId, int32_t displayId,
1138 const auto *displayInfo = GetPhysicalDisplay(displayId);1139 const auto *displayInfo = GetPhysicalDisplay(displayId);
1139 if (displayInfo == nullptr) {1140 if (displayInfo == nullptr) {
1140 msg = "The specified display does not exist.";1141 msg = "The specified display does not exist.";
1141- MMI_HILOGE("%s", msg.c_str());1142+ MMI_HILOGE("%{public}s", msg.c_str());
1142 return ERR_DISPLAY_NOT_EXIST;1143 return ERR_DISPLAY_NOT_EXIST;
1143 }1144 }
1144 // Defer the binding change until the device's current event sequence completes, so an in-flight1145 // Defer the binding change until the device's current event sequence completes, so an in-flight
@@ -3340,7 +3341,7 @@ void InputWindowsManager::PrintWindowInfo(const std::vector<WindowInfo> &windows
3340 window += StringPrintf("windowId:[");3341 window += StringPrintf("windowId:[");
3341 for (const auto &item : windowsInfo) {3342 for (const auto &item : windowsInfo) {
3342 MMI_HILOGD("windowsInfos, id:%{public}d, pid:%{public}d, agentPid:%{public}d, uid:%{public}d, "3343 MMI_HILOGD("windowsInfos, id:%{public}d, pid:%{public}d, agentPid:%{public}d, uid:%{public}d, "
3343- "area.x:%d, area.y:%d, area.width:%{public}d, area.height:%{public}d, "3344+ "area.x:%{private}d, area.y:%{private}d, area.width:%{public}d, area.height:%{public}d, "
3344 "defaultHotAreas.size:%{public}zu, pointerHotAreas.size:%{public}zu, "3345 "defaultHotAreas.size:%{public}zu, pointerHotAreas.size:%{public}zu, "
3345 "agentWindowId:%{public}d, flags:%{public}d, action:%{public}d, displayId:%{public}d, groupId:%{public}d"3346 "agentWindowId:%{public}d, flags:%{public}d, action:%{public}d, displayId:%{public}d, groupId:%{public}d"
3346 "zOrder:%{public}f, privacyMode:%{public}d, privacyProtect:%{public}d, windowType:%{public}d",3347 "zOrder:%{public}f, privacyMode:%{public}d, privacyProtect:%{public}d, windowType:%{public}d",
@@ -3349,11 +3350,11 @@ void InputWindowsManager::PrintWindowInfo(const std::vector<WindowInfo> &windows
3349 item.agentWindowId, item.flags, item.action, item.displayId, item.groupId, item.zOrder, item.privacyMode,3350 item.agentWindowId, item.flags, item.action, item.displayId, item.groupId, item.zOrder, item.privacyMode,
3350 item.isSkipSelfWhenShowOnVirtualScreen, static_cast<int32_t>(item.windowInputType));3351 item.isSkipSelfWhenShowOnVirtualScreen, static_cast<int32_t>(item.windowInputType));
3351 for (const auto &win : item.defaultHotAreas) {3352 for (const auto &win : item.defaultHotAreas) {
3352- MMI_HILOGD("defaultHotAreas:x:%d, y:%d, width:%{public}d, height:%{public}d",3353+ MMI_HILOGD("defaultHotAreas:x:%{private}d, y:%{private}d, width:%{public}d, height:%{public}d",
3353 win.x, win.y, win.width, win.height);3354 win.x, win.y, win.width, win.height);
3354 }3355 }
3355 for (const auto &pointer : item.pointerHotAreas) {3356 for (const auto &pointer : item.pointerHotAreas) {
3356- MMI_HILOGD("pointerHotAreas:x:%d, y:%d, width:%{public}d, height:%{public}d",3357+ MMI_HILOGD("pointerHotAreas:x:%{private}d, y:%{private}d, width:%{public}d, height:%{public}d",
3357 pointer.x, pointer.y, pointer.width, pointer.height);3358 pointer.x, pointer.y, pointer.width, pointer.height);
3358 }3359 }
3359 3360 
@@ -3526,7 +3527,8 @@ void InputWindowsManager::RotateScreen90(const OLD::DisplayInfo& info, PhysicalC
3526 coord.x = info.validWidth - 1 - coord.y;3527 coord.x = info.validWidth - 1 - coord.y;
3527 }3528 }
3528 coord.y = temp;3529 coord.y = temp;
3529- MMI_HILOGD("DIRECTION90, physicalXY:{%f %f}->{%f %f}", oldX, oldY, coord.x, coord.y);3530+ MMI_HILOGD("DIRECTION90, physicalXY:{%{private}f %{private}f}->{%{private}f %{private}f}",
3531+ oldX, oldY, coord.x, coord.y);
3530 return;3532 return;
3531}3533}
3532 3534 
@@ -3537,7 +3539,8 @@ void InputWindowsManager::RotateScreen(const OLD::DisplayInfo& info, PhysicalCoo
3537 const Direction direction = info.direction;3539 const Direction direction = info.direction;
3538 int32_t groupId = FindDisplayGroupId(info.id);3540 int32_t groupId = FindDisplayGroupId(info.id);
3539 if (direction == DIRECTION0) {3541 if (direction == DIRECTION0) {
3540- MMI_HILOGD("DIRECTION0, physicalXY:{%f %f}->{%f %f}", oldX, oldY, coord.x, coord.y);3542+ MMI_HILOGD("DIRECTION0, physicalXY:{%{private}f %{private}f}->{%{private}f %{private}f}",
3543+ oldX, oldY, coord.x, coord.y);
3541 return;3544 return;
3542 }3545 }
3543 if (direction == DIRECTION90) {3546 if (direction == DIRECTION90) {
@@ -3547,7 +3550,8 @@ void InputWindowsManager::RotateScreen(const OLD::DisplayInfo& info, PhysicalCoo
3547 if (direction == DIRECTION180) {3550 if (direction == DIRECTION180) {
3548 coord.x = info.validWidth - 1 - coord.x;3551 coord.x = info.validWidth - 1 - coord.x;
3549 coord.y = info.validHeight - 1 - coord.y;3552 coord.y = info.validHeight - 1 - coord.y;
3550- MMI_HILOGD("DIRECTION180, physicalXY:{%f %f}->{%f %f}", oldX, oldY, coord.x, coord.y);3553+ MMI_HILOGD("DIRECTION180, physicalXY:{%{private}f %{private}f}->{%{private}f %{private}f}",
3554+ oldX, oldY, coord.x, coord.y);
3551 return;3555 return;
3552 }3556 }
3553 if (direction == DIRECTION270) {3557 if (direction == DIRECTION270) {
@@ -3558,7 +3562,8 @@ void InputWindowsManager::RotateScreen(const OLD::DisplayInfo& info, PhysicalCoo
3558 coord.y = info.validHeight - 1 - coord.x;3562 coord.y = info.validHeight - 1 - coord.x;
3559 }3563 }
3560 coord.x = temp;3564 coord.x = temp;
3561- MMI_HILOGD("DIRECTION270, physicalXY:{%f %f}->{%f %f}", oldX, oldY, coord.x, coord.y);3565+ MMI_HILOGD("DIRECTION270, physicalXY:{%{private}f %{private}f}->{%{private}f %{private}f}",
3566+ oldX, oldY, coord.x, coord.y);
3562 }3567 }
3563}3568}
3564 3569 
@@ -3569,7 +3574,8 @@ void InputWindowsManager::RotateDisplayScreen(const OLD::DisplayInfo& info, Phys
3569 double oldX = coord.x;3574 double oldX = coord.x;
3570 double oldY = coord.y;3575 double oldY = coord.y;
3571 if (displayDirection == DIRECTION0) {3576 if (displayDirection == DIRECTION0) {
3572- MMI_HILOGD("DIRECTION0, IsSceneBoardEnabled:%d physicalXY:{%f,%f}", isEnable, oldX, oldY);3577+ MMI_HILOGD("DIRECTION0, IsSceneBoardEnabled:%{public}d physicalXY:{%{private}f,%{private}f}",
3578+ isEnable, oldX, oldY);
3573 return;3579 return;
3574 }3580 }
3575 if (displayDirection == DIRECTION90) {3581 if (displayDirection == DIRECTION90) {
@@ -3581,14 +3587,16 @@ void InputWindowsManager::RotateDisplayScreen(const OLD::DisplayInfo& info, Phys
3581 }3587 }
3582 coord.y = temp;3588 coord.y = temp;
3583 MMI_HILOGD(3589 MMI_HILOGD(
3584- "DIRECTION90, IsSceneBoardEnabled:%d physicalXY:{%f,%f}->{%f,%f}", isEnable, oldX, oldY, coord.x, coord.y);3590+ "DIRECTION90, IsSceneBoardEnabled:%{public}d physicalXY:{%{private}f,%{private}f}"
3591+ "->{%{private}f,%{private}f}", isEnable, oldX, oldY, coord.x, coord.y);
3585 return;3592 return;
3586 }3593 }
3587 if (displayDirection == DIRECTION180) {3594 if (displayDirection == DIRECTION180) {
3588 coord.x = info.validWidth - 1 - coord.x;3595 coord.x = info.validWidth - 1 - coord.x;
3589 coord.y = info.validHeight - 1 - coord.y;3596 coord.y = info.validHeight - 1 - coord.y;
3590 MMI_HILOGD(3597 MMI_HILOGD(
3591- "DIRECTION180, IsSceneBoardEnabled:%d physicalXY:{%f,%f}->{%f,%f}", isEnable, oldX, oldY, coord.x, coord.y);3598+ "DIRECTION180, IsSceneBoardEnabled:%{public}d physicalXY:{%{private}f,%{private}f}"
3599+ "->{%{private}f,%{private}f}", isEnable, oldX, oldY, coord.x, coord.y);
3592 return;3600 return;
3593 }3601 }
3594 if (displayDirection == DIRECTION270) {3602 if (displayDirection == DIRECTION270) {
@@ -3600,7 +3608,8 @@ void InputWindowsManager::RotateDisplayScreen(const OLD::DisplayInfo& info, Phys
3600 }3608 }
3601 coord.x = temp;3609 coord.x = temp;
3602 MMI_HILOGD(3610 MMI_HILOGD(
3603- "DIRECTION270, IsSceneBoardEnabled:%d physicalXY:{%f,%f}->{%f,%f}", isEnable, oldX, oldY, coord.x, coord.y);3611+ "DIRECTION270, IsSceneBoardEnabled:%{public}d physicalXY:{%{private}f,%{private}f}"
3612+ "->{%{private}f,%{private}f}", isEnable, oldX, oldY, coord.x, coord.y);
3604 }3613 }
3605}3614}
3606#endif // OHOS_BUILD_ENABLE_POINTER || OHOS_BUILD_ENABLE_TOUCH3615#endif // OHOS_BUILD_ENABLE_POINTER || OHOS_BUILD_ENABLE_TOUCH
@@ -4069,7 +4078,7 @@ int32_t InputWindowsManager::SetPointerStyle(int32_t pid, int32_t windowId, Poin
4069 4078 
4070 auto [isCheckOk, hostPid, hostWindowId] = GetHostPidAndHostWindowId(pid, windowId, token);4079 auto [isCheckOk, hostPid, hostWindowId] = GetHostPidAndHostWindowId(pid, windowId, token);
4071 if (!isCheckOk) {4080 if (!isCheckOk) {
4072- MMI_HILOG_CURSORI("SetPointerStyle, failed to get host pid and host windowId");4081+ MMI_HILOG_CURSORW("SetPointerStyle, failed to get host pid and host windowId");
4073 return RET_ERR;4082 return RET_ERR;
4074 }4083 }
4075 MMI_HILOG_CURSORD("SetPointerStyle, (%{public}d, %{public}d, %{public}d) => [%{public}d][%{public}d]=%{public}d",4084 MMI_HILOG_CURSORD("SetPointerStyle, (%{public}d, %{public}d, %{public}d) => [%{public}d][%{public}d]=%{public}d",
@@ -4090,13 +4099,13 @@ std::tuple<bool, int32_t, int32_t> InputWindowsManager::GetHostPidAndHostWindowI
4090 });4099 });
4091 4100 
4092 if (uiExtensionInfoIter == uiExtensionInfos_.end()) {4101 if (uiExtensionInfoIter == uiExtensionInfos_.end()) {
4093- MMI_HILOG_CURSORI("Not found UEA Info, ueaPid:%{public}d, hostWindowId:%{public}d", pid, windowId);4102+ MMI_HILOG_CURSORW("Not found UEA Info, ueaPid:%{public}d, hostWindowId:%{public}d", pid, windowId);
4094 return {false, INVALID_PID, -1};4103 return {false, INVALID_PID, -1};
4095 }4104 }
4096 4105 
4097 int32_t hostPid = GetWindowPid(windowId);4106 int32_t hostPid = GetWindowPid(windowId);
4098 if (hostPid < 0) {4107 if (hostPid < 0) {
4099- MMI_HILOG_CURSORI("Failed to get hostPid, ueaPid:%{public}d, hostWindowId:%{public}d", pid, windowId);4108+ MMI_HILOG_CURSORW("Failed to get hostPid, ueaPid:%{public}d, hostWindowId:%{public}d", pid, windowId);
4100 return {false, INVALID_PID, -1};4109 return {false, INVALID_PID, -1};
4101 }4110 }
4102 4111 
@@ -4196,7 +4205,7 @@ int32_t InputWindowsManager::GetPointerStyle(int32_t pid, int32_t windowId, Poin
4196 auto [isCheckOk, hostPid, hostWindowId] = GetHostPidAndHostWindowId(pid, windowId, token);4205 auto [isCheckOk, hostPid, hostWindowId] = GetHostPidAndHostWindowId(pid, windowId, token);
4197 if (!isCheckOk) {4206 if (!isCheckOk) {
4198 pointerStyle = globalStyle_;4207 pointerStyle = globalStyle_;
4199- MMI_HILOG_CURSORI("GetPointerStyle, failed to get host pid and host windowId");4208+ MMI_HILOG_CURSORW("GetPointerStyle, failed to get host pid and host windowId");
4200 return RET_OK;4209 return RET_OK;
4201 }4210 }
4202 return GetPointerStyleInfo(hostPid, hostWindowId, pointerStyle);4211 return GetPointerStyleInfo(hostPid, hostWindowId, pointerStyle);
@@ -6315,7 +6324,7 @@ int32_t InputWindowsManager::UpdateTouchScreenTarget(std::shared_ptr<PointerEven
6315 for (const auto& [zOrder, fingerMap] : touchRedispatchStore_.GetFingerMap()) {6324 for (const auto& [zOrder, fingerMap] : touchRedispatchStore_.GetFingerMap()) {
6316 auto iter = fingerMap.find({pointerEvent->GetDeviceId(), pointerId});6325 auto iter = fingerMap.find({pointerEvent->GetDeviceId(), pointerId});
6317 if (iter != fingerMap.end() && iter->second.windowId == touchWindow->id) {6326 if (iter != fingerMap.end() && iter->second.windowId == touchWindow->id) {
6318- MMI_HILOGI("Touch DOWN conflicts with active redispatch finger, "6327+ MMI_HILOGW("Touch DOWN conflicts with active redispatch finger, "
6319 "zOrder:%{public}f deviceId:%{public}d pointerId:%{public}d windowId:%{public}d",6328 "zOrder:%{public}f deviceId:%{public}d pointerId:%{public}d windowId:%{public}d",
6320 zOrder, pointerEvent->GetDeviceId(), pointerId, touchWindow->id);6329 zOrder, pointerEvent->GetDeviceId(), pointerId, touchWindow->id);
6321 DispatchTouchRedispatch(PointerEvent::POINTER_ACTION_CANCEL,6330 DispatchTouchRedispatch(PointerEvent::POINTER_ACTION_CANCEL,
@@ -7151,14 +7160,22 @@ void InputWindowsManager::DispatchTouch(int32_t pointerAction, int32_t groupId,
7151 continue;7160 continue;
7152 }7161 }
7153 if ((item.flags & WindowInputPolicy::FLAG_DRAG_DISABLED) == WindowInputPolicy::FLAG_DRAG_DISABLED) {7162 if ((item.flags & WindowInputPolicy::FLAG_DRAG_DISABLED) == WindowInputPolicy::FLAG_DRAG_DISABLED) {
7163+ MMI_HILOGD("Skip drag-disabled window to continue searching, window:%{public}d, "
7164+ "flags:%{public}d", item.id, item.flags);
7154 continue;7165 continue;
7155 }7166 }
7156 if (IsInHotArea(lastInfo.lastTouchLogicX, lastInfo.lastTouchLogicY, item.dragDisabledAreas, item)) {7167 if (IsInHotArea(lastInfo.lastTouchLogicX, lastInfo.lastTouchLogicY, item.dragDisabledAreas, item)) {
7168+ MMI_HILOGD("Touch point is in drag disabled area, window:%{public}d, "
7169+ "logicX:%{private}d, logicY:%{private}d", item.id,
7170+ lastInfo.lastTouchLogicX, lastInfo.lastTouchLogicY);
7157 continue;7171 continue;
7158 }7172 }
7159 if ((lastPointerItem.GetToolType() == PointerEvent::TOOL_TYPE_PEN && !lastPointerItem.IsPressed()) &&7173 if ((lastPointerItem.GetToolType() == PointerEvent::TOOL_TYPE_PEN && !lastPointerItem.IsPressed()) &&
7160 ((item.windowInputType == WindowInputType::MIX_LEFT_RIGHT_ANTI_AXIS_MOVE) ||7174 ((item.windowInputType == WindowInputType::MIX_LEFT_RIGHT_ANTI_AXIS_MOVE) ||
7161 (item.windowInputType == WindowInputType::MIX_BUTTOM_ANTI_AXIS_MOVE))) {7175 (item.windowInputType == WindowInputType::MIX_BUTTOM_ANTI_AXIS_MOVE))) {
7176+ MMI_HILOGD("Skip anti-axis window for hovering pen to continue searching, window:%{public}d, "
7177+ "windowInputType:%{public}d, toolType:%{public}d", item.id,
7178+ static_cast<int32_t>(item.windowInputType), lastPointerItem.GetToolType());
7162 continue;7179 continue;
7163 }7180 }
7164 if (IsInHotArea(lastInfo.lastTouchLogicX, lastInfo.lastTouchLogicY, item.defaultHotAreas, item)) {7181 if (IsInHotArea(lastInfo.lastTouchLogicX, lastInfo.lastTouchLogicY, item.defaultHotAreas, item)) {
@@ -8507,7 +8524,7 @@ void InputWindowsManager::ReverseXY(int32_t &x, int32_t &y)
8507 }8524 }
8508 const Direction direction = DisplaysInfo.front().direction;8525 const Direction direction = DisplaysInfo.front().direction;
8509 if (direction < Direction::DIRECTION0 || direction > Direction::DIRECTION270) {8526 if (direction < Direction::DIRECTION0 || direction > Direction::DIRECTION270) {
8510- MMI_HILOGE("direction is invalid, direction:%{public}d", direction);8527+ MMI_HILOGE("direction is invalid, direction:%{private}d", direction);
8511 return;8528 return;
8512 }8529 }
8513 Coordinate2D matrix { 0.0, 0.0 };8530 Coordinate2D matrix { 0.0, 0.0 };
@@ -654,7 +654,7 @@ void PointerDrawingManager::DrawMovePointer(uint64_t rsId, int32_t physicalX, in
654 MMI_HILOGE("SetCursorLocation failed");654 MMI_HILOGE("SetCursorLocation failed");
655 return;655 return;
656 }656 }
657- MMI_HILOGD("Move pointer, physicalX:%d, physicalY:%d", physicalX, physicalY);657+ MMI_HILOGD("Move pointer, physicalX:%{private}d, physicalY:%{private}d", physicalX, physicalY);
658 }658 }
659}659}
660 660 
@@ -3910,7 +3910,7 @@ void PointerDrawingManager::MoveRetryAsync(uint64_t displayId, int32_t x, int32_
3910 MMI_HILOGE("Move retry failed, stillFailedScreens size:%{public}zu, TimerId:%{public}d",3910 MMI_HILOGE("Move retry failed, stillFailedScreens size:%{public}zu, TimerId:%{public}d",
3911 stillFailedScreens.size(), moveRetryTimerId_.load());3911 stillFailedScreens.size(), moveRetryTimerId_.load());
3912 if (moveRetryCount_.load() == MAX_MOVE_RETRY_COUNT) {3912 if (moveRetryCount_.load() == MAX_MOVE_RETRY_COUNT) {
3913- MMI_HILOGI("Move retry exceed max count, stop retry");3913+ MMI_HILOGW("Move retry exceed max count, stop retry");
3914 moveRetryActive_ = false;3914 moveRetryActive_ = false;
3915 moveRetryTimerId_ = DEFAULT_VALUE;3915 moveRetryTimerId_ = DEFAULT_VALUE;
3916 moveRetryCount_ = 0;3916 moveRetryCount_ = 0;
@@ -115,7 +115,7 @@ ScreenPointer::ScreenLiteInfo ScreenPointer::ResolveScreenLiteInfo(const screen_
115 }115 }
116 auto displayLite = OHOS::Rosen::DisplayManagerLite::GetInstance().GetDisplayById(si->GetScreenId());116 auto displayLite = OHOS::Rosen::DisplayManagerLite::GetInstance().GetDisplayById(si->GetScreenId());
117 if (displayLite == nullptr) {117 if (displayLite == nullptr) {
118- MMI_HILOGI("screenId=%{public}" PRIu64 ", BUILT_IN but displayLite is nullptr", si->GetRsId());118+ MMI_HILOGW("screenId=%{public}" PRIu64 ", BUILT_IN but displayLite is nullptr", si->GetRsId());
119 return result;119 return result;
120 }120 }
121 uint32_t logicalWidth = static_cast<uint32_t>(displayLite->GetWidth());121 uint32_t logicalWidth = static_cast<uint32_t>(displayLite->GetWidth());
@@ -455,7 +455,7 @@ void ScreenPointer::OnDisplayInfo(const OLD::DisplayInfo &di)
455 }455 }
456 456 
457 offRenderScale_ = float(realWidth) / di.width;457 offRenderScale_ = float(realWidth) / di.width;
458- MMI_HILOGD("Update with DisplayInfo, screenRealDPI=%{public}d, offRenderScale_=(%{public}f ",458+ MMI_HILOGD("Update with DisplayInfo, screenRealDPI:%{public}d, offRenderScale_:(%{public}f)",
459 di.screenRealDPI, offRenderScale_);459 di.screenRealDPI, offRenderScale_);
460 }460 }
461}461}
@@ -686,7 +686,7 @@ bool ScreenPointer::SetInvisible()
686 int32_t width = buffer->GetWidth();686 int32_t width = buffer->GetWidth();
687 int32_t height = buffer->GetHeight();687 int32_t height = buffer->GetHeight();
688 if ((width < 0) || (height < 0)) {688 if ((width < 0) || (height < 0)) {
689- MMI_HILOGI("The input data is incorrect, width:%{public}d, height:%{public}d.", width, height);689+ MMI_HILOGW("The input data is incorrect, width:%{public}d, height:%{public}d.", width, height);
690 return false;690 return false;
691 }691 }
692 auto sret = buffer->FlushCache();692 auto sret = buffer->FlushCache();
@@ -270,7 +270,7 @@ void TouchDrawingManager::CreateBubbleObserverByApp(T &item)
270 auto ret = SettingDataShare::GetInstance(MULTIMODAL_INPUT_SERVICE_ID)270 auto ret = SettingDataShare::GetInstance(MULTIMODAL_INPUT_SERVICE_ID)
271 .GetBoolValue(key, item.isShow);271 .GetBoolValue(key, item.isShow);
272 if (ret != RET_OK) {272 if (ret != RET_OK) {
273- MMI_HILOGI("Get value from setting date fail");273+ MMI_HILOGW("Get value from setting date fail");
274 screenRecondingBubbleStatus_ = "";274 screenRecondingBubbleStatus_ = "";
275 return;275 return;
276 }276 }
@@ -62,7 +62,7 @@ DeviceBase* GetDeviceObject::CreateDeviceObject(const std::string &deviceName)
62 } else if (IsMouseDevice(deviceName)) {62 } else if (IsMouseDevice(deviceName)) {
63 deviceBasePtr = new (std::nothrow) ProcessingMouseDevice();63 deviceBasePtr = new (std::nothrow) ProcessingMouseDevice();
64 } else {64 } else {
65- MMI_HILOGI("Not supported device :%s", deviceName.c_str());65+ MMI_HILOGI("Not supported device :%{public}s", deviceName.c_str());
66 }66 }
67 CHKPP(deviceBasePtr);67 CHKPP(deviceBasePtr);
68 return deviceBasePtr;68 return deviceBasePtr;
@@ -28,7 +28,8 @@ int32_t main(int32_t argc, char* argv[])
28 SetThreadName("main");28 SetThreadName("main");
29 InjectionToolsHelpFunc helpFunc;29 InjectionToolsHelpFunc helpFunc;
30 if (!helpFunc.CheckInjectionCommand(argc, argv)) {30 if (!helpFunc.CheckInjectionCommand(argc, argv)) {
31- MMI_HILOGE("Invalid Input Para, Please Check the validity of the para! errCode:%d", PARAM_INPUT_FAIL);31+ MMI_HILOGE("Invalid Input Para, Please Check the validity of the para! errCode:%{public}d",
32+ PARAM_INPUT_FAIL);
32 std::cout << "Try './mmi-event-injection --help' for more information" << std::endl;33 std::cout << "Try './mmi-event-injection --help' for more information" << std::endl;
33 return RET_ERR;34 return RET_ERR;
34 }35 }
@@ -578,6 +578,8 @@ int32_t InputEventDataTransformation::MarshallingEnhanceData(std::shared_ptr<Poi
578 int32_t result = Security::SecurityComponent::SecCompEnhanceKit::GetPointerEventEnhanceData(secCompPointEvent,578 int32_t result = Security::SecurityComponent::SecCompEnhanceKit::GetPointerEventEnhanceData(secCompPointEvent,
579 dataLen, enHanceData, enHanceDataLen);579 dataLen, enHanceData, enHanceDataLen);
580 if (result != 0 || enHanceDataLen > MAX_HMAC_SIZE) {580 if (result != 0 || enHanceDataLen > MAX_HMAC_SIZE) {
581+ MMI_HILOGE("Get pointer event enhance data failed, result:%{public}d, enHanceDataLen:%{public}u",
582+ result, enHanceDataLen);
581 pkt << uint32_t(0U);583 pkt << uint32_t(0U);
582 free(secCompPointEvent);584 free(secCompPointEvent);
583 secCompPointEvent = nullptr;585 secCompPointEvent = nullptr;
@@ -635,6 +637,8 @@ int32_t InputEventDataTransformation::MarshallingEnhanceData(std::shared_ptr<Key
635 int32_t result = Security::SecurityComponent::SecCompEnhanceKit::GetPointerEventEnhanceData(&secCompKeyEvent,637 int32_t result = Security::SecurityComponent::SecCompEnhanceKit::GetPointerEventEnhanceData(&secCompKeyEvent,
636 dataLen, enHanceData, enHanceDataLen);638 dataLen, enHanceData, enHanceDataLen);
637 if (result != 0 || enHanceDataLen > MAX_HMAC_SIZE) {639 if (result != 0 || enHanceDataLen > MAX_HMAC_SIZE) {
640+ MMI_HILOGE("Get key event enhance data failed, result:%{public}d, enHanceDataLen:%{public}u",
641+ result, enHanceDataLen);
638 pkt << 0;642 pkt << 0;
639 return RET_ERR;643 return RET_ERR;
640 }644 }