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,const std::string & uniqueId)58 void EventReport::JsErrReport(
59 const std::string& packageName, const std::string& reason, const std::string& summary, const std::string& uniqueId)
60 {}
61
ANRRawReport(RawEventType type,int32_t uid,const std::string & packageName,const std::string & processName,const std::string & msg)62 void EventReport::ANRRawReport(RawEventType type, int32_t uid, const std::string& packageName,
63 const std::string& processName, const std::string& msg)
64 {}
65
ANRShowDialog(int32_t uid,const std::string & packageName,const std::string & processName,const std::string & msg)66 void EventReport::ANRShowDialog(
67 int32_t uid, const std::string& packageName, const std::string& processName, const std::string& msg)
68 {}
69
SendEventInner(const EventInfo & eventInfo)70 void EventReport::SendEventInner(const EventInfo& eventInfo) {}
71
ReportDoubleClickTitle(int32_t stateChange)72 void EventReport::ReportDoubleClickTitle(int32_t stateChange) {}
73
ReportClickTitleMaximizeMenu(int32_t maxMenuItem,int32_t stateChange)74 void EventReport::ReportClickTitleMaximizeMenu(int32_t maxMenuItem, int32_t stateChange) {}
75
ReportPageNodeOverflow(const std::string & pageUrl,int32_t nodeCount,int32_t threshold)76 void EventReport::ReportPageNodeOverflow(const std::string& pageUrl, int32_t nodeCount, int32_t threshold) {}
77
ReportPageDepthOverflow(const std::string & pageUrl,int32_t depth,int32_t threshold)78 void EventReport::ReportPageDepthOverflow(const std::string& pageUrl, int32_t depth, int32_t threshold) {}
79
ReportFunctionTimeout(const std::string & functionName,int64_t time,int32_t threshold)80 void EventReport::ReportFunctionTimeout(const std::string& functionName, int64_t time, int32_t threshold) {}
81
ReportHoverStatusChange(int32_t foldStatus,int32_t time,bool isHoverMode,int32_t appRotation,int32_t windowMode)82 void EventReport::ReportHoverStatusChange(
83 int32_t foldStatus, int32_t time, bool isHoverMode, int32_t appRotation, int32_t windowMode)
84 {}
85
ReportNonManualPostCardActionInfo(const std::string & formName,const std::string & bundleName,const std::string & abilityName,const std::string & moduleName,int32_t dimension)86 void EventReport::ReportNonManualPostCardActionInfo(const std::string& formName, const std::string& bundleName,
87 const std::string& abilityName, const std::string& moduleName, int32_t dimension)
88 {}
89
ReportDragInfo(const DragInfo & dragInfo)90 void EventReport::ReportDragInfo(const DragInfo& dragInfo)
91 {
92 MockEventReport::dragInfo_ = dragInfo;
93 return;
94 }
95
ReportScrollableErrorEvent(const std::string & nodeType,ScrollableErrorType errorType,const std::string & subErrorType)96 void EventReport::ReportScrollableErrorEvent(
97 const std::string& nodeType, ScrollableErrorType errorType, const std::string& subErrorType)
98 {}
99
ReportRichEditorInfo(const RichEditorInfo & richEditorInfo)100 void EventReport::ReportRichEditorInfo(const RichEditorInfo& richEditorInfo) {}
101
ReportTextFieldErrorEvent(int32_t frameNodeId,int32_t depth,const std::string & errorType)102 void EventReport::ReportTextFieldErrorEvent(int32_t frameNodeId, int32_t depth, const std::string& errorType)
103 {}
104
ReportClipboardFailEvent(const std::string & errorType)105 void EventReport::ReportClipboardFailEvent(const std::string& errorType)
106 {}
107
SendDiffFrameRatesDuring(const std::string & scene,const FRCSceneFpsInfo & curFRCSceneFpsInfo_)108 void EventReport::SendDiffFrameRatesDuring(const std::string& scene, const FRCSceneFpsInfo& curFRCSceneFpsInfo_)
109 {}
110
FrameRateDurationsStatistics(int32_t expectedRate,const std::string & scene,NG::SceneStatus status)111 void EventReport::FrameRateDurationsStatistics(int32_t expectedRate, const std::string& scene, NG::SceneStatus status)
112 {}
113
AddFrameRateDuration(int32_t frameRate,int32_t duration)114 void EventReport::AddFrameRateDuration(int32_t frameRate, int32_t duration)
115 {}
116 } // namespace OHOS::Ace
117