1 /*
2 * Copyright (c) 2023 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16 #include "mock_event_report.h"
17
18 #include "base/log/event_report.h"
19
20 namespace OHOS::Ace {
21 DragInfo MockEventReport::dragInfo_;
22 FRCSceneFpsInfo EventReport::curFRCSceneFpsInfo_;
23 int64_t EventReport::calTime_ = 0;
24 int32_t EventReport::calFrameRate_ = 0;
25
SendEvent(const EventInfo & eventInfo)26 void EventReport::SendEvent(const EventInfo& eventInfo) {}
27
SendJsCardRenderTimeEvent(const std::string & sessionID,const std::string & timeType,uint64_t timeDelay)28 void EventReport::SendJsCardRenderTimeEvent(
29 const std::string& sessionID, const std::string& timeType, uint64_t timeDelay)
30 {}
31
SendAppStartException(AppStartExcepType type)32 void EventReport::SendAppStartException(AppStartExcepType type) {}
33
SendPageRouterException(PageRouterExcepType type,const std::string & pageUrl)34 void EventReport::SendPageRouterException(PageRouterExcepType type, const std::string& pageUrl) {}
35
SendComponentException(ComponentExcepType type)36 void EventReport::SendComponentException(ComponentExcepType type) {}
37
SendAPIChannelException(APIChannelExcepType type)38 void EventReport::SendAPIChannelException(APIChannelExcepType type) {}
39
SendRenderException(RenderExcepType type)40 void EventReport::SendRenderException(RenderExcepType type) {}
41
SendJsException(JsExcepType type)42 void EventReport::SendJsException(JsExcepType type) {}
43
SendAnimationException(AnimationExcepType type)44 void EventReport::SendAnimationException(AnimationExcepType type) {}
45
SendEventException(EventExcepType type)46 void EventReport::SendEventException(EventExcepType type) {}
47
SendInternalException(InternalExcepType type)48 void EventReport::SendInternalException(InternalExcepType type) {}
49
SendAccessibilityException(AccessibilityExcepType type)50 void EventReport::SendAccessibilityException(AccessibilityExcepType type) {}
51
ReportAccessibilityFailEvent(const std::string & actionName)52 void EventReport::ReportAccessibilityFailEvent(const std::string& actionName) {}
53
SendFormException(FormExcepType type)54 void EventReport::SendFormException(FormExcepType type) {}
55
JsEventReport(int32_t eventType,const std::string & jsonStr)56 void EventReport::JsEventReport(int32_t eventType, const std::string& jsonStr) {}
57
JsErrReport(const std::string & packageName,const std::string & reason,const std::string & summary)58 void EventReport::JsErrReport(const std::string& packageName, const std::string& reason, const std::string& summary) {}
59
ANRRawReport(RawEventType type,int32_t uid,const std::string & packageName,const std::string & processName,const std::string & msg)60 void EventReport::ANRRawReport(RawEventType type, int32_t uid, const std::string& packageName,
61 const std::string& processName, const std::string& msg)
62 {}
63
ANRShowDialog(int32_t uid,const std::string & packageName,const std::string & processName,const std::string & msg)64 void EventReport::ANRShowDialog(
65 int32_t uid, const std::string& packageName, const std::string& processName, const std::string& msg)
66 {}
67
SendEventInner(const EventInfo & eventInfo)68 void EventReport::SendEventInner(const EventInfo& eventInfo) {}
69
ReportDoubleClickTitle(int32_t stateChange)70 void EventReport::ReportDoubleClickTitle(int32_t stateChange) {}
71
ReportClickTitleMaximizeMenu(int32_t maxMenuItem,int32_t stateChange)72 void EventReport::ReportClickTitleMaximizeMenu(int32_t maxMenuItem, int32_t stateChange) {}
73
ReportPageNodeOverflow(const std::string & pageUrl,int32_t nodeCount,int32_t threshold)74 void EventReport::ReportPageNodeOverflow(const std::string& pageUrl, int32_t nodeCount, int32_t threshold) {}
75
ReportPageDepthOverflow(const std::string & pageUrl,int32_t depth,int32_t threshold)76 void EventReport::ReportPageDepthOverflow(const std::string& pageUrl, int32_t depth, int32_t threshold) {}
77
ReportFunctionTimeout(const std::string & functionName,int64_t time,int32_t threshold)78 void EventReport::ReportFunctionTimeout(const std::string& functionName, int64_t time, int32_t threshold) {}
79
ReportHoverStatusChange(int32_t foldStatus,int32_t time,bool isHoverMode,int32_t appRotation,int32_t windowMode)80 void EventReport::ReportHoverStatusChange(
81 int32_t foldStatus, int32_t time, bool isHoverMode, int32_t appRotation, int32_t windowMode)
82 {}
83
ReportNonManualPostCardActionInfo(const std::string & formName,const std::string & bundleName,const std::string & abilityName,const std::string & moduleName,int32_t dimension)84 void EventReport::ReportNonManualPostCardActionInfo(const std::string& formName, const std::string& bundleName,
85 const std::string& abilityName, const std::string& moduleName, int32_t dimension)
86 {}
87
ReportDragInfo(const DragInfo & dragInfo)88 void EventReport::ReportDragInfo(const DragInfo& dragInfo)
89 {
90 MockEventReport::dragInfo_ = dragInfo;
91 return;
92 }
93
ReportScrollableErrorEvent(const std::string & nodeType,ScrollableErrorType errorType,const std::string & subErrorType)94 void EventReport::ReportScrollableErrorEvent(
95 const std::string& nodeType, ScrollableErrorType errorType, const std::string& subErrorType)
96 {}
97
ReportRichEditorInfo(const RichEditorInfo & richEditorInfo)98 void EventReport::ReportRichEditorInfo(const RichEditorInfo& richEditorInfo) {}
99
ReportTextFieldErrorEvent(int32_t frameNodeId,int32_t depth,const std::string & errorType)100 void EventReport::ReportTextFieldErrorEvent(int32_t frameNodeId, int32_t depth, const std::string& errorType)
101 {}
102
ReportClipboardFailEvent(const std::string & errorType)103 void EventReport::ReportClipboardFailEvent(const std::string& errorType)
104 {}
105
ReportPageSlidInfo(NG::SlidInfo & slidinfo)106 void EventReport::ReportPageSlidInfo(NG::SlidInfo &slidinfo)
107 {}
108
SendDiffFrameRatesDuring(const std::string & scene,const FRCSceneFpsInfo & curFRCSceneFpsInfo_)109 void EventReport::SendDiffFrameRatesDuring(const std::string& scene, const FRCSceneFpsInfo& curFRCSceneFpsInfo_)
110 {}
111
FrameRateDurationsStatistics(int32_t expectedRate,const std::string & scene,NG::SceneStatus status)112 void EventReport::FrameRateDurationsStatistics(int32_t expectedRate, const std::string& scene, NG::SceneStatus status)
113 {}
114
AddFrameRateDuration(int32_t frameRate,int64_t duration)115 void EventReport::AddFrameRateDuration(int32_t frameRate, int64_t duration)
116 {}
117
StopFormModifyTimeoutReportTimer(int64_t formId)118 void EventReport::StopFormModifyTimeoutReportTimer(int64_t formId)
119 {}
120
StartFormModifyTimeoutReportTimer(int64_t formId,const std::string & bundleName,const std::string & formName)121 void EventReport::StartFormModifyTimeoutReportTimer(int64_t formId, const std::string &bundleName,
122 const std::string &formName)
123 {}
124 } // namespace OHOS::Ace
125