1 /*
2 * Copyright (c) 2024 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 "ability_manager_client.h"
17 #include "application_context.h"
18 #include "hisysevent_adapter_impl.h"
19 #include "hisysevent.h"
20 #include "ohos_resource_adapter_impl.h"
21 #include "arkweb_utils.h"
22 #include "parameters.h"
23
24 namespace OHOS::NWeb {
25 namespace {
26 const HiviewDFX::HiSysEvent::EventType EVENT_TYPES[] = {
27 OHOS::HiviewDFX::HiSysEvent::EventType::FAULT,
28 OHOS::HiviewDFX::HiSysEvent::EventType::STATISTIC,
29 OHOS::HiviewDFX::HiSysEvent::EventType::SECURITY,
30 OHOS::HiviewDFX::HiSysEvent::EventType::BEHAVIOR,
31 };
32 }
33
34 const int kBase10 = 10;
ConvertToLongLong(const std::string & str,long long & value)35 bool ConvertToLongLong(const std::string& str, long long& value)
36 {
37 char* end;
38 errno = 0;
39 value = std::strtoll(str.c_str(), &end, kBase10);
40 if (end == str.c_str()) {
41 return false;
42 }
43 if (errno == ERANGE && (value == LLONG_MAX || value == LLONG_MIN)) {
44 return false;
45 }
46 if (*end != '\0') {
47 return false;
48 }
49 return true;
50 }
51
GetValueInt64(const std::string & input,const std::string & key1,const std::string & key2)52 int64_t GetValueInt64(const std::string& input, const std::string& key1, const std::string& key2)
53 {
54 long long result = 0;
55 std::string key = "";
56 if(key2 == key) {
57 std::string::size_type keyPosition1 = input.find(key1, 0);
58 if (keyPosition1 != std::string::npos) {
59 std::string waitConvertString = input.substr(keyPosition1 + key1.size());
60 if (ConvertToLongLong(waitConvertString, result) == true) {
61 return result;
62 }
63 }
64 return -1;
65 }
66 std::string::size_type keyPosition1 = input.find(key1, 0);
67 std::string::size_type keyPosition2 = input.find(key2, 0);
68 if (keyPosition1 != std::string::npos && keyPosition2 != std::string::npos &&
69 keyPosition1 + key1.size() < keyPosition2) {
70 std::string waitConvertString = input.substr(keyPosition1 + key1.size(),
71 keyPosition2 - keyPosition1 - key1.size());
72 if (ConvertToLongLong(waitConvertString, result) == true) {
73 return result;
74 }
75 }
76 return -1;
77 }
78
79 const static std::string PAGE_LOAD_KEY_LISTS[] = {
80 "NAVIGATION_ID",
81 "NAVIGATION_START",
82 "REDIRECT_COUNT",
83 "REDIRECT_START",
84 "REDIRECT_END",
85 "FETCH_START",
86 "WORKER_START",
87 "DOMAIN_LOOKUP_START",
88 "DOMAIN_LOOKUP_END",
89 "CONNECT_START",
90 "SECURE_CONNECT_START",
91 "CONNECT_END",
92 "REQUEST_START",
93 "RESPONSE_START",
94 "RESPONSE_END",
95 "DOM_INTERACTIVE",
96 "DOM_CONTENT_LOADED_EVENT_START",
97 "DOM_CONTENT_LOADED_EVENT_END",
98 "LOAD_EVENT_START",
99 "LOAD_EVENT_END",
100 "FIRST_PAINT",
101 "FIRST_CONTENTFUL_PAINT",
102 "LARGEST_CONTENTFUL_PAINT",
103 "RENDER_INIT_BLOCK",
104 "INPUT_TIME",
105 "IS_PAINT_DONE",
106 "FIRST_MEANINGFUL_PAINT"
107 };
108 static std::string g_currentBundleName = "";
109 static std::string g_versionCode = "";
110 static std::string g_apiCompatibleVersion = "";
111 static std::string g_webEngineType = "";
112 static std::string g_defaultWebEngineType = "";
GetInstance()113 HiSysEventAdapterImpl& HiSysEventAdapterImpl::GetInstance()
114 {
115 static HiSysEventAdapterImpl instance;
116 return instance;
117 }
118
119 template<typename... Args>
ForwardToHiSysEvent(const std::string & eventName,HiSysEventAdapter::EventType type,const std::tuple<Args...> & tp)120 static int ForwardToHiSysEvent(const std::string& eventName, HiSysEventAdapter::EventType type,
121 const std::tuple<Args...>& tp)
122 {
123 if (g_currentBundleName.empty() || g_apiCompatibleVersion.empty()) {
124 auto appInfo = AbilityRuntime::ApplicationContext::GetInstance()->GetApplicationInfo();
125 if (appInfo != nullptr) {
126 g_currentBundleName = appInfo->bundleName;
127 g_apiCompatibleVersion = std::to_string(appInfo->apiCompatibleVersion);
128 }
129 }
130
131 if (g_versionCode.empty()) {
132 g_versionCode = OhosResourceAdapterImpl::GetArkWebVersion();
133 }
134
135 if (g_webEngineType.empty()) {
136 g_webEngineType = std::to_string(static_cast<int>(OHOS::ArkWeb::getActiveWebEngineType()));
137 }
138
139 if (g_defaultWebEngineType.empty()) {
140 g_defaultWebEngineType = std::to_string(OHOS::system::GetIntParameter("web.engine.default",
141 static_cast<int>(OHOS::ArkWeb::ArkWebEngineType::EVERGREEN)));
142 }
143
144 auto sysData = std::make_tuple("BUNDLE_NAME", g_currentBundleName,
145 "VERSION_CODE", g_versionCode,
146 "API_COMPATIBLE_VERSION", g_apiCompatibleVersion,
147 "WEB_ENGINE_TYPE", g_webEngineType,
148 "DEFAULT_WEB_ENGINE_TYPE", g_defaultWebEngineType);
149 auto mergeData = std::tuple_cat(sysData, tp);
150
151 return std::apply(
152 [&](auto&&... args) {
153 return HiSysEventWrite(OHOS::HiviewDFX::HiSysEvent::Domain::WEBVIEW, eventName, EVENT_TYPES[type], args...);
154 },
155 mergeData);
156 }
157
ProcessEventPageLoadTime(const std::string & eventName,HiSysEventAdapter::EventType type,const std::tuple<const std::string,const std::string> & data)158 int ProcessEventPageLoadTime(const std::string& eventName, HiSysEventAdapter::EventType type,
159 const std::tuple<const std::string, const std::string>& data)
160 {
161 auto appInfo = AbilityRuntime::ApplicationContext::GetInstance()->GetApplicationInfo();
162 if (appInfo == nullptr) {
163 return -1;
164 }
165 AppExecFwk::ElementName elementName = AAFwk::AbilityManagerClient::GetInstance()->GetTopAbility();
166
167 std::tuple<const std::string, const std::string> sysData = {
168 "ABILITY_NAME", elementName.GetAbilityName(),
169 };
170
171 const std::string input = std::get<0>(data);
172
173 const std::int64_t value1 = GetValueInt64(input, PAGE_LOAD_KEY_LISTS[0], PAGE_LOAD_KEY_LISTS[1]);
174 const std::int64_t value2 = GetValueInt64(input, PAGE_LOAD_KEY_LISTS[1], PAGE_LOAD_KEY_LISTS[2]);
175 const std::uint32_t value3 = (std::uint32_t)GetValueInt64(input, PAGE_LOAD_KEY_LISTS[2], PAGE_LOAD_KEY_LISTS[3]);
176 const std::int64_t value4 = GetValueInt64(input, PAGE_LOAD_KEY_LISTS[3], PAGE_LOAD_KEY_LISTS[4]);
177 const std::int64_t value5 = GetValueInt64(input, PAGE_LOAD_KEY_LISTS[4], PAGE_LOAD_KEY_LISTS[5]);
178 const std::int64_t value6 = GetValueInt64(input, PAGE_LOAD_KEY_LISTS[5], PAGE_LOAD_KEY_LISTS[6]);
179 const std::int64_t value7 = GetValueInt64(input, PAGE_LOAD_KEY_LISTS[6], PAGE_LOAD_KEY_LISTS[7]);
180 const std::int64_t value8 = GetValueInt64(input, PAGE_LOAD_KEY_LISTS[7], PAGE_LOAD_KEY_LISTS[8]);
181 const std::int64_t value9 = GetValueInt64(input, PAGE_LOAD_KEY_LISTS[8], PAGE_LOAD_KEY_LISTS[9]);
182 const std::int64_t value10 = GetValueInt64(input, PAGE_LOAD_KEY_LISTS[9], PAGE_LOAD_KEY_LISTS[10]);
183 const std::int64_t value11 = GetValueInt64(input, PAGE_LOAD_KEY_LISTS[10], PAGE_LOAD_KEY_LISTS[11]);
184 const std::int64_t value12 = GetValueInt64(input, PAGE_LOAD_KEY_LISTS[11], PAGE_LOAD_KEY_LISTS[12]);
185 const std::int64_t value13 = GetValueInt64(input, PAGE_LOAD_KEY_LISTS[12], PAGE_LOAD_KEY_LISTS[13]);
186 const std::int64_t value14 = GetValueInt64(input, PAGE_LOAD_KEY_LISTS[13], PAGE_LOAD_KEY_LISTS[14]);
187 const std::int64_t value15 = GetValueInt64(input, PAGE_LOAD_KEY_LISTS[14], PAGE_LOAD_KEY_LISTS[15]);
188 const std::int64_t value16 = GetValueInt64(input, PAGE_LOAD_KEY_LISTS[15], PAGE_LOAD_KEY_LISTS[16]);
189 const std::int64_t value17 = GetValueInt64(input, PAGE_LOAD_KEY_LISTS[16], PAGE_LOAD_KEY_LISTS[17]);
190 const std::int64_t value18 = GetValueInt64(input, PAGE_LOAD_KEY_LISTS[17], PAGE_LOAD_KEY_LISTS[18]);
191 const std::int64_t value19 = GetValueInt64(input, PAGE_LOAD_KEY_LISTS[18], PAGE_LOAD_KEY_LISTS[19]);
192 const std::int64_t value20 = GetValueInt64(input, PAGE_LOAD_KEY_LISTS[19], PAGE_LOAD_KEY_LISTS[20]);
193 const std::int64_t value21 = GetValueInt64(input, PAGE_LOAD_KEY_LISTS[20], PAGE_LOAD_KEY_LISTS[21]);
194 const std::int64_t value22 = GetValueInt64(input, PAGE_LOAD_KEY_LISTS[21], PAGE_LOAD_KEY_LISTS[22]);
195 const std::int64_t value23 = GetValueInt64(input, PAGE_LOAD_KEY_LISTS[22], PAGE_LOAD_KEY_LISTS[23]);
196 const bool value24 = GetValueInt64(input, PAGE_LOAD_KEY_LISTS[23], "");
197
198 auto newData = std::make_tuple(
199 PAGE_LOAD_KEY_LISTS[0], value1, PAGE_LOAD_KEY_LISTS[1], value2,
200 PAGE_LOAD_KEY_LISTS[2], value3, PAGE_LOAD_KEY_LISTS[3], value4,
201 PAGE_LOAD_KEY_LISTS[4], value5, PAGE_LOAD_KEY_LISTS[5], value6,
202 PAGE_LOAD_KEY_LISTS[6], value7, PAGE_LOAD_KEY_LISTS[7], value8,
203 PAGE_LOAD_KEY_LISTS[8], value9, PAGE_LOAD_KEY_LISTS[9], value10,
204 PAGE_LOAD_KEY_LISTS[10], value11, PAGE_LOAD_KEY_LISTS[11], value12,
205 PAGE_LOAD_KEY_LISTS[12], value13, PAGE_LOAD_KEY_LISTS[13], value14,
206 PAGE_LOAD_KEY_LISTS[14], value15, PAGE_LOAD_KEY_LISTS[15], value16,
207 PAGE_LOAD_KEY_LISTS[16], value17, PAGE_LOAD_KEY_LISTS[17], value18,
208 PAGE_LOAD_KEY_LISTS[18], value19, PAGE_LOAD_KEY_LISTS[19], value20,
209 PAGE_LOAD_KEY_LISTS[20], value21, PAGE_LOAD_KEY_LISTS[21], value22,
210 PAGE_LOAD_KEY_LISTS[22], value23, PAGE_LOAD_KEY_LISTS[23], value24);
211
212 auto mergeData = std::tuple_cat(newData, sysData);
213 return ForwardToHiSysEvent(eventName, type, mergeData);
214 }
215
ProcessEventFirstMeaningfulPaintDone(const std::string & eventName,HiSysEventAdapter::EventType type,const std::tuple<const std::string,const std::string> & data)216 int ProcessEventFirstMeaningfulPaintDone(const std::string& eventName, HiSysEventAdapter::EventType type,
217 const std::tuple<const std::string, const std::string>& data)
218 {
219 auto appInfo = AbilityRuntime::ApplicationContext::GetInstance()->GetApplicationInfo();
220 if (appInfo == nullptr) {
221 return -1;
222 }
223 AppExecFwk::ElementName elementName = AAFwk::AbilityManagerClient::GetInstance()->GetTopAbility();
224
225 std::tuple<const std::string, const std::string> sysData = {
226 "ABILITY_NAME", elementName.GetAbilityName(),
227 };
228
229 const std::string input = std::get<0>(data);
230
231 const std::int64_t value1 = GetValueInt64(input, PAGE_LOAD_KEY_LISTS[0], PAGE_LOAD_KEY_LISTS[1]);
232 const std::int64_t value2 = GetValueInt64(input, PAGE_LOAD_KEY_LISTS[1], PAGE_LOAD_KEY_LISTS[2]);
233 const std::uint32_t value3 = (std::uint32_t)GetValueInt64(input, PAGE_LOAD_KEY_LISTS[2], PAGE_LOAD_KEY_LISTS[24]);
234 const std::int64_t value4 = GetValueInt64(input, PAGE_LOAD_KEY_LISTS[24], PAGE_LOAD_KEY_LISTS[20]);
235 const std::int64_t value5 = GetValueInt64(input, PAGE_LOAD_KEY_LISTS[20], PAGE_LOAD_KEY_LISTS[21]);
236 const std::int64_t value6 = GetValueInt64(input, PAGE_LOAD_KEY_LISTS[21], PAGE_LOAD_KEY_LISTS[26]);
237 const std::int64_t value7 = GetValueInt64(input, PAGE_LOAD_KEY_LISTS[26], PAGE_LOAD_KEY_LISTS[25]);
238 const std::int64_t value8 = GetValueInt64(input, PAGE_LOAD_KEY_LISTS[25], "");
239
240 auto newData = std::make_tuple(
241 PAGE_LOAD_KEY_LISTS[0], value1, PAGE_LOAD_KEY_LISTS[1], value2,
242 PAGE_LOAD_KEY_LISTS[2], value3, PAGE_LOAD_KEY_LISTS[24], value4,
243 PAGE_LOAD_KEY_LISTS[20], value5, PAGE_LOAD_KEY_LISTS[21], value6,
244 PAGE_LOAD_KEY_LISTS[26], value7, PAGE_LOAD_KEY_LISTS[25], value8);
245
246 auto mergeData = std::tuple_cat(newData, sysData);
247 return ForwardToHiSysEvent(eventName, type, mergeData);
248 }
249
Write(const std::string & eventName,EventType type,const std::tuple<const std::string,const std::string> & data)250 int HiSysEventAdapterImpl::Write(const std::string& eventName, EventType type,
251 const std::tuple<const std::string, const std::string>& data)
252 {
253 const std::string eventNamePageLoadTime = "PAGE_LOAD_TIME";
254 const std::string eventNameFirstMeaningfulPaintDone = "FIRST_MEANINGFUL_PAINT_DONE";
255 if (eventName == eventNamePageLoadTime) {
256 return ProcessEventPageLoadTime(eventName, type, data);
257 }
258 if (eventName == eventNameFirstMeaningfulPaintDone) {
259 int result = ProcessEventFirstMeaningfulPaintDone(eventName, type, data);
260 return result;
261 }
262 return ForwardToHiSysEvent(eventName, type, data);
263 }
264
Write(const std::string & eventName,EventType type,const std::tuple<const std::string,const std::string,const std::string,const std::string> & data)265 int HiSysEventAdapterImpl::Write(const std::string& eventName, EventType type,
266 const std::tuple<const std::string, const std::string, const std::string, const std::string>& data)
267 {
268 return ForwardToHiSysEvent(eventName, type, data);
269 }
270
Write(const std::string & eventName,EventType type,const std::tuple<const std::string,const std::string,const std::string,const std::string,const std::string,const std::string> & data)271 int HiSysEventAdapterImpl::Write(const std::string& eventName, EventType type,
272 const std::tuple<const std::string, const std::string, const std::string, const std::string,
273 const std::string, const std::string>& data)
274 {
275 return ForwardToHiSysEvent(eventName, type, data);
276 }
277
Write(const std::string & eventName,EventType type,const std::tuple<const std::string,const std::string,const std::string,const std::string,const std::string,const std::string,const std::string,const std::string> & data)278 int HiSysEventAdapterImpl::Write(const std::string& eventName, EventType type,
279 const std::tuple<const std::string, const std::string, const std::string, const std::string,
280 const std::string, const std::string, const std::string, const std::string>& data)
281 {
282 return ForwardToHiSysEvent(eventName, type, data);
283 }
284
Write(const std::string & eventName,EventType type,const std::tuple<const std::string,const std::string,const std::string,const std::string,const std::string,const std::string,const std::string,const std::string,const std::string,const std::string> & data)285 int HiSysEventAdapterImpl::Write(const std::string& eventName, EventType type,
286 const std::tuple<const std::string, const std::string, const std::string, const std::string,
287 const std::string, const std::string, const std::string, const std::string,
288 const std::string, const std::string>& data)
289 {
290 return ForwardToHiSysEvent(eventName, type, data);
291 }
292
Write(const std::string & eventName,EventType type,const std::tuple<const std::string,const std::string,const std::string,const std::string,const std::string,const std::string,const std::string,const std::string,const std::string,const std::string,const std::string,const std::string> & data)293 int HiSysEventAdapterImpl::Write(const std::string& eventName, EventType type,
294 const std::tuple<const std::string, const std::string, const std::string, const std::string,
295 const std::string, const std::string, const std::string, const std::string,
296 const std::string, const std::string, const std::string, const std::string>& data)
297 {
298 return ForwardToHiSysEvent(eventName, type, data);
299 }
300
301 using systemData = std::tuple<const std::string, const int, const std::string, const std::string,
302 const std::string, const std::string>;
303
Write(const std::string & eventName,EventType type,const std::tuple<const std::string,const int64_t,const std::string,const int,const std::string,const std::vector<uint16_t>,const std::string,const int> & data)304 int HiSysEventAdapterImpl::Write(const std::string& eventName, EventType type,
305 const std::tuple<const std::string, const int64_t, const std::string, const int,
306 const std::string, const std::vector<uint16_t>, const std::string, const int>& data)
307 {
308 auto appInfo = AbilityRuntime::ApplicationContext::GetInstance()->GetApplicationInfo();
309 if (appInfo == nullptr) {
310 return -1;
311 }
312 AppExecFwk::ElementName elementName = AAFwk::AbilityManagerClient::GetInstance()->GetTopAbility();
313
314 systemData sysData = {
315 "VERSION_CODE", appInfo->versionCode,
316 "VERSION_NAME", appInfo->versionName.c_str(),
317 "ABILITY_NAME", elementName.GetAbilityName()
318 };
319
320 auto mergeData = std::tuple_cat(data, sysData);
321 return ForwardToHiSysEvent(eventName, type, mergeData);
322 }
323
Write(const std::string & eventName,EventType type,const std::tuple<const std::string,const int64_t,const std::string,const int64_t,const std::string,const int,const std::string,const int,const std::string,const int64_t,const std::string,const int> & data)324 int HiSysEventAdapterImpl::Write(const std::string& eventName, EventType type,
325 const std::tuple<const std::string, const int64_t, const std::string, const int64_t,
326 const std::string, const int, const std::string, const int,
327 const std::string, const int64_t, const std::string, const int>& data)
328 {
329 auto appInfo = AbilityRuntime::ApplicationContext::GetInstance()->GetApplicationInfo();
330 if (appInfo == nullptr) {
331 return -1;
332 }
333 AppExecFwk::ElementName elementName = AAFwk::AbilityManagerClient::GetInstance()->GetTopAbility();
334
335 std::tuple<const std::string, const std::string, const std::string, const std::string,
336 const std::string, const std::string> sysData = {
337 "SCENE_ID", "WEB_LIST_FLING",
338 "ABILITY_NAME", elementName.GetAbilityName(),
339 "PAGE_URL", ""
340 };
341
342 auto mergeData = std::tuple_cat(data, sysData);
343 return ForwardToHiSysEvent(eventName, type, mergeData);
344 }
345
Write(const std::string & eventName,EventType type,const std::tuple<const std::string,const int64_t,const std::string,const int64_t,const std::string,const uint32_t,const std::string,const int64_t,const std::string,const int64_t,const std::string,const int64_t,const std::string,const int64_t,const std::string,const int64_t,const std::string,const int64_t,const std::string,const int64_t,const std::string,const int64_t,const std::string,const int64_t,const std::string,const int64_t,const std::string,const int64_t,const std::string,const int64_t,const std::string,const int64_t,const std::string,const int64_t,const std::string,const int64_t,const std::string,const int64_t,const std::string,const int64_t,const std::string,const int64_t,const std::string,const int64_t,const std::string,const int64_t> & data)346 int HiSysEventAdapterImpl::Write(const std::string& eventName, EventType type,
347 const std::tuple<const std::string, const int64_t,
348 const std::string, const int64_t, const std::string, const uint32_t,
349 const std::string, const int64_t, const std::string, const int64_t,
350 const std::string, const int64_t, const std::string, const int64_t,
351 const std::string, const int64_t, const std::string, const int64_t,
352 const std::string, const int64_t, const std::string, const int64_t,
353 const std::string, const int64_t, const std::string, const int64_t,
354 const std::string, const int64_t, const std::string, const int64_t,
355 const std::string, const int64_t, const std::string, const int64_t,
356 const std::string, const int64_t, const std::string, const int64_t,
357 const std::string, const int64_t, const std::string, const int64_t,
358 const std::string, const int64_t, const std::string, const int64_t>& data)
359 {
360 auto appInfo = AbilityRuntime::ApplicationContext::GetInstance()->GetApplicationInfo();
361 if (appInfo == nullptr) {
362 return -1;
363 }
364 AppExecFwk::ElementName elementName = AAFwk::AbilityManagerClient::GetInstance()->GetTopAbility();
365
366 std::tuple<const std::string, const std::string> sysData = {
367 "ABILITY_NAME", elementName.GetAbilityName(),
368 };
369
370 auto mergeData = std::tuple_cat(data, sysData);
371 return ForwardToHiSysEvent(eventName, type, mergeData);
372 }
373
Write(const std::string & eventName,EventType type,const std::tuple<const std::string,const std::string,const std::string,const std::string,const std::string,const std::string,const std::string,const std::string,const std::string,const std::string,const std::string,const std::string,const std::string,const std::string> & data)374 int HiSysEventAdapterImpl::Write(const std::string& eventName, EventType type,
375 const std::tuple<const std::string, const std::string, const std::string, const std::string,
376 const std::string, const std::string, const std::string, const std::string,
377 const std::string, const std::string, const std::string, const std::string,
378 const std::string, const std::string>& data)
379 {
380 return ForwardToHiSysEvent(eventName, type, data);
381 }
382
Write(const std::string & eventName,EventType type,const std::tuple<const std::string,const std::string,const std::string,const std::string,const std::string,const std::string,const std::string,const std::string,const std::string,const std::string,const std::string,const std::string,const std::string,const std::string,const std::string,const std::string> & data)383 int HiSysEventAdapterImpl::Write(const std::string& eventName, EventType type,
384 const std::tuple<const std::string, const std::string, const std::string, const std::string,
385 const std::string, const std::string, const std::string, const std::string,
386 const std::string, const std::string, const std::string, const std::string,
387 const std::string, const std::string, const std::string, const std::string>& data)
388 {
389 return ForwardToHiSysEvent(eventName, type, data);
390 }
391
Write(const std::string & eventName,EventType type,const std::tuple<const std::string,const uint32_t,const std::string,const uint64_t> & data)392 int HiSysEventAdapterImpl::Write(const std::string& eventName, EventType type,
393 const std::tuple<const std::string, const uint32_t, const std::string, const uint64_t>& data)
394 {
395 return ForwardToHiSysEvent(eventName, type, data);
396 }
397 } // namespace OHOS::NWeb
398