From 56b3122c105516327939d60d9869a338441494fc Mon Sep 17 00:00:00 2001 From: wuyiwuyiwywy Date: Fri, 28 Jul 2023 18:22:21 +0800 Subject: [PATCH] mmi_dfx_0728 Signed-off-by: wuyiwuyiwywy --- service/dfx/include/dfx_hisysevent.h | 9 -------- service/dfx/src/dfx_hisysevent.cpp | 23 ------------------- service/hisysevent.yaml | 12 ++-------- .../src/mouse_transform_processor.cpp | 7 ------ .../src/touchpad_transform_processor.cpp | 4 ---- 5 files changed, 2 insertions(+), 53 deletions(-) diff --git a/service/dfx/include/dfx_hisysevent.h b/service/dfx/include/dfx_hisysevent.h index a3af405702..a8358c1bcd 100644 --- a/service/dfx/include/dfx_hisysevent.h +++ b/service/dfx/include/dfx_hisysevent.h @@ -53,13 +53,6 @@ public: int32_t serverFd { -1 }; }; - enum TOUCHPAD_SETTING_FAULT_CODE { - READ_SETTING_ERROR = 1, - WRITE_SETTING_ERROR, - SETTING_SYNC_ERROR, - TOUCHPAD_ERROR - }; - enum TOUCHPAD_SETTING_CODE { TOUCHPAD_SCROLL_SETTING = 1, TOUCHPAD_SCROLL_DIR_SETTING, @@ -102,8 +95,6 @@ public: static void ReportTouchpadSettingState(TOUCHPAD_SETTING_CODE settingCode, bool flag); static void ReportTouchpadSettingState(TOUCHPAD_SETTING_CODE settingCode, int32_t value); static void StatisticTouchpadGesture(std::shared_ptr pointerEvent); - static void ReportTouchpadSettingFault(uint32_t settingFaultCode); - static void ReportTouchpadTypeFault(uint32_t typeFaultCode); private: static inline int64_t dispatchStartTime_ { 0 }; diff --git a/service/dfx/src/dfx_hisysevent.cpp b/service/dfx/src/dfx_hisysevent.cpp index 672a5a512d..182f2de998 100644 --- a/service/dfx/src/dfx_hisysevent.cpp +++ b/service/dfx/src/dfx_hisysevent.cpp @@ -516,29 +516,6 @@ void DfxHisysevent::ReportTouchpadSettingState(TOUCHPAD_SETTING_CODE settingCode } } -void DfxHisysevent::ReportTouchpadSettingFault(uint32_t settingFaultCode) -{ - int32_t ret = HiSysEventWrite( - OHOS::HiviewDFX::HiSysEvent::Domain::MULTI_MODAL_INPUT, - "TOUCHPAD_SETTING_FAULT_CODE", - OHOS::HiviewDFX::HiSysEvent::EventType::FAULT, - "FAULT_CODE", settingFaultCode); - if (ret != RET_OK) { - MMI_HILOGE("HiviewDFX Write failed, ret:%{public}d", ret); - } -} - -void DfxHisysevent::ReportTouchpadTypeFault(uint32_t typeFaultCode) -{ - int32_t ret = HiSysEventWrite( - OHOS::HiviewDFX::HiSysEvent::Domain::MULTI_MODAL_INPUT, - "TOUCHPAD_TYPE_FAULT_CODE", - OHOS::HiviewDFX::HiSysEvent::EventType::FAULT, - "FAULT_CODE", typeFaultCode); - if (ret != RET_OK) { - MMI_HILOGE("HiviewDFX Write failed, ret:%{public}d", ret); - } -} } } diff --git a/service/hisysevent.yaml b/service/hisysevent.yaml index ef68c184eb..e231bbd7ce 100644 --- a/service/hisysevent.yaml +++ b/service/hisysevent.yaml @@ -189,11 +189,11 @@ LID_SWITCH: TOUCHPAD_PINCH: __BASE: {type: STATISTIC, level: MINOR, desc: touchpad pinch} - FINGER_COUNT: {type: INT32, desc: pinch statistic} + FINGER_COUNT: {type: INT32, desc: pinch finger statistic} TOUCHPAD_SWIPE: __BASE: {type: STATISTIC, level: MINOR, desc: touchpad swipe} - FINGER_COUNT: {type: INT32, desc: swipe statistic} + FINGER_COUNT: {type: INT32, desc: swipe finger statistic} TOUCHPAD_SCROLL_SETTING: __BASE: {type: BEHAVIOR, level: MINOR, desc: touchpad scroll setting} @@ -222,11 +222,3 @@ TOUCHPAD_POINTER_SPEED_SETTING: TOUCHPAD_RIGHT_CLICK_SETTING: __BASE: {type: BEHAVIOR, level: MINOR, desc: touchpad right click setting} SWITCH_VALUE: {type: INT32, desc: touchpad right click setting} - -TOUCHPAD_SETTING_FAULT_CODE: - __BASE: {type: FAULT, level: MINOR, desc: report touchpad setting fault} - FAULT_CODE: {type: UINT32, desc: report touchpad setting fault code} - -TOUCHPAD_TYPE_FAULT_CODE: - __BASE: {type: FAULT, level: MINOR, desc: report touchpad type fault} - FAULT_CODE: {type: UINT32, desc: report touchpad type fault code} diff --git a/service/mouse_event_normalize/src/mouse_transform_processor.cpp b/service/mouse_event_normalize/src/mouse_transform_processor.cpp index 11b9fbe37d..0be80958d7 100644 --- a/service/mouse_event_normalize/src/mouse_transform_processor.cpp +++ b/service/mouse_event_normalize/src/mouse_transform_processor.cpp @@ -479,7 +479,6 @@ int32_t MouseTransformProcessor::Normalize(struct libinput_event *event) result = HandleAxisBeginEndInner(event); break; default: - DfxHisysevent::ReportTouchpadTypeFault(type); MMI_HILOGE("Unknown type:%{public}d", type); return RET_ERR; } @@ -993,13 +992,11 @@ int32_t MouseTransformProcessor::PutConfigDataToDatabase(std::string &key, bool int32_t ret = pref->PutBool(key, value); if (ret != RET_OK) { MMI_HILOGE("Put value is failed, ret:%{public}d", ret); - DfxHisysevent::ReportTouchpadSettingFault(DfxHisysevent::TOUCHPAD_SETTING_FAULT_CODE::WRITE_SETTING_ERROR); return RET_ERR; } ret = pref->FlushSync(); if (ret != RET_OK) { MMI_HILOGE("Flush sync is failed, ret:%{public}d", ret); - DfxHisysevent::ReportTouchpadSettingFault(DfxHisysevent::TOUCHPAD_SETTING_FAULT_CODE::SETTING_SYNC_ERROR); return RET_ERR; } @@ -1014,7 +1011,6 @@ int32_t MouseTransformProcessor::GetConfigDataFromDatabase(std::string &key, boo NativePreferences::PreferencesHelper::GetPreferences(mouseFileName, errCode); if (pref == nullptr) { MMI_HILOGE("pref is nullptr, errCode: %{public}d", errCode); - DfxHisysevent::ReportTouchpadSettingFault(DfxHisysevent::TOUCHPAD_SETTING_FAULT_CODE::READ_SETTING_ERROR); return RET_ERR; } value = pref->GetBool(key, true); @@ -1035,13 +1031,11 @@ int32_t MouseTransformProcessor::PutConfigDataToDatabase(std::string &key, int32 int32_t ret = pref->PutInt(key, value); if (ret != RET_OK) { MMI_HILOGE("Put value is failed, ret:%{public}d", ret); - DfxHisysevent::ReportTouchpadSettingFault(DfxHisysevent::TOUCHPAD_SETTING_FAULT_CODE::WRITE_SETTING_ERROR); return RET_ERR; } ret = pref->FlushSync(); if (ret != RET_OK) { MMI_HILOGE("Flush sync is failed, ret:%{public}d", ret); - DfxHisysevent::ReportTouchpadSettingFault(DfxHisysevent::TOUCHPAD_SETTING_FAULT_CODE::SETTING_SYNC_ERROR); return RET_ERR; } @@ -1056,7 +1050,6 @@ int32_t MouseTransformProcessor::GetConfigDataFromDatabase(std::string &key, int NativePreferences::PreferencesHelper::GetPreferences(mouseFileName, errCode); if (pref == nullptr) { MMI_HILOGE("pref is nullptr, errCode: %{public}d", errCode); - DfxHisysevent::ReportTouchpadSettingFault(DfxHisysevent::TOUCHPAD_SETTING_FAULT_CODE::READ_SETTING_ERROR); return RET_ERR; } value = pref->GetInt(key, 0); diff --git a/service/touch_event_normalize/src/touchpad_transform_processor.cpp b/service/touch_event_normalize/src/touchpad_transform_processor.cpp index c9f99e3bb7..b152081832 100644 --- a/service/touch_event_normalize/src/touchpad_transform_processor.cpp +++ b/service/touch_event_normalize/src/touchpad_transform_processor.cpp @@ -223,7 +223,6 @@ std::shared_ptr TouchPadTransformProcessor::OnEvent(struct libinpu break; } default: { - DfxHisysevent::ReportTouchpadTypeFault(type); return nullptr; } } @@ -515,13 +514,11 @@ int32_t TouchPadTransformProcessor::PutConfigDataToDatabase(std::string &key, bo int32_t ret = pref->PutBool(key, value); if (ret != RET_OK) { MMI_HILOGE("Put value is failed, ret:%{public}d", ret); - DfxHisysevent::ReportTouchpadSettingFault(DfxHisysevent::TOUCHPAD_SETTING_FAULT_CODE::WRITE_SETTING_ERROR); return RET_ERR; } ret = pref->FlushSync(); if (ret != RET_OK) { MMI_HILOGE("Flush sync is failed, ret:%{public}d", ret); - DfxHisysevent::ReportTouchpadSettingFault(DfxHisysevent::TOUCHPAD_SETTING_FAULT_CODE::SETTING_SYNC_ERROR); return RET_ERR; } @@ -536,7 +533,6 @@ int32_t TouchPadTransformProcessor::GetConfigDataFromDatabase(std::string &key, NativePreferences::PreferencesHelper::GetPreferences(TOUCHPAD_FILE_NAME, errCode); if (pref == nullptr) { MMI_HILOGE("pref is nullptr, errCode: %{public}d", errCode); - DfxHisysevent::ReportTouchpadSettingFault(DfxHisysevent::TOUCHPAD_SETTING_FAULT_CODE::READ_SETTING_ERROR); return RET_ERR; } value = pref->GetBool(key, true); -- Gitee