1 /*
2 * Copyright (c) 2021-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 "common_event_support.h"
17 #include "event_log_wrapper.h"
18
19 namespace OHOS {
20 namespace EventFwk {
21 /**
22 * Indicates the action of a common event that the user has finished booting and the system has been loaded.
23 * To subscribe to this common event, your application must have the ohos.permission.RECEIVER_STARTUP_COMPLETED
24 * permission.
25 * This common event can only be published by the system.
26 */
27 const std::string CommonEventSupport::COMMON_EVENT_BOOT_COMPLETED = "usual.event.BOOT_COMPLETED";
28
29 /**
30 * Indicates the action of a common event that the user has finished booting and the system has been loaded but the
31 * screen is still locked.
32 * To subscribe to this common event, your application must have the ohos.permission.RECEIVER_STARTUP_COMPLETED
33 * permission.
34 * This common event can only be published by the system.
35 */
36 const std::string CommonEventSupport::COMMON_EVENT_LOCKED_BOOT_COMPLETED = "usual.event.LOCKED_BOOT_COMPLETED";
37
38 /**
39 * Indicates the action of a common event that the device is being shut down and the final shutdown will proceed.
40 * This is different from sleeping. All unsaved data will be lost after shut down.
41 * This common event can only be published by the system.
42 */
43 const std::string CommonEventSupport::COMMON_EVENT_SHUTDOWN = "usual.event.SHUTDOWN";
44
45 /**
46 * Indicates the action of a common event that the charging state, level, and other information about the battery
47 * have changed.
48 * This common event can only be published by the system.
49 */
50 const std::string CommonEventSupport::COMMON_EVENT_BATTERY_CHANGED = "usual.event.BATTERY_CHANGED";
51
52 /**
53 * Indicates the action of a common event that the battery level is low.
54 * This common event can only be published by the system.
55 */
56 const std::string CommonEventSupport::COMMON_EVENT_BATTERY_LOW = "usual.event.BATTERY_LOW";
57
58 /**
59 * Indicates the action of a common event that the battery exit the low state.
60 * This common event can only be published by the system.
61 */
62 const std::string CommonEventSupport::COMMON_EVENT_BATTERY_OKAY = "usual.event.BATTERY_OKAY";
63
64 /**
65 * Indicates the action of a common event that the device is connected to the external power.
66 * This common event can only be published by the system.
67 */
68 const std::string CommonEventSupport::COMMON_EVENT_POWER_CONNECTED = "usual.event.POWER_CONNECTED";
69
70 /**
71 * Indicates the action of a common event that the device is disconnected from the external power.
72 * This common event can only be published by the system.
73 */
74 const std::string CommonEventSupport::COMMON_EVENT_POWER_DISCONNECTED = "usual.event.POWER_DISCONNECTED";
75
76 /**
77 * Indicates the action of a common event that the device screen is off and the device is sleeping.
78 * This common event can only be published by the system.
79 */
80 const std::string CommonEventSupport::COMMON_EVENT_SCREEN_OFF = "usual.event.SCREEN_OFF";
81
82 /**
83 * Indicates the action of a common event that the device screen is on and the device is interactive.
84 * This common event can only be published by the system.
85 */
86 const std::string CommonEventSupport::COMMON_EVENT_SCREEN_ON = "usual.event.SCREEN_ON";
87
88 /**
89 * Indicates the action of a common event that the thermal level changed.
90 * This common event can only be published by the system.
91 */
92 const std::string CommonEventSupport::COMMON_EVENT_THERMAL_LEVEL_CHANGED =
93 "usual.event.THERMAL_LEVEL_CHANGED";
94 /**
95 * Indicates the action of a common event that the device is idle and charging,
96 * services can do some business on the background.
97 * This common event can only be published by the system.
98 */
99 const std::string CommonEventSupport::COMMON_EVENT_CHARGE_IDLE_MODE_CHANGED =
100 "usual.event.CHARGE_IDLE_MODE_CHANGED";
101 /**
102 * Indicates the action of a common event that the user unlocks the device.
103 * This common event can only be published by the system.
104 */
105 const std::string CommonEventSupport::COMMON_EVENT_USER_PRESENT = "usual.event.USER_PRESENT";
106
107 /**
108 * Indicates the action of a common event that the system time has changed.
109 * This common event can only be published by the system.
110 */
111 const std::string CommonEventSupport::COMMON_EVENT_TIME_TICK = "usual.event.TIME_TICK";
112
113 /**
114 * Indicates the action of a common event that the system time is set.
115 * This common event can only be published by the system.
116 */
117 const std::string CommonEventSupport::COMMON_EVENT_TIME_CHANGED = "usual.event.TIME_CHANGED";
118
119 /**
120 * Indicates the action of a common event that the system date has changed.
121 * This common event can only be published by the system.
122 */
123 const std::string CommonEventSupport::COMMON_EVENT_DATE_CHANGED = "usual.event.DATE_CHANGED";
124
125 /**
126 * Indicates the action of a common event that the system time zone has changed.
127 * This common event can only be published by the system.
128 */
129 const std::string CommonEventSupport::COMMON_EVENT_TIMEZONE_CHANGED = "usual.event.TIMEZONE_CHANGED";
130
131 /**
132 * Indicates the action of a common event that a user closes a temporary system dialog box.
133 * This common event can only be published by the system.
134 */
135 const std::string CommonEventSupport::COMMON_EVENT_CLOSE_SYSTEM_DIALOGS = "usual.event.CLOSE_SYSTEM_DIALOGS";
136
137 /**
138 * Indicates the action of a common event that bundle scan has finished.
139 * This common event can only be published by the system.
140 */
141 const std::string CommonEventSupport::COMMON_EVENT_BUNDLE_SCAN_FINISHED = "usual.event.BUNDLE_SCAN_FINISHED";
142
143 /**
144 * Indicates the action of a common event that a new application package has been installed on the device.
145 * This common event can only be published by the system.
146 */
147 const std::string CommonEventSupport::COMMON_EVENT_PACKAGE_ADDED = "usual.event.PACKAGE_ADDED";
148
149 /**
150 * Indicates the action of a common event that a new version of an installed application package has replaced
151 * the previous one on the device.
152 * This common event can only be published by the system.
153 */
154 const std::string CommonEventSupport::COMMON_EVENT_PACKAGE_REPLACED = "usual.event.PACKAGE_REPLACED";
155
156 /**
157 * Indicates the action of a common event that a new version of your application package has replaced
158 * the previous one. This common event is sent only to the application that was replaced.
159 * This common event can only be published by the system.
160 */
161 const std::string CommonEventSupport::COMMON_EVENT_MY_PACKAGE_REPLACED = "usual.event.MY_PACKAGE_REPLACED";
162
163 /**
164 * Indicate the action of a common event that an installed application has been uninstalled from the device
165 * with the application data remained.
166 * This common event can only be published by the system.
167 */
168 const std::string CommonEventSupport::COMMON_EVENT_PACKAGE_REMOVED = "usual.event.PACKAGE_REMOVED";
169
170 /**
171 * Indicates the action of a common event that an installed bundle has been uninstalled from the device with the
172 * application data remained.
173 * This common event can only be published by the system.
174 */
175 const std::string CommonEventSupport::COMMON_EVENT_BUNDLE_REMOVED = "usual.event.BUNDLE_REMOVED";
176
177 /**
178 * Indicates the action of a common event that an installed application, including both the application data and
179 * code, have been completely uninstalled from the device.
180 * This common event can only be published by the system.
181 */
182 const std::string CommonEventSupport::COMMON_EVENT_PACKAGE_FULLY_REMOVED = "usual.event.PACKAGE_FULLY_REMOVED";
183
184 /**
185 * Indicates the action of a common event that an application package has been changed
186 * (for example, a component in the package has been enabled or disabled).
187 * This common event can only be published by the system.
188 */
189 const std::string CommonEventSupport::COMMON_EVENT_PACKAGE_CHANGED = "usual.event.PACKAGE_CHANGED";
190
191 /**
192 * Indicates the action of a common event that the user has restarted the application package and killed all its
193 * processes.
194 * This common event can only be published by the system.
195 */
196 const std::string CommonEventSupport::COMMON_EVENT_PACKAGE_RESTARTED = "usual.event.PACKAGE_RESTARTED";
197
198 /**
199 * Indicates the action of a common event that the user has cleared the application package data.
200 * This common event is published after COMMON_EVENT_PACKAGE_RESTARTED is triggered and the data has been cleared.
201 * This common event can only be published by the system.
202 */
203 const std::string CommonEventSupport::COMMON_EVENT_PACKAGE_DATA_CLEARED = "usual.event.PACKAGE_DATA_CLEARED";
204
205 /**
206 * Indicates the action of a common event that the user has cleared the application package cache.
207 * This common event can only be published by the system.
208 */
209 const std::string CommonEventSupport::COMMON_EVENT_PACKAGE_CACHE_CLEARED = "usual.event.PACKAGE_CACHE_CLEARED";
210
211 /**
212 * Indicates the action of a common event that application packages have been suspended.
213 * This common event can only be published by the system.
214 */
215 const std::string CommonEventSupport::COMMON_EVENT_PACKAGES_SUSPENDED = "usual.event.PACKAGES_SUSPENDED";
216
217 /**
218 * Indicates the action of a common event that application packages have not been suspended.
219 * This common event can only be published by the system.
220 */
221 const std::string CommonEventSupport::COMMON_EVENT_PACKAGES_UNSUSPENDED = "usual.event.PACKAGES_UNSUSPENDED";
222
223 /**
224 * Indicates the action of a common event that an application package has been suspended.
225 * This common event can only be published by the system.
226 */
227 const std::string CommonEventSupport::COMMON_EVENT_MY_PACKAGE_SUSPENDED = "usual.event.MY_PACKAGE_SUSPENDED";
228
229 /**
230 * Indicates the action of a common event that an application package has not been suspended.
231 * This common event can only be published by the system.
232 */
233 const std::string CommonEventSupport::COMMON_EVENT_MY_PACKAGE_UNSUSPENDED = "usual.event.MY_PACKAGE_UNSUSPENDED";
234
235 /**
236 * Indicates the action of a common event that a user ID has been removed from the system.
237 * This common event can only be published by the system.
238 */
239 const std::string CommonEventSupport::COMMON_EVENT_UID_REMOVED = "usual.event.UID_REMOVED";
240
241 /**
242 * Indicates the action of a common event that an installed application is started for the first time.
243 * This common event can only be published by the system.
244 */
245 const std::string CommonEventSupport::COMMON_EVENT_PACKAGE_FIRST_LAUNCH = "usual.event.PACKAGE_FIRST_LAUNCH";
246
247 /**
248 * Indicates the action of a common event that an application requires system verification.
249 * This common event can only be published by the system.
250 */
251 const std::string CommonEventSupport::COMMON_EVENT_PACKAGE_NEEDS_VERIFICATION =
252 "usual.event.PACKAGE_NEEDS_VERIFICATION";
253 /**
254 * Indicates the action of a common event that an application has been verified by the system.
255 * This common event can only be published by the system.
256 */
257 const std::string CommonEventSupport::COMMON_EVENT_PACKAGE_VERIFIED = "usual.event.PACKAGE_VERIFIED";
258
259 /**
260 * Indicates the action of a common event that applications installed on the external storage become
261 * available for the system.
262 * This common event can only be published by the system.
263 */
264 const std::string CommonEventSupport::COMMON_EVENT_EXTERNAL_APPLICATIONS_AVAILABLE =
265 "usual.event.EXTERNAL_APPLICATIONS_AVAILABLE";
266
267 /**
268 * Indicates the action of a common event that applications installed on the external storage become unavailable for
269 * the system.
270 * This common event can only be published by the system.
271 */
272 const std::string CommonEventSupport::COMMON_EVENT_EXTERNAL_APPLICATIONS_UNAVAILABLE =
273 "usual.event.EXTERNAL_APPLICATIONS_UNAVAILABLE";
274
275 /**
276 * Indicates the action of a common event that the device state (for example, orientation and locale) has changed.
277 * This common event can only be published by the system.
278 */
279 const std::string CommonEventSupport::COMMON_EVENT_CONFIGURATION_CHANGED = "usual.event.CONFIGURATION_CHANGED";
280
281 /**
282 * Indicates the action of a common event that the device locale has changed.
283 * This common event can only be published by the system.
284 */
285 const std::string CommonEventSupport::COMMON_EVENT_LOCALE_CHANGED = "usual.event.LOCALE_CHANGED";
286
287 /**
288 * Indicates the action of a common event that the device storage is insufficient.
289 */
290 const std::string CommonEventSupport::COMMON_EVENT_MANAGE_PACKAGE_STORAGE = "usual.event.MANAGE_PACKAGE_STORAGE";
291
292 /**
293 * Indicates the action of a common event that one sandbox package is installed.
294 * This common event can only be published by the system.
295 */
296 const std::string CommonEventSupport::COMMON_EVENT_SANDBOX_PACKAGE_ADDED = "usual.event.SANDBOX_PACKAGE_ADDED";
297
298 /**
299 * Indicates the action of a common event that one sandbox package is uninstalled.
300 * This common event can only be published by the system.
301 */
302 const std::string CommonEventSupport::COMMON_EVENT_SANDBOX_PACKAGE_REMOVED = "usual.event.SANDBOX_PACKAGE_REMOVED";
303
304 /**
305 * Indicates the action of a common event that the system is in driving mode.
306 * This is a protected common event, which can be sent only by the system.
307 */
308 const std::string CommonEventSupport::COMMON_EVENT_DRIVE_MODE = "common.event.DRIVE_MODE";
309
310 /**
311 * Indicates the action of a common event that the system is in home mode.
312 * This is a protected common event, which can be sent only by the system.
313 */
314 const std::string CommonEventSupport::COMMON_EVENT_HOME_MODE = "common.event.HOME_MODE";
315
316 /**
317 * Indicates the action of a common event that the system is in office mode.
318 * This is a protected common event, which can be sent only by the system.
319 */
320 const std::string CommonEventSupport::COMMON_EVENT_OFFICE_MODE = "common.event.OFFICE_MODE";
321
322 /**
323 * Indicates the action of a common event that the window mode is split screen.
324 * This is a protected common event, which can be sent only by the system.
325 */
326 const std::string CommonEventSupport::COMMON_EVENT_SPLIT_SCREEN = "common.event.SPLIT_SCREEN";
327
328 /**
329 * Indicates the action of a common event that the user has been started.
330 */
331 const std::string CommonEventSupport::COMMON_EVENT_USER_STARTED = "usual.event.USER_STARTED";
332
333 /**
334 * Indicates the action of a common event that the user has been brought to the background.
335 */
336 const std::string CommonEventSupport::COMMON_EVENT_USER_BACKGROUND = "usual.event.USER_BACKGROUND";
337
338 /**
339 * Indicates the action of a common event that the user has been brought to the foreground.
340 */
341 const std::string CommonEventSupport::COMMON_EVENT_USER_FOREGROUND = "usual.event.USER_FOREGROUND";
342
343 /**
344 * Indicates the action of a common event that a user switch is happening.
345 * To subscribe to this common event, your application must have the ohos.permission.MANAGE_LOCAL_ACCOUNTS permission.
346 */
347 const std::string CommonEventSupport::COMMON_EVENT_USER_SWITCHED = "usual.event.USER_SWITCHED";
348
349 /**
350 * Indicates the action of a common event that the user is going to be started.
351 * To subscribe to this common event, your application must have the ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
352 * permission.
353 */
354 const std::string CommonEventSupport::COMMON_EVENT_USER_STARTING = "usual.event.USER_STARTING";
355
356 /**
357 * Indicates the action of a common event that the credential-encrypted storage has become unlocked
358 * for the current user when the device is unlocked after being restarted.
359 */
360 const std::string CommonEventSupport::COMMON_EVENT_USER_UNLOCKED = "usual.event.USER_UNLOCKED";
361
362 /**
363 * Indicates the action of a common event that the user is going to be stopped.
364 * To subscribe to this common event, your application must have the ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
365 * permission.
366 */
367 const std::string CommonEventSupport::COMMON_EVENT_USER_STOPPING = "usual.event.USER_STOPPING";
368
369 /**
370 * Indicates the action of a common event that the user has been stopped.
371 */
372 const std::string CommonEventSupport::COMMON_EVENT_USER_STOPPED = "usual.event.USER_STOPPED";
373
374 /**
375 * Indicates the action of a common event about a login of a user with account ID.
376 * This is a protected common event, which can be sent only by the system.
377 */
378 const std::string CommonEventSupport::COMMON_EVENT_HWID_LOGIN = "common.event.HWID_LOGIN";
379
380 /**
381 * Indicates the action of a common event about a logout of a user with account ID.
382 * This is a protected common event, which can be sent only by the system.
383 */
384 const std::string CommonEventSupport::COMMON_EVENT_HWID_LOGOUT = "common.event.HWID_LOGOUT";
385
386 /**
387 * Indicates the action of a common event that the account ID is invalid.
388 * This is a protected common event, which can be sent only by the system.
389 */
390 const std::string CommonEventSupport::COMMON_EVENT_HWID_TOKEN_INVALID = "common.event.HWID_TOKEN_INVALID";
391
392 /**
393 * Indicates the action of a common event about a logoff of a account ID.
394 * This is a protected common event, which can be sent only by the system.
395 */
396 const std::string CommonEventSupport::COMMON_EVENT_HWID_LOGOFF = "common.event.HWID_LOGOFF";
397
398 /**
399 * Indicates the action of a common event about the Wi-Fi state, such as enabled and disabled.
400 */
401 const std::string CommonEventSupport::COMMON_EVENT_WIFI_POWER_STATE = "usual.event.wifi.POWER_STATE";
402
403 /**
404 * Indicates the action of a common event that the Wi-Fi access point has been scanned and proven to be available.
405 * To subscribe to this common event, your application must have the ohos.permission.LOCATION permission.
406 */
407 const std::string CommonEventSupport::COMMON_EVENT_WIFI_SCAN_FINISHED = "usual.event.wifi.SCAN_FINISHED";
408
409 /**
410 * Indicates the action of a common event that the Wi-Fi signal strength (RSSI) has changed.
411 * To subscribe to this common event, your application must have the ohos.permission.GET_WIFI_INFO permission.
412 */
413 const std::string CommonEventSupport::COMMON_EVENT_WIFI_RSSI_VALUE = "usual.event.wifi.RSSI_VALUE";
414
415 /**
416 * Indicates the action of a common event that the Wi-Fi connection state has changed.
417 */
418 const std::string CommonEventSupport::COMMON_EVENT_WIFI_CONN_STATE = "usual.event.wifi.CONN_STATE";
419
420 /**
421 * Indicates the action of a common event about the Wi-Fi hotspot state, such as enabled or disabled.
422 */
423 const std::string CommonEventSupport::COMMON_EVENT_WIFI_HOTSPOT_STATE = "usual.event.wifi.HOTSPOT_STATE";
424
425 /**
426 * Indicates the action of a common event that a client has joined the Wi-Fi hotspot of the current device. You can
427 * register this common event to listen for information about the clients joining your hotspot.
428 * To subscribe to this common event, your application must have the ohos.permission.GET_WIFI_INFO permission.
429 */
430 const std::string CommonEventSupport::COMMON_EVENT_WIFI_AP_STA_JOIN = "usual.event.wifi.WIFI_HS_STA_JOIN";
431
432 /**
433 * Indicates the action of a common event that a client has dropped connection to the Wi-Fi hotspot of the current
434 * device. You can register this common event to listen for information about the clients leaving your hotspot.
435 * To subscribe to this common event, your application must have the ohos.permission.GET_WIFI_INFO permission.
436 */
437 const std::string CommonEventSupport::COMMON_EVENT_WIFI_AP_STA_LEAVE = "usual.event.wifi.WIFI_HS_STA_LEAVE";
438
439 /**
440 * Indicates the action of a common event that the state of MPLink (an enhanced Wi-Fi feature) has changed.
441 * To subscribe to this common event, your application must have the ohos.permission.MPLINK_CHANGE_STATE permission.
442 */
443 const std::string CommonEventSupport::COMMON_EVENT_WIFI_MPLINK_STATE_CHANGE = "usual.event.wifi.mplink.STATE_CHANGE";
444
445 /**
446 * Indicates the action of a common event that the Wi-Fi P2P connection state has changed.
447 * To subscribe to this common event, your application must have the ohos.permission.GET_WIFI_INFO and
448 * ohos.permission.LOCATION permissions.
449 */
450 const std::string CommonEventSupport::COMMON_EVENT_WIFI_P2P_CONN_STATE = "usual.event.wifi.p2p.CONN_STATE_CHANGE";
451
452 /**
453 * Indicates the action of a common event about the Wi-Fi P2P state, such as enabled and disabled.
454 * To subscribe to this common event, your application must have the ohos.permission.GET_WIFI_INFO permission.
455 */
456 const std::string CommonEventSupport::COMMON_EVENT_WIFI_P2P_STATE_CHANGED = "usual.event.wifi.p2p.STATE_CHANGE";
457
458 /**
459 * Indicates that the Wi-Fi P2P peers state change.
460 * To subscribe to this common event, your application must have the ohos.permission.GET_WIFI_INFO permission.
461 */
462 const std::string CommonEventSupport::COMMON_EVENT_WIFI_P2P_PEERS_STATE_CHANGED = "usual.event.wifi.p2p.DEVICES_CHANGE";
463
464 /**
465 * Indicates that the Wi-Fi P2P discovery state change.
466 * To subscribe to this common event, your application must have the ohos.permission.GET_WIFI_INFO permission.
467 */
468 const std::string CommonEventSupport::COMMON_EVENT_WIFI_P2P_PEERS_DISCOVERY_STATE_CHANGED =
469 "usual.event.wifi.p2p.PEER_DISCOVERY_STATE_CHANGE";
470
471 /**
472 * Indicates that the Wi-Fi P2P current device state change.
473 * To subscribe to this common event, your application must have the ohos.permission.GET_WIFI_INFO permission.
474 */
475 const std::string CommonEventSupport::COMMON_EVENT_WIFI_P2P_CURRENT_DEVICE_STATE_CHANGED =
476 "usual.event.wifi.p2p.CURRENT_DEVICE_CHANGE";
477
478 /**
479 * Indicates that the Wi-Fi P2P group info is changed.
480 * To subscribe to this common event, your application must have the ohos.permission.GET_WIFI_INFO permission.
481 */
482 const std::string CommonEventSupport::COMMON_EVENT_WIFI_P2P_GROUP_STATE_CHANGED =
483 "usual.event.wifi.p2p.GROUP_STATE_CHANGED";
484
485 /**
486 * Indicates that network traffic statistics have been updated.
487 */
488 const std::string CommonEventSupport::COMMON_EVENT_NETMANAGER_NETSTATES_UPDATED =
489 "usual.event.netmanager.NETSTATES_UPDATED";
490
491 /**
492 * Indicates that the network traffic has exceeded the limit.
493 */
494 const std::string CommonEventSupport::COMMON_EVENT_NETMANAGER_NETSTATES_LIMITED =
495 "usual.event.netmanager.NETSTATES_LIMITED";
496
497 /**
498 * Indicates the action of a common event about the connection state of Bluetooth handsfree communication.
499 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
500 */
501 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_HANDSFREE_AG_CONNECT_STATE_UPDATE =
502 "usual.event.bluetooth.handsfree.ag.CONNECT_STATE_UPDATE";
503
504 /**
505 * Indicates the action of a common event that the device connected to the Bluetooth handsfree is active.
506 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
507 */
508 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_HANDSFREE_AG_CURRENT_DEVICE_UPDATE =
509 "usual.event.bluetooth.handsfree.ag.CURRENT_DEVICE_UPDATE";
510
511 /**
512 * Indicates the action of a common event that the connection state of Bluetooth A2DP has changed.
513 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
514 */
515 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_HANDSFREE_AG_AUDIO_STATE_UPDATE =
516 "usual.event.bluetooth.handsfree.ag.AUDIO_STATE_UPDATE";
517
518 /**
519 * Indicates the action of a common event about the connection state of Bluetooth A2DP.
520 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
521 */
522 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_A2DPSOURCE_CONNECT_STATE_UPDATE =
523 "usual.event.bluetooth.a2dpsource.CONNECT_STATE_UPDATE";
524
525 /**
526 * Indicates the action of a common event that the device connected using Bluetooth A2DP is active.
527 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
528 */
529 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_A2DPSOURCE_CURRENT_DEVICE_UPDATE =
530 "usual.event.bluetooth.a2dpsource.CURRENT_DEVICE_UPDATE";
531
532 /**
533 * Indicates the action of a common event that the playing state of Bluetooth A2DP has changed.
534 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
535 */
536 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_A2DPSOURCE_PLAYING_STATE_UPDATE =
537 "usual.event.bluetooth.a2dpsource.PLAYING_STATE_UPDATE";
538
539 /**
540 * Indicates the action of a common event that the AVRCP connection state of Bluetooth A2DP has changed.
541 */
542 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_A2DPSOURCE_AVRCP_CONNECT_STATE_UPDATE =
543 "usual.event.bluetooth.a2dpsource.AVRCP_CONNECT_STATE_UPDATE";
544
545 /**
546 * Indicates the action of a common event that the audio codec state of Bluetooth A2DP has changed.
547 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
548 */
549 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_A2DPSOURCE_CODEC_VALUE_UPDATE =
550 "usual.event.bluetooth.a2dpsource.CODEC_VALUE_UPDATE";
551
552 /**
553 * Indicates the action of a common event that a remote Bluetooth device has been discovered.
554 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH and
555 * ohos.permission.LOCATION permissions.
556 */
557 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_DISCOVERED =
558 "usual.event.bluetooth.remotedevice.DISCOVERED";
559
560 /**
561 * Indicates the action of a common event that the Bluetooth class of a remote Bluetooth device has changed.
562 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
563 */
564 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_CLASS_VALUE_UPDATE =
565 "usual.event.bluetooth.remotedevice.CLASS_VALUE_UPDATE";
566
567 /**
568 * Indicates the action of a common event that a low level (ACL) connection has been established with a remote
569 * Bluetooth device.
570 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
571 */
572 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_ACL_CONNECTED =
573 "usual.event.bluetooth.remotedevice.ACL_CONNECTED";
574
575 /**
576 * Indicates the action of a common event that a low level (ACL) connection has been disconnected from a remote
577 * Bluetooth device.
578 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
579 */
580 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_ACL_DISCONNECTED =
581 "usual.event.bluetooth.remotedevice.ACL_DISCONNECTED";
582
583 /**
584 * Indicates the action of a common event that the friendly name of a remote Bluetooth device has been retrieved for
585 * the first time or has been changed since the last retrieval.
586 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
587 */
588 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_NAME_UPDATE =
589 "usual.event.bluetooth.remotedevice.NAME_UPDATE";
590
591 /**
592 * Indicates the action of a common event that the connection state of a remote Bluetooth device has changed.
593 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
594 */
595 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_PAIR_STATE =
596 "usual.event.bluetooth.remotedevice.PAIR_STATE";
597
598 /**
599 * Indicates the action of a common event that the battery level of a remote Bluetooth device has been retrieved
600 * for the first time or has been changed since the last retrieval.
601 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
602 */
603 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_BATTERY_VALUE_UPDATE =
604 "usual.event.bluetooth.remotedevice.BATTERY_VALUE_UPDATE";
605
606 /**
607 * Indicates the action of a common event about the SDP state of a remote Bluetooth device.
608 */
609 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_SDP_RESULT =
610 "usual.event.bluetooth.remotedevice.SDP_RESULT";
611
612 /**
613 * Indicates the action of a common event about the UUID connection state of a remote Bluetooth device.
614 * To subscribe to this common event, your application must have the ohos.permission.DISCOVER_BLUETOOTH permission.
615 */
616 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_UUID_VALUE =
617 "usual.event.bluetooth.remotedevice.UUID_VALUE";
618
619 /**
620 * Indicates the action of a common event about the pairing request from a remote Bluetooth device.
621 * To subscribe to this common event, your application must have the ohos.permission.DISCOVER_BLUETOOTH permission.
622 */
623 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_PAIRING_REQ =
624 "usual.event.bluetooth.remotedevice.PAIRING_REQ";
625
626 /**
627 * Indicates the action of a common event that Bluetooth pairing is canceled.
628 */
629 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_PAIRING_CANCEL =
630 "usual.event.bluetooth.remotedevice.PAIRING_CANCEL";
631
632 /**
633 * Indicates the action of a common event about the connection request from a remote Bluetooth device.
634 */
635 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_CONNECT_REQ =
636 "usual.event.bluetooth.remotedevice.CONNECT_REQ";
637
638 /**
639 * Indicates the action of a common event about the response to the connection request from a remote Bluetooth
640 * device.
641 */
642 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_CONNECT_REPLY =
643 "usual.event.bluetooth.remotedevice.CONNECT_REPLY";
644
645 /**
646 * Indicates the action of a common event that the connection to a remote Bluetooth device has been canceled.
647 */
648 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_CONNECT_CANCEL =
649 "usual.event.bluetooth.remotedevice.CONNECT_CANCEL";
650
651 /**
652 * Indicates the action of a common event that the connection state of a Bluetooth handsfree has changed.
653 */
654 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_HANDSFREEUNIT_CONNECT_STATE_UPDATE =
655 "usual.event.bluetooth.handsfreeunit.CONNECT_STATE_UPDATE";
656
657 /**
658 * Indicates the action of a common event that the audio state of a Bluetooth handsfree has changed.
659 */
660 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_HANDSFREEUNIT_AUDIO_STATE_UPDATE =
661 "usual.event.bluetooth.handsfreeunit.AUDIO_STATE_UPDATE";
662
663 /**
664 * Indicates the action of a common event that the audio gateway state of a Bluetooth handsfree has changed.
665 */
666 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_HANDSFREEUNIT_AG_COMMON_EVENT =
667 "usual.event.bluetooth.handsfreeunit.AG_COMMON_EVENT";
668
669 /**
670 * Indicates the action of a common event that the calling state of a Bluetooth handsfree has changed.
671 */
672 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_HANDSFREEUNIT_AG_CALL_STATE_UPDATE =
673 "usual.event.bluetooth.handsfreeunit.AG_CALL_STATE_UPDATE";
674
675 /**
676 * Indicates the action of a common event that the state of a Bluetooth adapter has been changed, for example,
677 * Bluetooth has been turned on or off.
678 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
679 */
680 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_HOST_STATE_UPDATE =
681 "usual.event.bluetooth.host.STATE_UPDATE";
682
683 /**
684 * Indicates the action of a common event about the requests for the user to allow Bluetooth to be scanned.
685 */
686 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_HOST_REQ_DISCOVERABLE =
687 "usual.event.bluetooth.host.REQ_DISCOVERABLE";
688
689 /**
690 * Indicates the action of a common event about the requests for the user to turn on Bluetooth.
691 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
692 */
693 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_HOST_REQ_ENABLE = "usual.event.bluetooth.host.REQ_ENABLE";
694
695 /**
696 * Indicates the action of a common event about the requests for the user to turn off Bluetooth.
697 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
698 */
699 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_HOST_REQ_DISABLE =
700 "usual.event.bluetooth.host.REQ_DISABLE";
701
702 /**
703 * Indicates the action of a common event that the Bluetooth scanning mode of a device has changed.
704 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
705 */
706 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_HOST_SCAN_MODE_UPDATE =
707 "usual.event.bluetooth.host.SCAN_MODE_UPDATE";
708
709 /**
710 * Indicates the action of a common event that the Bluetooth scanning has been started on the device.
711 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
712 */
713 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_HOST_DISCOVERY_STARTED =
714 "usual.event.bluetooth.host.DISCOVERY_STARTED";
715
716 /**
717 * Indicates the action of a common event that the Bluetooth scanning is finished on the device.
718 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
719 */
720 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_HOST_DISCOVERY_FINISHED =
721 "usual.event.bluetooth.host.DISCOVERY_FINISHED";
722
723 /**
724 * Indicates the action of a common event that the Bluetooth adapter name of the device has changed.
725 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
726 */
727 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_HOST_NAME_UPDATE =
728 "usual.event.bluetooth.host.NAME_UPDATE";
729
730 /**
731 * Indicates the action of a common event that the connection state of Bluetooth A2DP Sink has changed.
732 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
733 */
734 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_A2DPSINK_CONNECT_STATE_UPDATE =
735 "usual.event.bluetooth.a2dpsink.CONNECT_STATE_UPDATE";
736
737 /**
738 * Indicates the action of a common event that the playing state of Bluetooth A2DP Sink has changed.
739 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
740 */
741 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_A2DPSINK_PLAYING_STATE_UPDATE =
742 "usual.event.bluetooth.a2dpsink.PLAYING_STATE_UPDATE";
743
744 /**
745 * Indicates the action of a common event that the audio state of Bluetooth A2DP Sink has changed.
746 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
747 */
748 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_A2DPSINK_AUDIO_STATE_UPDATE =
749 "usual.event.bluetooth.a2dpsink.AUDIO_STATE_UPDATE";
750
751 /**
752 * Indicates the action of a common event that the state of the device NFC adapter has changed.
753 * This is a protected common event, which can be sent only by the system.
754 */
755 const std::string CommonEventSupport::COMMON_EVENT_NFC_ACTION_ADAPTER_STATE_CHANGED =
756 "usual.event.nfc.action.ADAPTER_STATE_CHANGED";
757
758 /**
759 * Indicates the action of a common event that the NFC RF field is detected to be in the enabled state.
760 * To subscribe to this common event, your application must have the ohos.permission.MANAGE_SECURE_SETTINGS
761 * permission.
762 * This is a protected common event, which can be sent only by the system.
763 */
764 const std::string CommonEventSupport::COMMON_EVENT_NFC_ACTION_RF_FIELD_ON_DETECTED =
765 "usual.event.nfc.action.RF_FIELD_ON_DETECTED";
766
767 /**
768 * Indicates the action of a common event that the NFC RF field is detected to be in the disabled state.
769 * To subscribe to this common event, your application must have the ohos.permission.MANAGE_SECURE_SETTINGS
770 * permission.
771 * This is a protected common event, which can be sent only by the system.
772 */
773 const std::string CommonEventSupport::COMMON_EVENT_NFC_ACTION_RF_FIELD_OFF_DETECTED =
774 "usual.event.nfc.action.RF_FIELD_OFF_DETECTED";
775
776 /**
777 * Indicates the action of a common event that the system stops charging the battery.
778 * This is a protected common event, which can be sent only by the system.
779 */
780 const std::string CommonEventSupport::COMMON_EVENT_DISCHARGING = "usual.event.DISCHARGING";
781
782 /**
783 * Indicates the action of a common event that the system starts charging the battery.
784 * This is a protected common event, which can be sent only by the system.
785 */
786 const std::string CommonEventSupport::COMMON_EVENT_CHARGING = "usual.event.CHARGING";
787
788 /**
789 * Indicates the action of a common event that a charge type has been updated.
790 * This is a protected common event, which can be sent only by the system.
791 */
792 const std::string CommonEventSupport::COMMON_EVENT_CHARGE_TYPE_CHANGED = "usual.event.CHARGE_TYPE_CHANGED";
793
794 /**
795 * Indicates the action of a common event that the system idle mode has changed.
796 * This is a protected common event, which can be sent only by the system.
797 */
798 const std::string CommonEventSupport::COMMON_EVENT_DEVICE_IDLE_MODE_CHANGED = "usual.event.DEVICE_IDLE_MODE_CHANGED";
799
800 /**
801 * Indicates the action of a common event that the list of exempt applications is updated in the idle mode.
802 * This is a protected common event, which can be sent only by the system.
803 */
804 const std::string CommonEventSupport::COMMON_EVENT_DEVICE_IDLE_EXEMPTION_LIST_UPDATED =
805 "usual.event.DEVICE_IDLE_EXEMPTION_LIST_UPDATED";
806
807 /**
808 * Indicates the action of a common event that the power save mode of the system has changed.
809 * This is a protected common event, which can be sent only by the system.
810 */
811 const std::string CommonEventSupport::COMMON_EVENT_POWER_SAVE_MODE_CHANGED = "usual.event.POWER_SAVE_MODE_CHANGED";
812
813 /**
814 * Indicates the action of a common event that a user has been added to the system.
815 * To subscribe to this common event, your application must have the ohos.permission.MANAGE_LOCAL_ACCOUNTS permission.
816 */
817 const std::string CommonEventSupport::COMMON_EVENT_USER_ADDED = "usual.event.USER_ADDED";
818 /**
819 * Indicates the action of a common event that a user has been removed from the system.
820 * To subscribe to this common event, your application must have the ohos.permission.MANAGE_LOCAL_ACCOUNTS permission.
821 */
822 const std::string CommonEventSupport::COMMON_EVENT_USER_REMOVED = "usual.event.USER_REMOVED";
823
824 /**
825 * Indicates the action of a common event that an ability has been added.
826 * To subscribe to this common event, your application must have the ohos.permission.LISTEN_BUNDLE_CHANGE
827 * permission.
828 * This is a protected common event, which can be sent only by the system.
829 */
830 const std::string CommonEventSupport::COMMON_EVENT_ABILITY_ADDED = "common.event.ABILITY_ADDED";
831
832 /**
833 * Indicates the action of a common event that an ability has been removed.
834 * To subscribe to this common event, your application must have the ohos.permission.LISTEN_BUNDLE_CHANGE
835 * permission.
836 * This is a protected common event, which can be sent only by the system.
837 */
838 const std::string CommonEventSupport::COMMON_EVENT_ABILITY_REMOVED = "common.event.ABILITY_REMOVED";
839
840 /**
841 * Indicates the action of a common event that an ability has been updated.
842 * To subscribe to this common event, your application must have the ohos.permission.LISTEN_BUNDLE_CHANGE
843 * permission.
844 * This is a protected common event, which can be sent only by the system.
845 */
846 const std::string CommonEventSupport::COMMON_EVENT_ABILITY_UPDATED = "common.event.ABILITY_UPDATED";
847
848 /**
849 * Indicates the action of a common event that the location mode of the system has changed.
850 * This is a protected common event, which can be sent only by the system.
851 */
852 const std::string CommonEventSupport::COMMON_EVENT_LOCATION_MODE_STATE_CHANGED =
853 "usual.event.location.MODE_STATE_CHANGED";
854
855 /**
856 * Indicates the action of a common event that the in-vehicle infotainment (IVI) system of a vehicle is sleeping.
857 * This is a protected common event, which can be sent only by the system.
858 */
859 const std::string CommonEventSupport::COMMON_EVENT_IVI_SLEEP = "common.event.IVI_SLEEP";
860
861 /**
862 * The ivi is slept and notify the app stop playing.
863 * This is a protected common event that can only be sent by system.
864 */
865 const std::string CommonEventSupport::COMMON_EVENT_IVI_PAUSE = "common.event.IVI_PAUSE";
866
867 /**
868 * Indicates the action of a common event that a third-party application is instructed to pause the current work.
869 * This is a protected common event, which can be sent only by the system.
870 */
871 const std::string CommonEventSupport::COMMON_EVENT_IVI_STANDBY = "common.event.IVI_STANDBY";
872
873 /**
874 * Indicates the action of a common event that a third-party application is instructed to save its last mode.
875 * This is a protected common event, which can be sent only by the system.
876 */
877 const std::string CommonEventSupport::COMMON_EVENT_IVI_LASTMODE_SAVE = "common.event.IVI_LASTMODE_SAVE";
878
879 /**
880 * Indicates the action of a common event that the voltage of the vehicle power system is abnormal.
881 * This is a protected common event, which can be sent only by the system.
882 */
883 const std::string CommonEventSupport::COMMON_EVENT_IVI_VOLTAGE_ABNORMAL = "common.event.IVI_VOLTAGE_ABNORMAL";
884
885 /**
886 * The ivi temperature is too high.
887 * This is a protected common event that can only be sent by system.
888 * This common event will be delete later, please use COMMON_EVENT_IVI_TEMPERATURE_ABNORMAL.
889 */
890 const std::string CommonEventSupport::COMMON_EVENT_IVI_HIGH_TEMPERATURE = "common.event.IVI_HIGH_TEMPERATURE";
891
892 /**
893 * The ivi temperature is extreme high.
894 * This is a protected common event that can only be sent by system.
895 * This common event will be delete later, please use COMMON_EVENT_IVI_TEMPERATURE_ABNORMAL.
896 */
897 const std::string CommonEventSupport::COMMON_EVENT_IVI_EXTREME_TEMPERATURE = "common.event.IVI_EXTREME_TEMPERATURE";
898
899 /**
900 * Indicates the action of a common event that the in-vehicle system has an extreme temperature.
901 * This is a protected common event, which can be sent only by the system.
902 */
903 const std::string CommonEventSupport::COMMON_EVENT_IVI_TEMPERATURE_ABNORMAL = "common.event.IVI_TEMPERATURE_ABNORMAL";
904
905 /**
906 * Indicates the action of a common event that the voltage of the vehicle power system is restored to normal.
907 * This is a protected common event, which can be sent only by the system.
908 */
909 const std::string CommonEventSupport::COMMON_EVENT_IVI_VOLTAGE_RECOVERY = "common.event.IVI_VOLTAGE_RECOVERY";
910
911 /**
912 * Indicates the action of a common event that the temperature of the in-vehicle system is restored to normal.
913 * This is a protected common event, which can be sent only by the system.
914 */
915 const std::string CommonEventSupport::COMMON_EVENT_IVI_TEMPERATURE_RECOVERY = "common.event.IVI_TEMPERATURE_RECOVERY";
916
917 /**
918 * Indicates the action of a common event that the battery service is active.
919 * This is a protected common event, which can be sent only by the system.
920 */
921 const std::string CommonEventSupport::COMMON_EVENT_IVI_ACTIVE = "common.event.IVI_ACTIVE";
922
923 /**
924 * The usb state changed.
925 * This is a protected common event that can only be sent by system.
926 */
927 const std::string CommonEventSupport::COMMON_EVENT_USB_STATE = "usual.event.hardware.usb.action.USB_STATE";
928
929 /**
930 * The usb port changed.
931 * This is a protected common event that can only be sent by system.
932 */
933 const std::string CommonEventSupport::COMMON_EVENT_USB_PORT_CHANGED =
934 "usual.event.hardware.usb.action.USB_PORT_CHANGED";
935
936 /**
937 * Indicates the action of a common event that a USB device has been attached when the user device functions as a USB
938 * host.
939 * This is a protected common event, which can be sent only by the system.
940 */
941 const std::string CommonEventSupport::COMMON_EVENT_USB_DEVICE_ATTACHED =
942 "usual.event.hardware.usb.action.USB_DEVICE_ATTACHED";
943
944 /**
945 * Indicates the action of a common event that a USB device has been detached when the user device functions as a USB
946 * host.
947 * This is a protected common event, which can be sent only by the system.
948 */
949 const std::string CommonEventSupport::COMMON_EVENT_USB_DEVICE_DETACHED =
950 "usual.event.hardware.usb.action.USB_DEVICE_DETACHED";
951
952 /**
953 * Indicates the action of a common event that a USB accessory has been attached.
954 * This is a protected common event, which can be sent only by the system.
955 */
956 const std::string CommonEventSupport::COMMON_EVENT_USB_ACCESSORY_ATTACHED =
957 "usual.event.hardware.usb.action.USB_ACCESSORY_ATTACHED";
958
959 /**
960 * Indicates the action of a common event that a USB accessory has been detached.
961 * This is a protected common event, which can be sent only by the system.
962 */
963 const std::string CommonEventSupport::COMMON_EVENT_USB_ACCESSORY_DETACHED =
964 "usual.event.hardware.usb.action.USB_ACCESSORY_DETACHED";
965
966 /**
967 * The storage space is low.
968 * This is a protected common event that can only be sent by system.
969 */
970 const std::string CommonEventSupport::COMMON_EVENT_DEVICE_STORAGE_LOW = "usual.event.DEVICE_STORAGE_LOW";
971
972 /**
973 * The storage space is normal.
974 * This is a protected common event that can only be sent by system.
975 */
976 const std::string CommonEventSupport::COMMON_EVENT_DEVICE_STORAGE_OK = "usual.event.DEVICE_STORAGE_OK";
977
978 /**
979 * The storage space is full.
980 * This is a protected common event that can only be sent by system.
981 */
982 const std::string CommonEventSupport::COMMON_EVENT_DEVICE_STORAGE_FULL = "usual.event.DEVICE_STORAGE_FULL";
983
984 /**
985 * The network connection was changed.
986 * This is a protected common event that can only be sent by system.
987 */
988 const std::string CommonEventSupport::COMMON_EVENT_CONNECTIVITY_CHANGE = "usual.event.CONNECTIVITY_CHANGE";
989
990 /**
991 * The global http proxy was changed.
992 * This is a protected common event that can only be sent by system.
993 */
994 const std::string CommonEventSupport::COMMON_EVENT_HTTP_PROXY_CHANGE = "usual.event.HTTP_PROXY_CHANGE";
995
996 /**
997 * Indicates the action of a common event that an external storage device was removed.
998 * To subscribe to this common event, your application must have the ohos.permission.WRITE_USER_STORAGE or
999 * ohos.permission.STORAGE_MANAGER permission.
1000 * This common event can be published only by system applications.
1001 */
1002 const std::string CommonEventSupport::COMMON_EVENT_DISK_REMOVED = "usual.event.data.DISK_REMOVED";
1003
1004 /**
1005 * Indicates the action of a common event that an external storage device was unmounted.
1006 * To subscribe to this common event, your application must have the ohos.permission.WRITE_USER_STORAGE or
1007 * ohos.permission.STORAGE_MANAGER permission.
1008 * This common event can be published only by system applications.
1009 */
1010 const std::string CommonEventSupport::COMMON_EVENT_DISK_UNMOUNTED = "usual.event.data.DISK_UNMOUNTED";
1011
1012 /**
1013 * Indicates the action of a common event that an external storage device was mounted.
1014 * To subscribe to this common event, your application must have the ohos.permission.WRITE_USER_STORAGE or
1015 * ohos.permission.STORAGE_MANAGER permission.
1016 * This common event can be published only by system applications.
1017 */
1018 const std::string CommonEventSupport::COMMON_EVENT_DISK_MOUNTED = "usual.event.data.DISK_MOUNTED";
1019
1020 /**
1021 * Indicates the action of a common event that an external storage device was removed without being unmounted.
1022 * To subscribe to this common event, your application must have the ohos.permission.WRITE_USER_STORAGE or
1023 * ohos.permission.STORAGE_MANAGER permission.
1024 * This common event can be published only by system applications.
1025 */
1026 const std::string CommonEventSupport::COMMON_EVENT_DISK_BAD_REMOVAL = "usual.event.data.DISK_BAD_REMOVAL";
1027
1028 /**
1029 * Indicates the action of a common event that an external storage device becomes unmountable.
1030 * To subscribe to this common event, your application must have the ohos.permission.WRITE_USER_STORAGE or
1031 * ohos.permission.STORAGE_MANAGER permission.
1032 * This common event can be published only by system applications.
1033 */
1034 const std::string CommonEventSupport::COMMON_EVENT_DISK_UNMOUNTABLE = "usual.event.data.DISK_UNMOUNTABLE";
1035
1036 /**
1037 * Indicates the action of a common event that an external storage device was ejected.
1038 * To subscribe to this common event, your application must have the ohos.permission.WRITE_USER_STORAGE or
1039 * ohos.permission.STORAGE_MANAGER permission.
1040 * This common event can be published only by system applications.
1041 */
1042 const std::string CommonEventSupport::COMMON_EVENT_DISK_EJECT = "usual.event.data.DISK_EJECT";
1043
1044 /**
1045 * Indicates the action of a common event that an external storage device was removed.
1046 * To subscribe to this common event, your application must have the ohos.permission.WRITE_USER_STORAGE or
1047 * ohos.permission.STORAGE_MANAGER permission.
1048 * This common event can be published only by system applications.
1049 */
1050 const std::string CommonEventSupport::COMMON_EVENT_VOLUME_REMOVED = "usual.event.data.VOLUME_REMOVED";
1051
1052 /**
1053 * Indicates the action of a common event that an external storage device was unmounted.
1054 * To subscribe to this common event, your application must have the ohos.permission.WRITE_USER_STORAGE or
1055 * ohos.permission.STORAGE_MANAGER permission.
1056 * This common event can be published only by system applications.
1057 */
1058 const std::string CommonEventSupport::COMMON_EVENT_VOLUME_UNMOUNTED = "usual.event.data.VOLUME_UNMOUNTED";
1059
1060 /**
1061 * Indicates the action of a common event that an external storage device was mounted.
1062 * To subscribe to this common event, your application must have the ohos.permission.WRITE_USER_STORAGE or
1063 * ohos.permission.STORAGE_MANAGER permission.
1064 * This common event can be published only by system applications.
1065 */
1066 const std::string CommonEventSupport::COMMON_EVENT_VOLUME_MOUNTED = "usual.event.data.VOLUME_MOUNTED";
1067
1068 /**
1069 * Indicates the action of a common event that an external storage device was removed without being unmounted.
1070 * To subscribe to this common event, your application must have the ohos.permission.WRITE_USER_STORAGE or
1071 * ohos.permission.STORAGE_MANAGER permission.
1072 * This common event can be published only by system applications.
1073 */
1074 const std::string CommonEventSupport::COMMON_EVENT_VOLUME_BAD_REMOVAL = "usual.event.data.VOLUME_BAD_REMOVAL";
1075
1076 /**
1077 * Indicates the action of a common event that an external storage device was ejected.
1078 * To subscribe to this common event, your application must have the ohos.permission.WRITE_USER_STORAGE or
1079 * ohos.permission.STORAGE_MANAGER permission.
1080 * This common event can be published only by system applications.
1081 */
1082 const std::string CommonEventSupport::COMMON_EVENT_VOLUME_EJECT = "usual.event.data.VOLUME_EJECT";
1083
1084 /**
1085 * Indicates the action of a common event that the account visible changed.
1086 * To subscribe to this common event, your application must have the ohos.permission.GET_APP_ACCOUNTS permission.
1087 * This is a protected common event, which can be sent only by the system.
1088 */
1089 const std::string CommonEventSupport::COMMON_EVENT_VISIBLE_ACCOUNTS_UPDATED =
1090 "usual.event.data.VISIBLE_ACCOUNTS_UPDATED";
1091
1092 /**
1093 * Indicates the action of a common event that the account is deleted.
1094 * To subscribe to this common event, your application must have the ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
1095 * permission.
1096 * This is a protected common event, which can be sent only by the system.
1097 */
1098 const std::string CommonEventSupport::COMMON_EVENT_ACCOUNT_DELETED = "usual.event.data.ACCOUNT_DELETED";
1099
1100 /**
1101 * Indicates the action of a common event that the foundation is ready.
1102 * To subscribe to this common event, your application must have the ohos.permission.RECEIVER_STARTUP_COMPLETED
1103 * permission.
1104 * This is a protected common event, which can be sent only by the system.
1105 */
1106 const std::string CommonEventSupport::COMMON_EVENT_FOUNDATION_READY = "common.event.FOUNDATION_READY";
1107
1108 /**
1109 * Indicates the action of a common event that the default voice subscription has changed.
1110 * This is a protected common event that can only be sent by system.
1111 */
1112 const std::string CommonEventSupport::COMMON_EVENT_SIM_CARD_DEFAULT_VOICE_SUBSCRIPTION_CHANGED =
1113 "usual.event.SIM.DEFAULT_VOICE_SUBSCRIPTION_CHANGED";
1114
1115 /**
1116 * Indicates the action of a common event that the phone SIM card state has changed.
1117 * This is a protected common event that can only be sent by system.
1118 */
1119 const std::string CommonEventSupport::COMMON_EVENT_SIM_STATE_CHANGED = "usual.event.SIM_STATE_CHANGED";
1120
1121 /**
1122 * Indicates the action of a common event that the airplane mode of the device has changed.
1123 * This common event can be triggered only by system applications.
1124 */
1125 const std::string CommonEventSupport::COMMON_EVENT_AIRPLANE_MODE_CHANGED = "usual.event.AIRPLANE_MODE";
1126
1127 /**
1128 * Indicates the action of a common event that a new sms bas been received by the device.
1129 * To subscribe to this common event, your application must have the ohos.permission.RECEIVE_SMS permission.
1130 * This common event can be triggered only by system.
1131 */
1132 const std::string CommonEventSupport::COMMON_EVENT_SMS_RECEIVE_COMPLETED = "usual.event.SMS_RECEIVE_COMPLETED";
1133
1134 /**
1135 * Indicates the action of a common event that a new sms emergency cell broadcast bas been received by the device.
1136 * This common event can be triggered only by system.
1137 */
1138 const std::string CommonEventSupport::COMMON_EVENT_SMS_EMERGENCY_CB_RECEIVE_COMPLETED =
1139 "usual.event.SMS_EMERGENCY_CB_RECEIVE_COMPLETED";
1140
1141 /**
1142 * Indicates the action of a common event that a new sms normal cell broadcast bas been received by the device.
1143 * This common event can be triggered only by system.
1144 */
1145 const std::string CommonEventSupport::COMMON_EVENT_SMS_CB_RECEIVE_COMPLETED = "usual.event.SMS_CB_RECEIVE_COMPLETED";
1146
1147 /**
1148 * Indicates the action of a common event that a STK command has been received by the device.
1149 * This common event can be triggered only by system.
1150 */
1151 const std::string CommonEventSupport::COMMON_EVENT_STK_COMMAND = "usual.event.STK_COMMAND";
1152
1153 /**
1154 * Indicates the action of a common event that STK session end.
1155 * This common event can be triggered only by system.
1156 */
1157 const std::string CommonEventSupport::COMMON_EVENT_STK_SESSION_END = "usual.event.STK_SESSION_END";
1158
1159 /**
1160 * Indicates the action of a common event that the STK phone card state has changed.
1161 * This common event can be triggered only by system.
1162 */
1163 const std::string CommonEventSupport::COMMON_EVENT_STK_CARD_STATE_CHANGED = "usual.event.STK_CARD_STATE_CHANGED";
1164
1165 /**
1166 * Indicates the action of a common event that an alpha string during call control has been received by the device.
1167 * This common event can be triggered only by system.
1168 */
1169 const std::string CommonEventSupport::COMMON_EVENT_STK_ALPHA_IDENTIFIER = "usual.event.STK_ALPHA_IDENTIFIER";
1170
1171 /**
1172 * Indicates the action of a common event that the spn display information has been updated.
1173 * This common event can be triggered only by system.
1174 */
1175 const std::string CommonEventSupport::COMMON_EVENT_SPN_INFO_CHANGED = "usual.event.SPN_INFO_CHANGED";
1176
1177 /**
1178 * Indicates the action of a common event that the NITZ time has been updated.
1179 * This is a protected common event that can only be sent by system.
1180 */
1181 const std::string CommonEventSupport::COMMON_EVENT_NITZ_TIME_CHANGED = "usual.event.NITZ_TIME_CHANGED";
1182
1183 /**
1184 * Indicates the action of a common event that the NITZ time zone has been updated.
1185 * This is a protected common event that can only be sent by system.
1186 */
1187 const std::string CommonEventSupport::COMMON_EVENT_NITZ_TIMEZONE_CHANGED =
1188 "usual.event.NITZ_TIMEZONE_CHANGED";
1189
1190 /**
1191 * Indicates the action of a common event that a new sms wappush has been received by the device.
1192 * This is a protected common event that can only be sent by system.
1193 */
1194 const std::string CommonEventSupport::COMMON_EVENT_SMS_WAPPUSH_RECEIVE_COMPLETED =
1195 "usual.event.SMS_WAPPUSH_RECEIVE_COMPLETED";
1196
1197 /**
1198 * Indicates the action of a common event that the operator config has been updated.
1199 * This is a protected common event that can only be sent by system.
1200 */
1201 const std::string CommonEventSupport::COMMON_EVENT_OPERATOR_CONFIG_CHANGED =
1202 "usual.event.OPERATOR_CONFIG_CHANGED";
1203
1204 /**
1205 * Indicates the action of a common event that the notification slot has been updated.
1206 * This is a protected common event that can only be sent by system.
1207 */
1208 const std::string CommonEventSupport::COMMON_EVENT_SLOT_CHANGE =
1209 "usual.event.SLOT_CHANGE";
1210
1211 /**
1212 * Only for test case.
1213 */
1214 const std::string CommonEventSupport::COMMON_EVENT_TEST_ACTION1 = "usual.event.test1";
1215
1216 /**
1217 * Only for test case.
1218 */
1219 const std::string CommonEventSupport::COMMON_EVENT_TEST_ACTION2 = "usual.event.test2";
1220
1221 /**
1222 * Indicates the action of a common event that the default SMS subscription has
1223 * been changed. This is a protected common event that can only be sent by system.
1224 */
1225 const std::string CommonEventSupport::COMMON_EVENT_SIM_CARD_DEFAULT_SMS_SUBSCRIPTION_CHANGED =
1226 "usual.event.SIM.DEFAULT_SMS_SUBSCRIPTION_CHANGED";
1227
1228 /**
1229 * Indicates the action of a common event that the default data subscription has been changed.
1230 * This is a protected common event that can only be sent by system.
1231 */
1232 const std::string CommonEventSupport::COMMON_EVENT_SIM_CARD_DEFAULT_DATA_SUBSCRIPTION_CHANGED =
1233 "usual.event.SIM.DEFAULT_DATA_SUBSCRIPTION_CHANGED";
1234
1235 /**
1236 * Indicates the action of a common event that the default main subscription has been changed.
1237 * This is a protected common event that can only be sent by system.
1238 */
1239 const std::string CommonEventSupport::COMMON_EVENT_SIM_CARD_DEFAULT_MAIN_SUBSCRIPTION_CHANGED =
1240 "usual.event.SIM.DEFAULT_MAIN_SUBSCRIPTION_CHANGED";
1241
1242 /**
1243 * Indicates the action of a common event that the call state has been changed.
1244 * To subscribe to this protected common event, your application must have the ohos.permission.GET_TELEPHONY_STATE
1245 * permission.
1246 * This is a protected common event that can only be sent by system.
1247 */
1248 const std::string CommonEventSupport::COMMON_EVENT_CALL_STATE_CHANGED = "usual.event.CALL_STATE_CHANGED";
1249
1250 /**
1251 * Indicates the action of a common event that the cellular data state has been changed.
1252 * This is a protected common event that can only be sent by system.
1253 */
1254 const std::string CommonEventSupport::COMMON_EVENT_CELLULAR_DATA_STATE_CHANGED =
1255 "usual.event.CELLULAR_DATA_STATE_CHANGED";
1256
1257 /**
1258 * Indicates the action of a common event that the network state has been changed.
1259 * This is a protected common event that can only be sent by system.
1260 */
1261 const std::string CommonEventSupport::COMMON_EVENT_NETWORK_STATE_CHANGED = "usual.event.NETWORK_STATE_CHANGED";
1262
1263 /**
1264 * Indicates the action of a common event that the signal info has been changed.
1265 * This is a protected common event that can only be sent by system.
1266 */
1267 const std::string CommonEventSupport::COMMON_EVENT_SIGNAL_INFO_CHANGED = "usual.event.SIGNAL_INFO_CHANGED";
1268
1269 /**
1270 * Indicates the action of a common event that the incoming call has been missed.
1271 * To subscribe to this protected common event, your application must have the ohos.permission.GET_TELEPHONY_STATE
1272 * permission.
1273 * This is a protected common event that can only be sent by system.
1274 */
1275 const std::string CommonEventSupport::COMMON_EVENT_INCOMING_CALL_MISSED = "usual.event.INCOMING_CALL_MISSED";
1276
1277 /**
1278 * Indicate the result of quick fix apply.
1279 * This common event can be triggered only by system.
1280 */
1281 const std::string CommonEventSupport::COMMON_EVENT_QUICK_FIX_APPLY_RESULT = "usual.event.QUICK_FIX_APPLY_RESULT";
1282
1283 /**
1284 * Indicate the result of quick fix revoke.
1285 * This common event can be triggered only by system.
1286 */
1287 const std::string CommonEventSupport::COMMON_EVENT_QUICK_FIX_REVOKE_RESULT = "usual.event.QUICK_FIX_REVOKE_RESULT";
1288
1289 /**
1290 * Indicates the action of a common event that radio state change.
1291 * To subscribe to this protected common event that can only be sent by system.
1292 */
1293 const std::string CommonEventSupport::COMMON_EVENT_RADIO_STATE_CHANGE = "usual.event.RADIO_STATE_CHANGE";
1294
1295 /**
1296 * Indicates the action of a common event about a login of a distributed account.
1297 * This is a protected common event that can only be sent by system.
1298 */
1299 const std::string CommonEventSupport::COMMON_EVENT_DISTRIBUTED_ACCOUNT_LOGIN =
1300 "common.event.DISTRIBUTED_ACCOUNT_LOGIN";
1301
1302 /**
1303 * Indicates the action of a common event about a logout of a distributed account.
1304 * This is a protected common event that can only be sent by system.
1305 */
1306 const std::string CommonEventSupport::COMMON_EVENT_DISTRIBUTED_ACCOUNT_LOGOUT =
1307 "common.event.DISTRIBUTED_ACCOUNT_LOGOUT";
1308
1309 /**
1310 * Indicates the action of a common event that the token of a distributed account is invalid.
1311 * This is a protected common event that can only be sent by system.
1312 */
1313 const std::string CommonEventSupport::COMMON_EVENT_DISTRIBUTED_ACCOUNT_TOKEN_INVALID =
1314 "common.event.DISTRIBUTED_ACCOUNT_TOKEN_INVALID";
1315
1316 /**
1317 * Indicates the action of a common event about a logoff of a distributed account.
1318 * This is a protected common event that can only be sent by system.
1319 */
1320 const std::string CommonEventSupport::COMMON_EVENT_DISTRIBUTED_ACCOUNT_LOGOFF =
1321 "common.event.DISTRIBUTED_ACCOUNT_LOGOFF";
1322
1323 /**
1324 * Indicates the action of a common event that the os account information has been updated.
1325 * This is a protected common event that can only be sent by system.
1326 */
1327 const std::string CommonEventSupport::COMMON_EVENT_USER_INFO_UPDATED =
1328 "usual.event.USER_INFO_UPDATED";
1329
1330 /**
1331 * Indicate the action of a common event that domain account status has been changed.
1332 * This is a protected common event that can only be sent by system.
1333 */
1334 const std::string CommonEventSupport::COMMON_EVENT_DOMAIN_ACCOUNT_STATUS_CHANGED =
1335 "usual.event.DOMAIN_ACCOUNT_STATUS_CHANGED";
1336
1337 /**
1338 * Indicates the action of a common event that the screen lock.
1339 * This is a protected common event that can only be sent by system.
1340 */
1341 const std::string CommonEventSupport::COMMON_EVENT_SCREEN_LOCKED = "usual.event.SCREEN_LOCKED";
1342
1343 /**
1344 * Indicates the action of a common event that the screen unlock.
1345 * This is a protected common event that can only be sent by system.
1346 */
1347 const std::string CommonEventSupport::COMMON_EVENT_SCREEN_UNLOCKED = "usual.event.SCREEN_UNLOCKED";
1348
1349 /**
1350 * Indicates the action of a common event that the call audio quality information has been updated.
1351 * This is a protected common event that can only be sent by system.
1352 */
1353 const std::string CommonEventSupport::COMMON_EVENT_AUDIO_QUALITY_CHANGE =
1354 "usual.event.AUDIO_QUALITY_CHANGE";
1355
1356 /**
1357 * Indicates the action of a common event about special code.
1358 * This is a protected common event that can only be sent by system.
1359 */
1360 const std::string CommonEventSupport::COMMON_EVENT_SPECIAL_CODE = "common.event.SPECIAL_CODE";
1361
CommonEventSupport()1362 CommonEventSupport::CommonEventSupport()
1363 {
1364 Init();
1365 }
1366
~CommonEventSupport()1367 CommonEventSupport::~CommonEventSupport()
1368 {}
1369
Init()1370 void CommonEventSupport::Init()
1371 {
1372 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_BOOT_COMPLETED);
1373 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_LOCKED_BOOT_COMPLETED);
1374 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_SHUTDOWN);
1375 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_BATTERY_CHANGED);
1376 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_BATTERY_LOW);
1377 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_BATTERY_OKAY);
1378 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_POWER_CONNECTED);
1379 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_POWER_DISCONNECTED);
1380
1381 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_SCREEN_OFF);
1382 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_SCREEN_ON);
1383 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_THERMAL_LEVEL_CHANGED);
1384 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_CHARGE_IDLE_MODE_CHANGED);
1385 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_USER_PRESENT);
1386 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_SPLIT_SCREEN);
1387
1388 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_TIME_TICK);
1389 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_TIME_CHANGED);
1390 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_DATE_CHANGED);
1391 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_TIMEZONE_CHANGED);
1392
1393 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_CLOSE_SYSTEM_DIALOGS);
1394
1395 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_BUNDLE_SCAN_FINISHED);
1396 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_PACKAGE_ADDED);
1397 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_PACKAGE_REPLACED);
1398 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_MY_PACKAGE_REPLACED);
1399 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_PACKAGE_REMOVED);
1400 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_BUNDLE_REMOVED);
1401 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_PACKAGE_FULLY_REMOVED);
1402 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_PACKAGE_CHANGED);
1403 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_PACKAGE_RESTARTED);
1404 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_PACKAGE_DATA_CLEARED);
1405 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_PACKAGE_CACHE_CLEARED);
1406 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_PACKAGES_SUSPENDED);
1407 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_PACKAGES_UNSUSPENDED);
1408 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_MY_PACKAGE_SUSPENDED);
1409 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_MY_PACKAGE_UNSUSPENDED);
1410 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_UID_REMOVED);
1411 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_PACKAGE_FIRST_LAUNCH);
1412 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_PACKAGE_NEEDS_VERIFICATION);
1413 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_PACKAGE_VERIFIED);
1414
1415 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_EXTERNAL_APPLICATIONS_AVAILABLE);
1416 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_EXTERNAL_APPLICATIONS_UNAVAILABLE);
1417
1418 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_CONFIGURATION_CHANGED);
1419 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_LOCALE_CHANGED);
1420
1421 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_DRIVE_MODE);
1422 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_HOME_MODE);
1423 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_OFFICE_MODE);
1424
1425 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_HWID_LOGIN);
1426 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_HWID_LOGOUT);
1427 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_HWID_TOKEN_INVALID);
1428 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_HWID_LOGOFF);
1429
1430 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_NFC_ACTION_ADAPTER_STATE_CHANGED);
1431 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_NFC_ACTION_RF_FIELD_ON_DETECTED);
1432 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_NFC_ACTION_RF_FIELD_OFF_DETECTED);
1433
1434 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_DISCHARGING);
1435 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_CHARGING);
1436 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_CHARGE_TYPE_CHANGED);
1437 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_DEVICE_IDLE_MODE_CHANGED);
1438 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_DEVICE_IDLE_EXEMPTION_LIST_UPDATED);
1439 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_POWER_SAVE_MODE_CHANGED);
1440
1441 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_ABILITY_ADDED);
1442 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_ABILITY_REMOVED);
1443 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_ABILITY_UPDATED);
1444
1445 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_LOCATION_MODE_STATE_CHANGED);
1446
1447 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_IVI_SLEEP);
1448 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_IVI_PAUSE);
1449 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_IVI_STANDBY);
1450 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_IVI_LASTMODE_SAVE);
1451 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_IVI_VOLTAGE_ABNORMAL);
1452 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_IVI_HIGH_TEMPERATURE);
1453 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_IVI_EXTREME_TEMPERATURE);
1454 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_IVI_TEMPERATURE_ABNORMAL);
1455 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_IVI_VOLTAGE_RECOVERY);
1456 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_IVI_TEMPERATURE_RECOVERY);
1457 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_IVI_ACTIVE);
1458
1459 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_USB_STATE);
1460 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_USB_PORT_CHANGED);
1461 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_USB_DEVICE_ATTACHED);
1462 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_USB_DEVICE_DETACHED);
1463 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_USB_ACCESSORY_ATTACHED);
1464 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_USB_ACCESSORY_DETACHED);
1465
1466 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_DEVICE_STORAGE_LOW);
1467 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_DEVICE_STORAGE_OK);
1468 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_DEVICE_STORAGE_FULL);
1469
1470 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_CONNECTIVITY_CHANGE);
1471 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_HTTP_PROXY_CHANGE);
1472
1473 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_DISK_REMOVED);
1474 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_DISK_UNMOUNTED);
1475 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_DISK_MOUNTED);
1476
1477 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_DISK_BAD_REMOVAL);
1478 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_DISK_UNMOUNTABLE);
1479 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_DISK_EJECT);
1480
1481 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_VISIBLE_ACCOUNTS_UPDATED);
1482
1483 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_ACCOUNT_DELETED);
1484
1485 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_FOUNDATION_READY);
1486
1487 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_SIM_CARD_DEFAULT_VOICE_SUBSCRIPTION_CHANGED);
1488
1489 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_SIM_STATE_CHANGED);
1490
1491 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_AIRPLANE_MODE_CHANGED);
1492
1493 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_SMS_RECEIVE_COMPLETED);
1494
1495 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_SMS_EMERGENCY_CB_RECEIVE_COMPLETED);
1496
1497 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_SMS_CB_RECEIVE_COMPLETED);
1498
1499 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_STK_COMMAND);
1500
1501 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_STK_SESSION_END);
1502
1503 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_STK_CARD_STATE_CHANGED);
1504
1505 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_STK_ALPHA_IDENTIFIER);
1506
1507 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_SPN_INFO_CHANGED);
1508
1509 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_NITZ_TIME_CHANGED);
1510
1511 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_NITZ_TIMEZONE_CHANGED);
1512
1513 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_NETMANAGER_NETSTATES_UPDATED);
1514
1515 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_NETMANAGER_NETSTATES_LIMITED);
1516
1517 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_SMS_WAPPUSH_RECEIVE_COMPLETED);
1518
1519 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_OPERATOR_CONFIG_CHANGED);
1520
1521 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_SLOT_CHANGE);
1522
1523 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_SIM_CARD_DEFAULT_SMS_SUBSCRIPTION_CHANGED);
1524
1525 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_SIM_CARD_DEFAULT_DATA_SUBSCRIPTION_CHANGED);
1526
1527 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_CALL_STATE_CHANGED);
1528
1529 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_SIM_CARD_DEFAULT_MAIN_SUBSCRIPTION_CHANGED);
1530
1531 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_CELLULAR_DATA_STATE_CHANGED);
1532
1533 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_SIGNAL_INFO_CHANGED);
1534
1535 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_NETWORK_STATE_CHANGED);
1536
1537 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_INCOMING_CALL_MISSED);
1538
1539 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_QUICK_FIX_APPLY_RESULT);
1540
1541 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_QUICK_FIX_REVOKE_RESULT);
1542
1543 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_RADIO_STATE_CHANGE);
1544
1545 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_DISTRIBUTED_ACCOUNT_LOGIN);
1546
1547 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_DISTRIBUTED_ACCOUNT_LOGOUT);
1548
1549 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_DISTRIBUTED_ACCOUNT_LOGOFF);
1550
1551 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_DISTRIBUTED_ACCOUNT_TOKEN_INVALID);
1552
1553 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_MANAGE_PACKAGE_STORAGE);
1554
1555 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_USER_STARTED);
1556
1557 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_USER_BACKGROUND);
1558
1559 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_USER_FOREGROUND);
1560
1561 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_USER_SWITCHED);
1562
1563 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_USER_STARTING);
1564
1565 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_USER_UNLOCKED);
1566
1567 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_USER_STOPPING);
1568
1569 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_USER_STOPPED);
1570
1571 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_WIFI_POWER_STATE);
1572
1573 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_WIFI_POWER_STATE);
1574
1575 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_WIFI_SCAN_FINISHED);
1576
1577 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_WIFI_RSSI_VALUE);
1578
1579 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_WIFI_CONN_STATE);
1580
1581 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_WIFI_HOTSPOT_STATE);
1582
1583 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_WIFI_AP_STA_JOIN);
1584
1585 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_WIFI_AP_STA_LEAVE);
1586
1587 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_WIFI_MPLINK_STATE_CHANGE);
1588
1589 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_WIFI_P2P_CONN_STATE);
1590
1591 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_WIFI_P2P_STATE_CHANGED);
1592
1593 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_WIFI_P2P_PEERS_STATE_CHANGED);
1594
1595 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_WIFI_P2P_PEERS_DISCOVERY_STATE_CHANGED);
1596
1597 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_WIFI_P2P_CURRENT_DEVICE_STATE_CHANGED);
1598
1599 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_WIFI_P2P_GROUP_STATE_CHANGED);
1600
1601 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_BLUETOOTH_HANDSFREE_AG_CONNECT_STATE_UPDATE);
1602
1603 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_BLUETOOTH_HANDSFREE_AG_CURRENT_DEVICE_UPDATE);
1604
1605 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_BLUETOOTH_HANDSFREE_AG_AUDIO_STATE_UPDATE);
1606
1607 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_BLUETOOTH_A2DPSOURCE_CONNECT_STATE_UPDATE);
1608
1609 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_BLUETOOTH_A2DPSOURCE_CURRENT_DEVICE_UPDATE);
1610
1611 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_BLUETOOTH_A2DPSOURCE_PLAYING_STATE_UPDATE);
1612
1613 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_BLUETOOTH_A2DPSOURCE_AVRCP_CONNECT_STATE_UPDATE);
1614
1615 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_BLUETOOTH_A2DPSOURCE_CODEC_VALUE_UPDATE);
1616
1617 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_DISCOVERED);
1618
1619 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_CLASS_VALUE_UPDATE);
1620
1621 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_ACL_CONNECTED);
1622
1623 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_ACL_DISCONNECTED);
1624
1625 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_NAME_UPDATE);
1626
1627 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_PAIR_STATE);
1628
1629 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_BATTERY_VALUE_UPDATE);
1630
1631 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_SDP_RESULT);
1632
1633 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_UUID_VALUE);
1634
1635 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_PAIRING_REQ);
1636
1637 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_PAIRING_CANCEL);
1638
1639 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_CONNECT_REQ);
1640
1641 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_CONNECT_REPLY);
1642
1643 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_CONNECT_CANCEL);
1644
1645 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_BLUETOOTH_HANDSFREEUNIT_CONNECT_STATE_UPDATE);
1646
1647 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_BLUETOOTH_HANDSFREEUNIT_AUDIO_STATE_UPDATE);
1648
1649 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_BLUETOOTH_HANDSFREEUNIT_AG_COMMON_EVENT);
1650
1651 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_BLUETOOTH_HANDSFREEUNIT_AG_CALL_STATE_UPDATE);
1652
1653 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_BLUETOOTH_HOST_STATE_UPDATE);
1654
1655 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_BLUETOOTH_HOST_REQ_DISCOVERABLE);
1656
1657 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_BLUETOOTH_HOST_REQ_ENABLE);
1658
1659 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_BLUETOOTH_HOST_REQ_DISABLE);
1660
1661 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_BLUETOOTH_HOST_SCAN_MODE_UPDATE);
1662
1663 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_BLUETOOTH_HOST_DISCOVERY_STARTED);
1664
1665 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_BLUETOOTH_HOST_DISCOVERY_FINISHED);
1666
1667 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_BLUETOOTH_HOST_NAME_UPDATE);
1668
1669 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_BLUETOOTH_A2DPSINK_CONNECT_STATE_UPDATE);
1670
1671 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_BLUETOOTH_A2DPSINK_PLAYING_STATE_UPDATE);
1672
1673 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_BLUETOOTH_A2DPSINK_AUDIO_STATE_UPDATE);
1674
1675 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_USER_ADDED);
1676
1677 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_USER_REMOVED);
1678
1679 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_VOLUME_REMOVED);
1680
1681 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_VOLUME_UNMOUNTED);
1682
1683 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_VOLUME_MOUNTED);
1684
1685 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_VOLUME_BAD_REMOVAL);
1686
1687 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_VOLUME_EJECT);
1688
1689 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_USER_INFO_UPDATED);
1690
1691 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_DOMAIN_ACCOUNT_STATUS_CHANGED);
1692
1693 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_SCREEN_LOCKED);
1694
1695 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_SCREEN_UNLOCKED);
1696
1697 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_AUDIO_QUALITY_CHANGE);
1698
1699 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_SPECIAL_CODE);
1700
1701 return;
1702 }
1703
IsSystemEvent(std::string & str)1704 bool CommonEventSupport::IsSystemEvent(std::string &str)
1705 {
1706 EVENT_LOGI("enter");
1707
1708 std::vector<std::string>::iterator iter = find(commonEventSupport_.begin(), commonEventSupport_.end(), str);
1709 if (iter != commonEventSupport_.end()) {
1710 return true;
1711 }
1712 return false;
1713 }
1714 } // namespace EventFwk
1715 } // namespace OHOS
1716