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 /**
96 * Indicates the action of a common event that the device is about to enter the force sleep mode.
97 * This common event can only be published by the system.
98 */
99 const std::string CommonEventSupport::COMMON_EVENT_ENTER_FORCE_SLEEP =
100 "usual.event.ENTER_FORCE_SLEEP";
101
102 /**
103 * Indicates the action of a common event that the device exits the force sleep mode.
104 * This common event can only be published by the system.
105 */
106 const std::string CommonEventSupport::COMMON_EVENT_EXIT_FORCE_SLEEP =
107 "usual.event.EXIT_FORCE_SLEEP";
108
109 /**
110 * Indicates the action of a common event that the device is about to enter the hibernate mode.
111 * This common event can only be published by the system.
112 */
113 const std::string CommonEventSupport::COMMON_EVENT_ENTER_HIBERNATE =
114 "usual.event.ENTER_HIBERNATE";
115
116 /**
117 * Indicates the action of a common event that the device exits the hibernate mode.
118 * This common event can only be published by the system.
119 */
120 const std::string CommonEventSupport::COMMON_EVENT_EXIT_HIBERNATE =
121 "usual.event.EXIT_HIBERNATE";
122
123 /**
124 * Indicates the action of a common event that the device is idle and charging,
125 * services can do some business on the background.
126 * This common event can only be published by the system.
127 */
128 const std::string CommonEventSupport::COMMON_EVENT_CHARGE_IDLE_MODE_CHANGED =
129 "usual.event.CHARGE_IDLE_MODE_CHANGED";
130 /**
131 * Indicates the action of a common event that the user unlocks the device.
132 * This common event can only be published by the system.
133 */
134 const std::string CommonEventSupport::COMMON_EVENT_USER_PRESENT = "usual.event.USER_PRESENT";
135
136 /**
137 * Indicates the action of a common event that the system time has changed.
138 * This common event can only be published by the system.
139 */
140 const std::string CommonEventSupport::COMMON_EVENT_TIME_TICK = "usual.event.TIME_TICK";
141
142 /**
143 * Indicates the action of a common event that the system time is set.
144 * This common event can only be published by the system.
145 */
146 const std::string CommonEventSupport::COMMON_EVENT_TIME_CHANGED = "usual.event.TIME_CHANGED";
147
148 /**
149 * Indicates the action of a common event that the system date has changed.
150 * This common event can only be published by the system.
151 */
152 const std::string CommonEventSupport::COMMON_EVENT_DATE_CHANGED = "usual.event.DATE_CHANGED";
153
154 /**
155 * Indicates the action of a common event that the system time zone has changed.
156 * This common event can only be published by the system.
157 */
158 const std::string CommonEventSupport::COMMON_EVENT_TIMEZONE_CHANGED = "usual.event.TIMEZONE_CHANGED";
159
160 /**
161 * Indicates the action of a common event that a user closes a temporary system dialog box.
162 * This common event can only be published by the system.
163 */
164 const std::string CommonEventSupport::COMMON_EVENT_CLOSE_SYSTEM_DIALOGS = "usual.event.CLOSE_SYSTEM_DIALOGS";
165
166 /**
167 * Indicates the action of a common event that bundle scan has finished.
168 * This common event can only be published by the system.
169 */
170 const std::string CommonEventSupport::COMMON_EVENT_BUNDLE_SCAN_FINISHED = "usual.event.BUNDLE_SCAN_FINISHED";
171
172 /**
173 * Indicates the action of a common event that a new application package has been installed on the device.
174 * This common event can only be published by the system.
175 */
176 const std::string CommonEventSupport::COMMON_EVENT_PACKAGE_ADDED = "usual.event.PACKAGE_ADDED";
177
178 /**
179 * This commonEvent means when a new application package start to install on the device.
180 * This is a protected common event that can only be sent by system.
181 */
182 const std::string CommonEventSupport::COMMON_EVENT_PACKAGE_INSTALLATION_STARTED =
183 "usual.event.PACKAGE_INSTALLATION_STARTED";
184
185 /**
186 * This common event means an application package enables or disables a dynamic icon.
187 * This is a protected common event that can only be sent by system.
188 */
189 const std::string CommonEventSupport::COMMON_EVENT_DYNAMIC_ICON_CHANGED =
190 "usual.event.DYNAMIC_ICON_CHANGED";
191
192 /**
193 * Indicates the action of a common event that a new version of an installed application package has replaced
194 * the previous one on the device.
195 * This common event can only be published by the system.
196 */
197 const std::string CommonEventSupport::COMMON_EVENT_PACKAGE_REPLACED = "usual.event.PACKAGE_REPLACED";
198
199 /**
200 * Indicates the action of a common event that a new version of your application package has replaced
201 * the previous one. This common event is sent only to the application that was replaced.
202 * This common event can only be published by the system.
203 */
204 const std::string CommonEventSupport::COMMON_EVENT_MY_PACKAGE_REPLACED = "usual.event.MY_PACKAGE_REPLACED";
205
206 /**
207 * Indicate the action of a common event that an installed application has been uninstalled from the device
208 * with the application data remained.
209 * This common event can only be published by the system.
210 */
211 const std::string CommonEventSupport::COMMON_EVENT_PACKAGE_REMOVED = "usual.event.PACKAGE_REMOVED";
212
213 /**
214 * Indicates the action of a common event that an installed bundle has been uninstalled from the device with the
215 * application data remained.
216 * This common event can only be published by the system.
217 */
218 const std::string CommonEventSupport::COMMON_EVENT_BUNDLE_REMOVED = "usual.event.BUNDLE_REMOVED";
219
220 /**
221 * Indicates the action of a common event that an installed application, including both the application data and
222 * code, have been completely uninstalled from the device.
223 * This common event can only be published by the system.
224 */
225 const std::string CommonEventSupport::COMMON_EVENT_PACKAGE_FULLY_REMOVED = "usual.event.PACKAGE_FULLY_REMOVED";
226
227 /**
228 * Indicates the action of a common event that an application package has been changed
229 * (for example, a component in the package has been enabled or disabled).
230 * This common event can only be published by the system.
231 */
232 const std::string CommonEventSupport::COMMON_EVENT_PACKAGE_CHANGED = "usual.event.PACKAGE_CHANGED";
233
234 /**
235 * Indicates the action of a common event that the user has restarted the application package and killed all its
236 * processes.
237 * This common event can only be published by the system.
238 */
239 const std::string CommonEventSupport::COMMON_EVENT_PACKAGE_RESTARTED = "usual.event.PACKAGE_RESTARTED";
240
241 /**
242 * Indicates the action of a common event that the user has cleared the application package data.
243 * This common event is published after COMMON_EVENT_PACKAGE_RESTARTED is triggered and the data has been cleared.
244 * This common event can only be published by the system.
245 */
246 const std::string CommonEventSupport::COMMON_EVENT_PACKAGE_DATA_CLEARED = "usual.event.PACKAGE_DATA_CLEARED";
247
248 /**
249 * Indicates the action of a common event that the user has cleared the application package cache.
250 * This common event can only be published by the system.
251 */
252 const std::string CommonEventSupport::COMMON_EVENT_PACKAGE_CACHE_CLEARED = "usual.event.PACKAGE_CACHE_CLEARED";
253
254 /**
255 * Indicates the action of a common event that application packages have been suspended.
256 * This common event can only be published by the system.
257 */
258 const std::string CommonEventSupport::COMMON_EVENT_PACKAGES_SUSPENDED = "usual.event.PACKAGES_SUSPENDED";
259
260 /**
261 * Indicates the action of a common event that application packages have not been suspended.
262 * This common event can only be published by the system.
263 */
264 const std::string CommonEventSupport::COMMON_EVENT_PACKAGES_UNSUSPENDED = "usual.event.PACKAGES_UNSUSPENDED";
265
266 /**
267 * Indicates the action of a common event that an application package has been suspended.
268 * This common event can only be published by the system.
269 */
270 const std::string CommonEventSupport::COMMON_EVENT_MY_PACKAGE_SUSPENDED = "usual.event.MY_PACKAGE_SUSPENDED";
271
272 /**
273 * Indicates the action of a common event that an application package has not been suspended.
274 * This common event can only be published by the system.
275 */
276 const std::string CommonEventSupport::COMMON_EVENT_MY_PACKAGE_UNSUSPENDED = "usual.event.MY_PACKAGE_UNSUSPENDED";
277
278 /**
279 * Indicates the action of a common event that a user ID has been removed from the system.
280 * This common event can only be published by the system.
281 */
282 const std::string CommonEventSupport::COMMON_EVENT_UID_REMOVED = "usual.event.UID_REMOVED";
283
284 /**
285 * Indicates the action of a common event that an installed application is started for the first time.
286 * This common event can only be published by the system.
287 */
288 const std::string CommonEventSupport::COMMON_EVENT_PACKAGE_FIRST_LAUNCH = "usual.event.PACKAGE_FIRST_LAUNCH";
289
290 /**
291 * Indicates the action of a common event that an application requires system verification.
292 * This common event can only be published by the system.
293 */
294 const std::string CommonEventSupport::COMMON_EVENT_PACKAGE_NEEDS_VERIFICATION =
295 "usual.event.PACKAGE_NEEDS_VERIFICATION";
296 /**
297 * Indicates the action of a common event that an application has been verified by the system.
298 * This common event can only be published by the system.
299 */
300 const std::string CommonEventSupport::COMMON_EVENT_PACKAGE_VERIFIED = "usual.event.PACKAGE_VERIFIED";
301
302 /**
303 * Indicates the action of a common event that applications installed on the external storage become
304 * available for the system.
305 * This common event can only be published by the system.
306 */
307 const std::string CommonEventSupport::COMMON_EVENT_EXTERNAL_APPLICATIONS_AVAILABLE =
308 "usual.event.EXTERNAL_APPLICATIONS_AVAILABLE";
309
310 /**
311 * Indicates the action of a common event that applications installed on the external storage become unavailable for
312 * the system.
313 * This common event can only be published by the system.
314 */
315 const std::string CommonEventSupport::COMMON_EVENT_EXTERNAL_APPLICATIONS_UNAVAILABLE =
316 "usual.event.EXTERNAL_APPLICATIONS_UNAVAILABLE";
317
318 /**
319 * Indicates the action of a common event that the device state (for example, orientation and locale) has changed.
320 * This common event can only be published by the system.
321 */
322 const std::string CommonEventSupport::COMMON_EVENT_CONFIGURATION_CHANGED = "usual.event.CONFIGURATION_CHANGED";
323
324 /**
325 * Indicates the action of a common event that the device locale has changed.
326 * This common event can only be published by the system.
327 */
328 const std::string CommonEventSupport::COMMON_EVENT_LOCALE_CHANGED = "usual.event.LOCALE_CHANGED";
329
330 /**
331 * Indicates the action of a common event that the device storage is insufficient.
332 */
333 const std::string CommonEventSupport::COMMON_EVENT_MANAGE_PACKAGE_STORAGE = "usual.event.MANAGE_PACKAGE_STORAGE";
334
335 /**
336 * Indicates the action of a common event that one sandbox package is installed.
337 * This common event can only be published by the system.
338 */
339 const std::string CommonEventSupport::COMMON_EVENT_SANDBOX_PACKAGE_ADDED = "usual.event.SANDBOX_PACKAGE_ADDED";
340
341 /**
342 * Indicates the action of a common event that one sandbox package is uninstalled.
343 * This common event can only be published by the system.
344 */
345 const std::string CommonEventSupport::COMMON_EVENT_SANDBOX_PACKAGE_REMOVED = "usual.event.SANDBOX_PACKAGE_REMOVED";
346
347 /**
348 * Indicates the action of a common event that the system is in driving mode.
349 * This is a protected common event, which can be sent only by the system.
350 */
351 const std::string CommonEventSupport::COMMON_EVENT_DRIVE_MODE = "common.event.DRIVE_MODE";
352
353 /**
354 * Indicates the action of a common event that the system is in home mode.
355 * This is a protected common event, which can be sent only by the system.
356 */
357 const std::string CommonEventSupport::COMMON_EVENT_HOME_MODE = "common.event.HOME_MODE";
358
359 /**
360 * Indicates the action of a common event that the system is in office mode.
361 * This is a protected common event, which can be sent only by the system.
362 */
363 const std::string CommonEventSupport::COMMON_EVENT_OFFICE_MODE = "common.event.OFFICE_MODE";
364
365 /**
366 * Indicates the action of a common event that the window mode is split screen.
367 * This is a protected common event, which can be sent only by the system.
368 */
369 const std::string CommonEventSupport::COMMON_EVENT_SPLIT_SCREEN = "common.event.SPLIT_SCREEN";
370
371 /**
372 * Indicates the action of a common event that the user has been started.
373 */
374 const std::string CommonEventSupport::COMMON_EVENT_USER_STARTED = "usual.event.USER_STARTED";
375
376 /**
377 * Indicates the action of a common event that the user has been brought to the background.
378 */
379 const std::string CommonEventSupport::COMMON_EVENT_USER_BACKGROUND = "usual.event.USER_BACKGROUND";
380
381 /**
382 * Indicates the action of a common event that the user has been brought to the foreground.
383 */
384 const std::string CommonEventSupport::COMMON_EVENT_USER_FOREGROUND = "usual.event.USER_FOREGROUND";
385
386 /**
387 * Indicates the action of a common event that a user switch is happening.
388 * To subscribe to this common event, your application must have the ohos.permission.MANAGE_LOCAL_ACCOUNTS permission.
389 */
390 const std::string CommonEventSupport::COMMON_EVENT_USER_SWITCHED = "usual.event.USER_SWITCHED";
391
392 /**
393 * Indicates the action of a common event that the user is going to be started.
394 * To subscribe to this common event, your application must have the ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
395 * permission.
396 */
397 const std::string CommonEventSupport::COMMON_EVENT_USER_STARTING = "usual.event.USER_STARTING";
398
399 /**
400 * Indicates the action of a common event that the credential-encrypted storage has become unlocked
401 * for the current user when the device is unlocked after being restarted.
402 */
403 const std::string CommonEventSupport::COMMON_EVENT_USER_UNLOCKED = "usual.event.USER_UNLOCKED";
404
405 /**
406 * Indicates the action of a common event that the user is going to be stopped.
407 * To subscribe to this common event, your application must have the ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
408 * permission.
409 */
410 const std::string CommonEventSupport::COMMON_EVENT_USER_STOPPING = "usual.event.USER_STOPPING";
411
412 /**
413 * Indicates the action of a common event that the user has been stopped.
414 */
415 const std::string CommonEventSupport::COMMON_EVENT_USER_STOPPED = "usual.event.USER_STOPPED";
416
417 /**
418 * Indicates the action of a common event about a login of a user with account ID.
419 * This is a protected common event, which can be sent only by the system.
420 */
421 const std::string CommonEventSupport::COMMON_EVENT_HWID_LOGIN = "common.event.HWID_LOGIN";
422
423 /**
424 * Indicates the action of a common event about a logout of a user with account ID.
425 * This is a protected common event, which can be sent only by the system.
426 */
427 const std::string CommonEventSupport::COMMON_EVENT_HWID_LOGOUT = "common.event.HWID_LOGOUT";
428
429 /**
430 * Indicates the action of a common event that the account ID is invalid.
431 * This is a protected common event, which can be sent only by the system.
432 */
433 const std::string CommonEventSupport::COMMON_EVENT_HWID_TOKEN_INVALID = "common.event.HWID_TOKEN_INVALID";
434
435 /**
436 * Indicates the action of a common event about a logoff of a account ID.
437 * This is a protected common event, which can be sent only by the system.
438 */
439 const std::string CommonEventSupport::COMMON_EVENT_HWID_LOGOFF = "common.event.HWID_LOGOFF";
440
441 /**
442 * Indicates the action of a common event about the Wi-Fi state, such as enabled and disabled.
443 */
444 const std::string CommonEventSupport::COMMON_EVENT_WIFI_POWER_STATE = "usual.event.wifi.POWER_STATE";
445
446 /**
447 * Indicates the action of a common event that the Wi-Fi access point has been scanned and proven to be available.
448 * To subscribe to this common event, your application must have the ohos.permission.LOCATION permission.
449 */
450 const std::string CommonEventSupport::COMMON_EVENT_WIFI_SCAN_FINISHED = "usual.event.wifi.SCAN_FINISHED";
451
452 /**
453 * Indicates the action of a common event that the Wi-Fi signal strength (RSSI) has changed.
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_RSSI_VALUE = "usual.event.wifi.RSSI_VALUE";
457
458 /**
459 * Indicates the action of a common event that the Wi-Fi connection state has changed.
460 */
461 const std::string CommonEventSupport::COMMON_EVENT_WIFI_CONN_STATE = "usual.event.wifi.CONN_STATE";
462
463 /**
464 * Indicates the action of a common event about the Wi-Fi hotspot state, such as enabled or disabled.
465 */
466 const std::string CommonEventSupport::COMMON_EVENT_WIFI_HOTSPOT_STATE = "usual.event.wifi.HOTSPOT_STATE";
467
468 /**
469 * Indicates the action of a common event that a client has joined the Wi-Fi hotspot of the current device. You can
470 * register this common event to listen for information about the clients joining your hotspot.
471 * To subscribe to this common event, your application must have the ohos.permission.GET_WIFI_INFO permission.
472 */
473 const std::string CommonEventSupport::COMMON_EVENT_WIFI_AP_STA_JOIN = "usual.event.wifi.WIFI_HS_STA_JOIN";
474
475 /**
476 * Indicates the action of a common event that a client has dropped connection to the Wi-Fi hotspot of the current
477 * device. You can register this common event to listen for information about the clients leaving your hotspot.
478 * To subscribe to this common event, your application must have the ohos.permission.GET_WIFI_INFO permission.
479 */
480 const std::string CommonEventSupport::COMMON_EVENT_WIFI_AP_STA_LEAVE = "usual.event.wifi.WIFI_HS_STA_LEAVE";
481
482 /**
483 * Indicates the action of a common event that the state of MPLink (an enhanced Wi-Fi feature) has changed.
484 * To subscribe to this common event, your application must have the ohos.permission.MPLINK_CHANGE_STATE permission.
485 */
486 const std::string CommonEventSupport::COMMON_EVENT_WIFI_MPLINK_STATE_CHANGE = "usual.event.wifi.mplink.STATE_CHANGE";
487
488 /**
489 * Indicates the action of a common event that the Wi-Fi P2P connection state has changed.
490 * To subscribe to this common event, your application must have the ohos.permission.GET_WIFI_INFO and
491 * ohos.permission.LOCATION permissions.
492 */
493 const std::string CommonEventSupport::COMMON_EVENT_WIFI_P2P_CONN_STATE = "usual.event.wifi.p2p.CONN_STATE_CHANGE";
494
495 /**
496 * Indicates the action of a common event about the Wi-Fi P2P state, such as enabled and disabled.
497 * To subscribe to this common event, your application must have the ohos.permission.GET_WIFI_INFO permission.
498 */
499 const std::string CommonEventSupport::COMMON_EVENT_WIFI_P2P_STATE_CHANGED = "usual.event.wifi.p2p.STATE_CHANGE";
500
501 /**
502 * Indicates that the Wi-Fi P2P peers state change.
503 * To subscribe to this common event, your application must have the ohos.permission.GET_WIFI_INFO permission.
504 */
505 const std::string CommonEventSupport::COMMON_EVENT_WIFI_P2P_PEERS_STATE_CHANGED = "usual.event.wifi.p2p.DEVICES_CHANGE";
506
507 /**
508 * Indicates that the Wi-Fi P2P discovery state change.
509 * To subscribe to this common event, your application must have the ohos.permission.GET_WIFI_INFO permission.
510 */
511 const std::string CommonEventSupport::COMMON_EVENT_WIFI_P2P_PEERS_DISCOVERY_STATE_CHANGED =
512 "usual.event.wifi.p2p.PEER_DISCOVERY_STATE_CHANGE";
513
514 /**
515 * Indicates that the Wi-Fi P2P current device state change.
516 * To subscribe to this common event, your application must have the ohos.permission.GET_WIFI_INFO permission.
517 */
518 const std::string CommonEventSupport::COMMON_EVENT_WIFI_P2P_CURRENT_DEVICE_STATE_CHANGED =
519 "usual.event.wifi.p2p.CURRENT_DEVICE_CHANGE";
520
521 /**
522 * Indicates that the Wi-Fi P2P group info is changed.
523 * To subscribe to this common event, your application must have the ohos.permission.GET_WIFI_INFO permission.
524 */
525 const std::string CommonEventSupport::COMMON_EVENT_WIFI_P2P_GROUP_STATE_CHANGED =
526 "usual.event.wifi.p2p.GROUP_STATE_CHANGED";
527
528 /**
529 * Indicates that network traffic statistics have been updated.
530 */
531 const std::string CommonEventSupport::COMMON_EVENT_NETMANAGER_NETSTATES_UPDATED =
532 "usual.event.netmanager.NETSTATES_UPDATED";
533
534 /**
535 * Indicates that the network traffic has exceeded the limit.
536 */
537 const std::string CommonEventSupport::COMMON_EVENT_NETMANAGER_NETSTATES_LIMITED =
538 "usual.event.netmanager.NETSTATES_LIMITED";
539
540 /**
541 * Indicates the action of a common event about the connection state of Bluetooth handsfree communication.
542 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
543 */
544 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_HANDSFREE_AG_CONNECT_STATE_UPDATE =
545 "usual.event.bluetooth.handsfree.ag.CONNECT_STATE_UPDATE";
546
547 /**
548 * Indicates the action of a common event that the device connected to the Bluetooth handsfree is active.
549 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
550 */
551 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_HANDSFREE_AG_CURRENT_DEVICE_UPDATE =
552 "usual.event.bluetooth.handsfree.ag.CURRENT_DEVICE_UPDATE";
553
554 /**
555 * Indicates the action of a common event that the connection state of Bluetooth A2DP has changed.
556 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
557 */
558 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_HANDSFREE_AG_AUDIO_STATE_UPDATE =
559 "usual.event.bluetooth.handsfree.ag.AUDIO_STATE_UPDATE";
560
561 /**
562 * Indicates the action of a common event about the connection state of Bluetooth A2DP.
563 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
564 */
565 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_A2DPSOURCE_CONNECT_STATE_UPDATE =
566 "usual.event.bluetooth.a2dpsource.CONNECT_STATE_UPDATE";
567
568 /**
569 * Indicates the action of a common event that the device connected using Bluetooth A2DP is active.
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_A2DPSOURCE_CURRENT_DEVICE_UPDATE =
573 "usual.event.bluetooth.a2dpsource.CURRENT_DEVICE_UPDATE";
574
575 /**
576 * Indicates the action of a common event that the playing state of Bluetooth A2DP has changed.
577 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
578 */
579 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_A2DPSOURCE_PLAYING_STATE_UPDATE =
580 "usual.event.bluetooth.a2dpsource.PLAYING_STATE_UPDATE";
581
582 /**
583 * Indicates the action of a common event that the AVRCP connection state of Bluetooth A2DP has changed.
584 */
585 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_A2DPSOURCE_AVRCP_CONNECT_STATE_UPDATE =
586 "usual.event.bluetooth.a2dpsource.AVRCP_CONNECT_STATE_UPDATE";
587
588 /**
589 * Indicates the action of a common event that the audio codec state of Bluetooth A2DP has changed.
590 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
591 */
592 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_A2DPSOURCE_CODEC_VALUE_UPDATE =
593 "usual.event.bluetooth.a2dpsource.CODEC_VALUE_UPDATE";
594
595 /**
596 * Indicates the action of a common event that a remote Bluetooth device has been discovered.
597 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH and
598 * ohos.permission.LOCATION permissions.
599 */
600 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_DISCOVERED =
601 "usual.event.bluetooth.remotedevice.DISCOVERED";
602
603 /**
604 * Indicates the action of a common event that the Bluetooth class of a remote Bluetooth device has changed.
605 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
606 */
607 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_CLASS_VALUE_UPDATE =
608 "usual.event.bluetooth.remotedevice.CLASS_VALUE_UPDATE";
609
610 /**
611 * Indicates the action of a common event that a low level (ACL) connection has been established with a remote
612 * Bluetooth device.
613 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
614 */
615 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_ACL_CONNECTED =
616 "usual.event.bluetooth.remotedevice.ACL_CONNECTED";
617
618 /**
619 * Indicates the action of a common event that a low level (ACL) connection has been disconnected from a remote
620 * Bluetooth device.
621 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
622 */
623 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_ACL_DISCONNECTED =
624 "usual.event.bluetooth.remotedevice.ACL_DISCONNECTED";
625
626 /**
627 * Indicates the action of a common event that the friendly name of a remote Bluetooth device has been retrieved for
628 * the first time or has been changed since the last retrieval.
629 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
630 */
631 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_NAME_UPDATE =
632 "usual.event.bluetooth.remotedevice.NAME_UPDATE";
633
634 /**
635 * Indicates the action of a common event that the connection state of a remote Bluetooth device has changed.
636 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
637 */
638 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_PAIR_STATE =
639 "usual.event.bluetooth.remotedevice.PAIR_STATE";
640
641 /**
642 * Indicates the action of a common event that the battery level of a remote Bluetooth device has been retrieved
643 * for the first time or has been changed since the last retrieval.
644 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
645 */
646 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_BATTERY_VALUE_UPDATE =
647 "usual.event.bluetooth.remotedevice.BATTERY_VALUE_UPDATE";
648
649 /**
650 * Indicates the action of a common event about the SDP state of a remote Bluetooth device.
651 */
652 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_SDP_RESULT =
653 "usual.event.bluetooth.remotedevice.SDP_RESULT";
654
655 /**
656 * Indicates the action of a common event about the UUID connection state of a remote Bluetooth device.
657 * To subscribe to this common event, your application must have the ohos.permission.DISCOVER_BLUETOOTH permission.
658 */
659 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_UUID_VALUE =
660 "usual.event.bluetooth.remotedevice.UUID_VALUE";
661
662 /**
663 * Indicates the action of a common event about the pairing request from a remote Bluetooth device.
664 * To subscribe to this common event, your application must have the ohos.permission.DISCOVER_BLUETOOTH permission.
665 */
666 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_PAIRING_REQ =
667 "usual.event.bluetooth.remotedevice.PAIRING_REQ";
668
669 /**
670 * Indicates the action of a common event that Bluetooth pairing is canceled.
671 */
672 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_PAIRING_CANCEL =
673 "usual.event.bluetooth.remotedevice.PAIRING_CANCEL";
674
675 /**
676 * Indicates the action of a common event about the connection request from a remote Bluetooth device.
677 */
678 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_CONNECT_REQ =
679 "usual.event.bluetooth.remotedevice.CONNECT_REQ";
680
681 /**
682 * Indicates the action of a common event about the response to the connection request from a remote Bluetooth
683 * device.
684 */
685 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_CONNECT_REPLY =
686 "usual.event.bluetooth.remotedevice.CONNECT_REPLY";
687
688 /**
689 * Indicates the action of a common event that the connection to a remote Bluetooth device has been canceled.
690 */
691 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_CONNECT_CANCEL =
692 "usual.event.bluetooth.remotedevice.CONNECT_CANCEL";
693
694 /**
695 * Indicates the action of a common event that the connection state of a Bluetooth handsfree has changed.
696 */
697 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_HANDSFREEUNIT_CONNECT_STATE_UPDATE =
698 "usual.event.bluetooth.handsfreeunit.CONNECT_STATE_UPDATE";
699
700 /**
701 * Indicates the action of a common event that the audio state of a Bluetooth handsfree has changed.
702 */
703 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_HANDSFREEUNIT_AUDIO_STATE_UPDATE =
704 "usual.event.bluetooth.handsfreeunit.AUDIO_STATE_UPDATE";
705
706 /**
707 * Indicates the action of a common event that the audio gateway state of a Bluetooth handsfree has changed.
708 */
709 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_HANDSFREEUNIT_AG_COMMON_EVENT =
710 "usual.event.bluetooth.handsfreeunit.AG_COMMON_EVENT";
711
712 /**
713 * Indicates the action of a common event that the calling state of a Bluetooth handsfree has changed.
714 */
715 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_HANDSFREEUNIT_AG_CALL_STATE_UPDATE =
716 "usual.event.bluetooth.handsfreeunit.AG_CALL_STATE_UPDATE";
717
718 /**
719 * Indicates the action of a common event that the state of a Bluetooth adapter has been changed, for example,
720 * Bluetooth has been turned on or off.
721 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
722 */
723 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_HOST_STATE_UPDATE =
724 "usual.event.bluetooth.host.STATE_UPDATE";
725
726 /**
727 * Indicates the action of a common event about the requests for the user to allow Bluetooth to be scanned.
728 */
729 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_HOST_REQ_DISCOVERABLE =
730 "usual.event.bluetooth.host.REQ_DISCOVERABLE";
731
732 /**
733 * Indicates the action of a common event about the requests for the user to turn on Bluetooth.
734 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
735 */
736 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_HOST_REQ_ENABLE = "usual.event.bluetooth.host.REQ_ENABLE";
737
738 /**
739 * Indicates the action of a common event about the requests for the user to turn off Bluetooth.
740 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
741 */
742 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_HOST_REQ_DISABLE =
743 "usual.event.bluetooth.host.REQ_DISABLE";
744
745 /**
746 * Indicates the action of a common event that the Bluetooth scanning mode of a device has changed.
747 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
748 */
749 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_HOST_SCAN_MODE_UPDATE =
750 "usual.event.bluetooth.host.SCAN_MODE_UPDATE";
751
752 /**
753 * Indicates the action of a common event that the Bluetooth scanning has been started on the device.
754 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
755 */
756 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_HOST_DISCOVERY_STARTED =
757 "usual.event.bluetooth.host.DISCOVERY_STARTED";
758
759 /**
760 * Indicates the action of a common event that the Bluetooth scanning is finished on the device.
761 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
762 */
763 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_HOST_DISCOVERY_FINISHED =
764 "usual.event.bluetooth.host.DISCOVERY_FINISHED";
765
766 /**
767 * Indicates the action of a common event that the Bluetooth adapter name of the device has changed.
768 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
769 */
770 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_HOST_NAME_UPDATE =
771 "usual.event.bluetooth.host.NAME_UPDATE";
772
773 /**
774 * Indicates the action of a common event that the connection state of Bluetooth A2DP Sink has changed.
775 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
776 */
777 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_A2DPSINK_CONNECT_STATE_UPDATE =
778 "usual.event.bluetooth.a2dpsink.CONNECT_STATE_UPDATE";
779
780 /**
781 * Indicates the action of a common event that the playing state of Bluetooth A2DP Sink has changed.
782 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
783 */
784 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_A2DPSINK_PLAYING_STATE_UPDATE =
785 "usual.event.bluetooth.a2dpsink.PLAYING_STATE_UPDATE";
786
787 /**
788 * Indicates the action of a common event that the audio state of Bluetooth A2DP Sink has changed.
789 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
790 */
791 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_A2DPSINK_AUDIO_STATE_UPDATE =
792 "usual.event.bluetooth.a2dpsink.AUDIO_STATE_UPDATE";
793
794 /**
795 * Indicates the status of the Bluetooth device connect status has been changed.
796 */
797 const std::string CommonEventSupport::COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_CONNECT_STATUS_VALUE =
798 "usual.event.bluetooth.remotedevice.CONNECT_STATUS_VALUE";
799
800 /**
801 * Indicates the action of a common event that the state of the device NFC adapter has changed.
802 * This is a protected common event, which can be sent only by the system.
803 */
804 const std::string CommonEventSupport::COMMON_EVENT_NFC_ACTION_ADAPTER_STATE_CHANGED =
805 "usual.event.nfc.action.ADAPTER_STATE_CHANGED";
806
807 /**
808 * Indicates the action of a common event that the NFC RF field is detected to be in the enabled state.
809 * To subscribe to this common event, your application must have the ohos.permission.MANAGE_SECURE_SETTINGS
810 * permission.
811 * This is a protected common event, which can be sent only by the system.
812 */
813 const std::string CommonEventSupport::COMMON_EVENT_NFC_ACTION_RF_FIELD_ON_DETECTED =
814 "usual.event.nfc.action.RF_FIELD_ON_DETECTED";
815
816 /**
817 * Indicates the action of a common event that the NFC RF field is detected to be in the disabled state.
818 * To subscribe to this common event, your application must have the ohos.permission.MANAGE_SECURE_SETTINGS
819 * permission.
820 * This is a protected common event, which can be sent only by the system.
821 */
822 const std::string CommonEventSupport::COMMON_EVENT_NFC_ACTION_RF_FIELD_OFF_DETECTED =
823 "usual.event.nfc.action.RF_FIELD_OFF_DETECTED";
824
825 /**
826 * Indicates the action of a common event that the system stops charging the battery.
827 * This is a protected common event, which can be sent only by the system.
828 */
829 const std::string CommonEventSupport::COMMON_EVENT_DISCHARGING = "usual.event.DISCHARGING";
830
831 /**
832 * Indicates the action of a common event that the system starts charging the battery.
833 * This is a protected common event, which can be sent only by the system.
834 */
835 const std::string CommonEventSupport::COMMON_EVENT_CHARGING = "usual.event.CHARGING";
836
837 /**
838 * Indicates the action of a common event that a charge type has been updated.
839 * This is a protected common event, which can be sent only by the system.
840 */
841 const std::string CommonEventSupport::COMMON_EVENT_CHARGE_TYPE_CHANGED = "usual.event.CHARGE_TYPE_CHANGED";
842
843 /**
844 * Indicates the action of a common event that the system idle mode has changed.
845 * This is a protected common event, which can be sent only by the system.
846 */
847 const std::string CommonEventSupport::COMMON_EVENT_DEVICE_IDLE_MODE_CHANGED = "usual.event.DEVICE_IDLE_MODE_CHANGED";
848
849 /**
850 * Indicates the action of a common event that the list of exempt applications is updated in the idle mode.
851 * This is a protected common event, which can be sent only by the system.
852 */
853 const std::string CommonEventSupport::COMMON_EVENT_DEVICE_IDLE_EXEMPTION_LIST_UPDATED =
854 "usual.event.DEVICE_IDLE_EXEMPTION_LIST_UPDATED";
855
856 /**
857 * Indicates the action of a common event that the power save mode of the system has changed.
858 * This is a protected common event, which can be sent only by the system.
859 */
860 const std::string CommonEventSupport::COMMON_EVENT_POWER_SAVE_MODE_CHANGED = "usual.event.POWER_SAVE_MODE_CHANGED";
861
862 /**
863 * Indicates the action of a common event that a user has been added to the system.
864 * To subscribe to this common event, your application must have the ohos.permission.MANAGE_LOCAL_ACCOUNTS permission.
865 */
866 const std::string CommonEventSupport::COMMON_EVENT_USER_ADDED = "usual.event.USER_ADDED";
867 /**
868 * Indicates the action of a common event that a user has been removed from the system.
869 * To subscribe to this common event, your application must have the ohos.permission.MANAGE_LOCAL_ACCOUNTS permission.
870 */
871 const std::string CommonEventSupport::COMMON_EVENT_USER_REMOVED = "usual.event.USER_REMOVED";
872
873 /**
874 * Indicates the action of a common event that an ability has been added.
875 * To subscribe to this common event, your application must have the ohos.permission.LISTEN_BUNDLE_CHANGE
876 * permission.
877 * This is a protected common event, which can be sent only by the system.
878 */
879 const std::string CommonEventSupport::COMMON_EVENT_ABILITY_ADDED = "common.event.ABILITY_ADDED";
880
881 /**
882 * Indicates the action of a common event that an ability has been removed.
883 * To subscribe to this common event, your application must have the ohos.permission.LISTEN_BUNDLE_CHANGE
884 * permission.
885 * This is a protected common event, which can be sent only by the system.
886 */
887 const std::string CommonEventSupport::COMMON_EVENT_ABILITY_REMOVED = "common.event.ABILITY_REMOVED";
888
889 /**
890 * Indicates the action of a common event that an ability has been updated.
891 * To subscribe to this common event, your application must have the ohos.permission.LISTEN_BUNDLE_CHANGE
892 * permission.
893 * This is a protected common event, which can be sent only by the system.
894 */
895 const std::string CommonEventSupport::COMMON_EVENT_ABILITY_UPDATED = "common.event.ABILITY_UPDATED";
896
897 /**
898 * Indicates the action of a common event that the location mode of the system has changed.
899 * This is a protected common event, which can be sent only by the system.
900 */
901 const std::string CommonEventSupport::COMMON_EVENT_LOCATION_MODE_STATE_CHANGED =
902 "usual.event.location.MODE_STATE_CHANGED";
903
904 /**
905 * Indicates the action of a common event that the in-vehicle infotainment (IVI) system of a vehicle is sleeping.
906 * This is a protected common event, which can be sent only by the system.
907 */
908 const std::string CommonEventSupport::COMMON_EVENT_IVI_SLEEP = "common.event.IVI_SLEEP";
909
910 /**
911 * The ivi is slept and notify the app stop playing.
912 * This is a protected common event that can only be sent by system.
913 */
914 const std::string CommonEventSupport::COMMON_EVENT_IVI_PAUSE = "common.event.IVI_PAUSE";
915
916 /**
917 * Indicates the action of a common event that a third-party application is instructed to pause the current work.
918 * This is a protected common event, which can be sent only by the system.
919 */
920 const std::string CommonEventSupport::COMMON_EVENT_IVI_STANDBY = "common.event.IVI_STANDBY";
921
922 /**
923 * Indicates the action of a common event that a third-party application is instructed to save its last mode.
924 * This is a protected common event, which can be sent only by the system.
925 */
926 const std::string CommonEventSupport::COMMON_EVENT_IVI_LASTMODE_SAVE = "common.event.IVI_LASTMODE_SAVE";
927
928 /**
929 * Indicates the action of a common event that the voltage of the vehicle power system is abnormal.
930 * This is a protected common event, which can be sent only by the system.
931 */
932 const std::string CommonEventSupport::COMMON_EVENT_IVI_VOLTAGE_ABNORMAL = "common.event.IVI_VOLTAGE_ABNORMAL";
933
934 /**
935 * The ivi temperature is too high.
936 * This is a protected common event that can only be sent by system.
937 * This common event will be delete later, please use COMMON_EVENT_IVI_TEMPERATURE_ABNORMAL.
938 */
939 const std::string CommonEventSupport::COMMON_EVENT_IVI_HIGH_TEMPERATURE = "common.event.IVI_HIGH_TEMPERATURE";
940
941 /**
942 * The ivi temperature is extreme high.
943 * This is a protected common event that can only be sent by system.
944 * This common event will be delete later, please use COMMON_EVENT_IVI_TEMPERATURE_ABNORMAL.
945 */
946 const std::string CommonEventSupport::COMMON_EVENT_IVI_EXTREME_TEMPERATURE = "common.event.IVI_EXTREME_TEMPERATURE";
947
948 /**
949 * Indicates the action of a common event that the in-vehicle system has an extreme temperature.
950 * This is a protected common event, which can be sent only by the system.
951 */
952 const std::string CommonEventSupport::COMMON_EVENT_IVI_TEMPERATURE_ABNORMAL = "common.event.IVI_TEMPERATURE_ABNORMAL";
953
954 /**
955 * Indicates the action of a common event that the voltage of the vehicle power system is restored to normal.
956 * This is a protected common event, which can be sent only by the system.
957 */
958 const std::string CommonEventSupport::COMMON_EVENT_IVI_VOLTAGE_RECOVERY = "common.event.IVI_VOLTAGE_RECOVERY";
959
960 /**
961 * Indicates the action of a common event that the temperature of the in-vehicle system is restored to normal.
962 * This is a protected common event, which can be sent only by the system.
963 */
964 const std::string CommonEventSupport::COMMON_EVENT_IVI_TEMPERATURE_RECOVERY = "common.event.IVI_TEMPERATURE_RECOVERY";
965
966 /**
967 * Indicates the action of a common event that the battery service is active.
968 * This is a protected common event, which can be sent only by the system.
969 */
970 const std::string CommonEventSupport::COMMON_EVENT_IVI_ACTIVE = "common.event.IVI_ACTIVE";
971
972 /**
973 * The usb state changed.
974 * This is a protected common event that can only be sent by system.
975 */
976 const std::string CommonEventSupport::COMMON_EVENT_USB_STATE = "usual.event.hardware.usb.action.USB_STATE";
977
978 /**
979 * The usb port changed.
980 * This is a protected common event that can only be sent by system.
981 */
982 const std::string CommonEventSupport::COMMON_EVENT_USB_PORT_CHANGED =
983 "usual.event.hardware.usb.action.USB_PORT_CHANGED";
984
985 /**
986 * Indicates the action of a common event that a USB device has been attached when the user device functions as a USB
987 * host.
988 * This is a protected common event, which can be sent only by the system.
989 */
990 const std::string CommonEventSupport::COMMON_EVENT_USB_DEVICE_ATTACHED =
991 "usual.event.hardware.usb.action.USB_DEVICE_ATTACHED";
992
993 /**
994 * Indicates the action of a common event that a USB device has been detached when the user device functions as a USB
995 * host.
996 * This is a protected common event, which can be sent only by the system.
997 */
998 const std::string CommonEventSupport::COMMON_EVENT_USB_DEVICE_DETACHED =
999 "usual.event.hardware.usb.action.USB_DEVICE_DETACHED";
1000
1001 /**
1002 * Indicates the action of a common event that a USB accessory has been attached.
1003 * This is a protected common event, which can be sent only by the system.
1004 */
1005 const std::string CommonEventSupport::COMMON_EVENT_USB_ACCESSORY_ATTACHED =
1006 "usual.event.hardware.usb.action.USB_ACCESSORY_ATTACHED";
1007
1008 /**
1009 * Indicates the action of a common event that a USB accessory has been detached.
1010 * This is a protected common event, which can be sent only by the system.
1011 */
1012 const std::string CommonEventSupport::COMMON_EVENT_USB_ACCESSORY_DETACHED =
1013 "usual.event.hardware.usb.action.USB_ACCESSORY_DETACHED";
1014
1015 /**
1016 * The storage space is low.
1017 * This is a protected common event that can only be sent by system.
1018 */
1019 const std::string CommonEventSupport::COMMON_EVENT_DEVICE_STORAGE_LOW = "usual.event.DEVICE_STORAGE_LOW";
1020
1021 /**
1022 * The storage space is normal.
1023 * This is a protected common event that can only be sent by system.
1024 */
1025 const std::string CommonEventSupport::COMMON_EVENT_DEVICE_STORAGE_OK = "usual.event.DEVICE_STORAGE_OK";
1026
1027 /**
1028 * The storage space is full.
1029 * This is a protected common event that can only be sent by system.
1030 */
1031 const std::string CommonEventSupport::COMMON_EVENT_DEVICE_STORAGE_FULL = "usual.event.DEVICE_STORAGE_FULL";
1032
1033 /**
1034 * The network connection was changed.
1035 * This is a protected common event that can only be sent by system.
1036 */
1037 const std::string CommonEventSupport::COMMON_EVENT_CONNECTIVITY_CHANGE = "usual.event.CONNECTIVITY_CHANGE";
1038
1039 /**
1040 * The global http proxy was changed.
1041 * This is a protected common event that can only be sent by system.
1042 */
1043 const std::string CommonEventSupport::COMMON_EVENT_HTTP_PROXY_CHANGE = "usual.event.HTTP_PROXY_CHANGE";
1044
1045 /**
1046 * Indicates the action of a common event that an external storage device was removed.
1047 * To subscribe to this common event, your application must have the ohos.permission.WRITE_USER_STORAGE or
1048 * ohos.permission.STORAGE_MANAGER permission.
1049 * This common event can be published only by system applications.
1050 */
1051 const std::string CommonEventSupport::COMMON_EVENT_DISK_REMOVED = "usual.event.data.DISK_REMOVED";
1052
1053 /**
1054 * Indicates the action of a common event that an external storage device was unmounted.
1055 * To subscribe to this common event, your application must have the ohos.permission.WRITE_USER_STORAGE or
1056 * ohos.permission.STORAGE_MANAGER permission.
1057 * This common event can be published only by system applications.
1058 */
1059 const std::string CommonEventSupport::COMMON_EVENT_DISK_UNMOUNTED = "usual.event.data.DISK_UNMOUNTED";
1060
1061 /**
1062 * Indicates the action of a common event that an external storage device was mounted.
1063 * To subscribe to this common event, your application must have the ohos.permission.WRITE_USER_STORAGE or
1064 * ohos.permission.STORAGE_MANAGER permission.
1065 * This common event can be published only by system applications.
1066 */
1067 const std::string CommonEventSupport::COMMON_EVENT_DISK_MOUNTED = "usual.event.data.DISK_MOUNTED";
1068
1069 /**
1070 * Indicates the action of a common event that an external storage device was removed without being unmounted.
1071 * To subscribe to this common event, your application must have the ohos.permission.WRITE_USER_STORAGE or
1072 * ohos.permission.STORAGE_MANAGER permission.
1073 * This common event can be published only by system applications.
1074 */
1075 const std::string CommonEventSupport::COMMON_EVENT_DISK_BAD_REMOVAL = "usual.event.data.DISK_BAD_REMOVAL";
1076
1077 /**
1078 * Indicates the action of a common event that an external storage device becomes unmountable.
1079 * To subscribe to this common event, your application must have the ohos.permission.WRITE_USER_STORAGE or
1080 * ohos.permission.STORAGE_MANAGER permission.
1081 * This common event can be published only by system applications.
1082 */
1083 const std::string CommonEventSupport::COMMON_EVENT_DISK_UNMOUNTABLE = "usual.event.data.DISK_UNMOUNTABLE";
1084
1085 /**
1086 * Indicates the action of a common event that an external storage device was ejected.
1087 * To subscribe to this common event, your application must have the ohos.permission.WRITE_USER_STORAGE or
1088 * ohos.permission.STORAGE_MANAGER permission.
1089 * This common event can be published only by system applications.
1090 */
1091 const std::string CommonEventSupport::COMMON_EVENT_DISK_EJECT = "usual.event.data.DISK_EJECT";
1092
1093 /**
1094 * Indicates the action of a common event that an external storage device was removed.
1095 * To subscribe to this common event, your application must have the ohos.permission.WRITE_USER_STORAGE or
1096 * ohos.permission.STORAGE_MANAGER permission.
1097 * This common event can be published only by system applications.
1098 */
1099 const std::string CommonEventSupport::COMMON_EVENT_VOLUME_REMOVED = "usual.event.data.VOLUME_REMOVED";
1100
1101 /**
1102 * Indicates the action of a common event that an external storage device was unmounted.
1103 * To subscribe to this common event, your application must have the ohos.permission.WRITE_USER_STORAGE or
1104 * ohos.permission.STORAGE_MANAGER permission.
1105 * This common event can be published only by system applications.
1106 */
1107 const std::string CommonEventSupport::COMMON_EVENT_VOLUME_UNMOUNTED = "usual.event.data.VOLUME_UNMOUNTED";
1108
1109 /**
1110 * Indicates the action of a common event that an external storage device was mounted.
1111 * To subscribe to this common event, your application must have the ohos.permission.WRITE_USER_STORAGE or
1112 * ohos.permission.STORAGE_MANAGER permission.
1113 * This common event can be published only by system applications.
1114 */
1115 const std::string CommonEventSupport::COMMON_EVENT_VOLUME_MOUNTED = "usual.event.data.VOLUME_MOUNTED";
1116
1117 /**
1118 * Indicates the action of a common event that an external storage device was removed without being unmounted.
1119 * To subscribe to this common event, your application must have the ohos.permission.WRITE_USER_STORAGE or
1120 * ohos.permission.STORAGE_MANAGER permission.
1121 * This common event can be published only by system applications.
1122 */
1123 const std::string CommonEventSupport::COMMON_EVENT_VOLUME_BAD_REMOVAL = "usual.event.data.VOLUME_BAD_REMOVAL";
1124
1125 /**
1126 * Indicates the action of a common event that an external storage device was ejected.
1127 * To subscribe to this common event, your application must have the ohos.permission.WRITE_USER_STORAGE or
1128 * ohos.permission.STORAGE_MANAGER permission.
1129 * This common event can be published only by system applications.
1130 */
1131 const std::string CommonEventSupport::COMMON_EVENT_VOLUME_EJECT = "usual.event.data.VOLUME_EJECT";
1132
1133 /**
1134 * Indicates the action of a common event that the account visible changed.
1135 * To subscribe to this common event, your application must have the ohos.permission.GET_APP_ACCOUNTS permission.
1136 * This is a protected common event, which can be sent only by the system.
1137 */
1138 const std::string CommonEventSupport::COMMON_EVENT_VISIBLE_ACCOUNTS_UPDATED =
1139 "usual.event.data.VISIBLE_ACCOUNTS_UPDATED";
1140
1141 /**
1142 * Indicates the action of a common event that the account is deleted.
1143 * To subscribe to this common event, your application must have the ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
1144 * permission.
1145 * This is a protected common event, which can be sent only by the system.
1146 */
1147 const std::string CommonEventSupport::COMMON_EVENT_ACCOUNT_DELETED = "usual.event.data.ACCOUNT_DELETED";
1148
1149 /**
1150 * Indicates the action of a common event that the foundation is ready.
1151 * To subscribe to this common event, your application must have the ohos.permission.RECEIVER_STARTUP_COMPLETED
1152 * permission.
1153 * This is a protected common event, which can be sent only by the system.
1154 */
1155 const std::string CommonEventSupport::COMMON_EVENT_FOUNDATION_READY = "common.event.FOUNDATION_READY";
1156
1157 /**
1158 * Indicates the action of a common event that the default voice subscription has changed.
1159 * This is a protected common event that can only be sent by system.
1160 */
1161 const std::string CommonEventSupport::COMMON_EVENT_SIM_CARD_DEFAULT_VOICE_SUBSCRIPTION_CHANGED =
1162 "usual.event.SIM.DEFAULT_VOICE_SUBSCRIPTION_CHANGED";
1163
1164 /**
1165 * Indicates the action of a common event that the phone SIM card state has changed.
1166 * This is a protected common event that can only be sent by system.
1167 */
1168 const std::string CommonEventSupport::COMMON_EVENT_SIM_STATE_CHANGED = "usual.event.SIM_STATE_CHANGED";
1169
1170 /**
1171 * Indicates the action of a common event that the airplane mode of the device has changed.
1172 * This common event can be triggered only by system applications.
1173 */
1174 const std::string CommonEventSupport::COMMON_EVENT_AIRPLANE_MODE_CHANGED = "usual.event.AIRPLANE_MODE";
1175
1176 /**
1177 * Indicates the action of a common event that a new sms bas been received by the device.
1178 * To subscribe to this common event, your application must have the ohos.permission.RECEIVE_SMS permission.
1179 * This common event can be triggered only by system.
1180 */
1181 const std::string CommonEventSupport::COMMON_EVENT_SMS_RECEIVE_COMPLETED = "usual.event.SMS_RECEIVE_COMPLETED";
1182
1183 /**
1184 * Indicates the action of a common event that a new sms emergency cell broadcast bas been received by the device.
1185 * This common event can be triggered only by system.
1186 */
1187 const std::string CommonEventSupport::COMMON_EVENT_SMS_EMERGENCY_CB_RECEIVE_COMPLETED =
1188 "usual.event.SMS_EMERGENCY_CB_RECEIVE_COMPLETED";
1189
1190 /**
1191 * Indicates the action of a common event that a new sms normal cell broadcast bas been received by the device.
1192 * This common event can be triggered only by system.
1193 */
1194 const std::string CommonEventSupport::COMMON_EVENT_SMS_CB_RECEIVE_COMPLETED = "usual.event.SMS_CB_RECEIVE_COMPLETED";
1195
1196 /**
1197 * Indicates the action of a common event that a STK command has been received by the device.
1198 * This common event can be triggered only by system.
1199 */
1200 const std::string CommonEventSupport::COMMON_EVENT_STK_COMMAND = "usual.event.STK_COMMAND";
1201
1202 /**
1203 * Indicates the action of a common event that STK session end.
1204 * This common event can be triggered only by system.
1205 */
1206 const std::string CommonEventSupport::COMMON_EVENT_STK_SESSION_END = "usual.event.STK_SESSION_END";
1207
1208 /**
1209 * Indicates the action of a common event that the STK phone card state has changed.
1210 * This common event can be triggered only by system.
1211 */
1212 const std::string CommonEventSupport::COMMON_EVENT_STK_CARD_STATE_CHANGED = "usual.event.STK_CARD_STATE_CHANGED";
1213
1214 /**
1215 * Indicates the action of a common event that an alpha string during call control has been received by the device.
1216 * This common event can be triggered only by system.
1217 */
1218 const std::string CommonEventSupport::COMMON_EVENT_STK_ALPHA_IDENTIFIER = "usual.event.STK_ALPHA_IDENTIFIER";
1219
1220 /**
1221 * Indicates the action of a common event that the spn display information has been updated.
1222 * This common event can be triggered only by system.
1223 */
1224 const std::string CommonEventSupport::COMMON_EVENT_SPN_INFO_CHANGED = "usual.event.SPN_INFO_CHANGED";
1225
1226 /**
1227 * Indicates the action of a common event that the NITZ time has been updated.
1228 * This is a protected common event that can only be sent by system.
1229 */
1230 const std::string CommonEventSupport::COMMON_EVENT_NITZ_TIME_CHANGED = "usual.event.NITZ_TIME_CHANGED";
1231
1232 /**
1233 * Indicates the action of a common event that the NITZ time zone has been updated.
1234 * This is a protected common event that can only be sent by system.
1235 */
1236 const std::string CommonEventSupport::COMMON_EVENT_NITZ_TIMEZONE_CHANGED =
1237 "usual.event.NITZ_TIMEZONE_CHANGED";
1238
1239 /**
1240 * Indicates the action of a common event that a new sms wappush has been received by the device.
1241 * This is a protected common event that can only be sent by system.
1242 */
1243 const std::string CommonEventSupport::COMMON_EVENT_SMS_WAPPUSH_RECEIVE_COMPLETED =
1244 "usual.event.SMS_WAPPUSH_RECEIVE_COMPLETED";
1245
1246 /**
1247 * Indicates the action of a common event that the operator config has been updated.
1248 * This is a protected common event that can only be sent by system.
1249 */
1250 const std::string CommonEventSupport::COMMON_EVENT_OPERATOR_CONFIG_CHANGED =
1251 "usual.event.OPERATOR_CONFIG_CHANGED";
1252
1253 /**
1254 * Indicates the action of a common event that the notification slot has been updated.
1255 * This is a protected common event that can only be sent by system.
1256 */
1257 const std::string CommonEventSupport::COMMON_EVENT_SLOT_CHANGE =
1258 "usual.event.SLOT_CHANGE";
1259
1260 /**
1261 * Only for test case.
1262 */
1263 const std::string CommonEventSupport::COMMON_EVENT_TEST_ACTION1 = "usual.event.test1";
1264
1265 /**
1266 * Only for test case.
1267 */
1268 const std::string CommonEventSupport::COMMON_EVENT_TEST_ACTION2 = "usual.event.test2";
1269
1270 /**
1271 * Indicates the action of a common event that the default SMS subscription has
1272 * been changed. This is a protected common event that can only be sent by system.
1273 */
1274 const std::string CommonEventSupport::COMMON_EVENT_SIM_CARD_DEFAULT_SMS_SUBSCRIPTION_CHANGED =
1275 "usual.event.SIM.DEFAULT_SMS_SUBSCRIPTION_CHANGED";
1276
1277 /**
1278 * Indicates the action of a common event that the default data subscription has been changed.
1279 * This is a protected common event that can only be sent by system.
1280 */
1281 const std::string CommonEventSupport::COMMON_EVENT_SIM_CARD_DEFAULT_DATA_SUBSCRIPTION_CHANGED =
1282 "usual.event.SIM.DEFAULT_DATA_SUBSCRIPTION_CHANGED";
1283
1284 /**
1285 * Indicates the action of a common event that the default main subscription has been changed.
1286 * This is a protected common event that can only be sent by system.
1287 */
1288 const std::string CommonEventSupport::COMMON_EVENT_SIM_CARD_DEFAULT_MAIN_SUBSCRIPTION_CHANGED =
1289 "usual.event.SIM.DEFAULT_MAIN_SUBSCRIPTION_CHANGED";
1290
1291 /**
1292 * Indicates the action of a common event that the status of setting primary slot has been changed.
1293 * This is a protected common event that can only be sent by system.
1294 */
1295 const std::string CommonEventSupport::COMMON_EVENT_SET_PRIMARY_SLOT_STATUS = "usual.event.SET_PRIMARY_SLOT_STATUS";
1296
1297 /**
1298 * Indicates the action of a common event that the roaming status of main card has been changed.
1299 * This is a protected common event that can only be sent by system.
1300 */
1301 const std::string CommonEventSupport::COMMON_EVENT_PRIMARY_SLOT_ROAMING = "usual.event.PRIMARY_SLOT_ROAMING";
1302
1303 /**
1304 * Indicates the action of a common event that the call state has been changed.
1305 * To subscribe to this protected common event, your application must have the ohos.permission.GET_TELEPHONY_STATE
1306 * permission.
1307 * This is a protected common event that can only be sent by system.
1308 */
1309 const std::string CommonEventSupport::COMMON_EVENT_CALL_STATE_CHANGED = "usual.event.CALL_STATE_CHANGED";
1310
1311 /**
1312 * Indicates the action of a common event that the cellular data state has been changed.
1313 * This is a protected common event that can only be sent by system.
1314 */
1315 const std::string CommonEventSupport::COMMON_EVENT_CELLULAR_DATA_STATE_CHANGED =
1316 "usual.event.CELLULAR_DATA_STATE_CHANGED";
1317
1318 /**
1319 * Indicates the action of a common event that the network state has been changed.
1320 * This is a protected common event that can only be sent by system.
1321 */
1322 const std::string CommonEventSupport::COMMON_EVENT_NETWORK_STATE_CHANGED = "usual.event.NETWORK_STATE_CHANGED";
1323
1324 /**
1325 * Indicates the action of a common event that the signal info has been changed.
1326 * This is a protected common event that can only be sent by system.
1327 */
1328 const std::string CommonEventSupport::COMMON_EVENT_SIGNAL_INFO_CHANGED = "usual.event.SIGNAL_INFO_CHANGED";
1329
1330 /**
1331 * Indicates the action of a common event that the incoming call has been missed.
1332 * To subscribe to this protected common event, your application must have the ohos.permission.GET_TELEPHONY_STATE
1333 * permission.
1334 * This is a protected common event that can only be sent by system.
1335 */
1336 const std::string CommonEventSupport::COMMON_EVENT_INCOMING_CALL_MISSED = "usual.event.INCOMING_CALL_MISSED";
1337
1338 /**
1339 * Indicate the result of quick fix apply.
1340 * This common event can be triggered only by system.
1341 */
1342 const std::string CommonEventSupport::COMMON_EVENT_QUICK_FIX_APPLY_RESULT = "usual.event.QUICK_FIX_APPLY_RESULT";
1343
1344 /**
1345 * Indicate the result of quick fix revoke.
1346 * This common event can be triggered only by system.
1347 */
1348 const std::string CommonEventSupport::COMMON_EVENT_QUICK_FIX_REVOKE_RESULT = "usual.event.QUICK_FIX_REVOKE_RESULT";
1349
1350 /**
1351 * Indicates the action of a common event that radio state change.
1352 * To subscribe to this protected common event that can only be sent by system.
1353 */
1354 const std::string CommonEventSupport::COMMON_EVENT_RADIO_STATE_CHANGE = "usual.event.RADIO_STATE_CHANGE";
1355
1356 /**
1357 * Indicates the action of a common event about a login of a distributed account.
1358 * This is a protected common event that can only be sent by system.
1359 */
1360 const std::string CommonEventSupport::COMMON_EVENT_DISTRIBUTED_ACCOUNT_LOGIN =
1361 "common.event.DISTRIBUTED_ACCOUNT_LOGIN";
1362
1363 /**
1364 * Indicates the action of a common event about a logout of a distributed account.
1365 * This is a protected common event that can only be sent by system.
1366 */
1367 const std::string CommonEventSupport::COMMON_EVENT_DISTRIBUTED_ACCOUNT_LOGOUT =
1368 "common.event.DISTRIBUTED_ACCOUNT_LOGOUT";
1369
1370 /**
1371 * Indicates the action of a common event that the token of a distributed account is invalid.
1372 * This is a protected common event that can only be sent by system.
1373 */
1374 const std::string CommonEventSupport::COMMON_EVENT_DISTRIBUTED_ACCOUNT_TOKEN_INVALID =
1375 "common.event.DISTRIBUTED_ACCOUNT_TOKEN_INVALID";
1376
1377 /**
1378 * Indicates the action of a common event about a logoff of a distributed account.
1379 * This is a protected common event that can only be sent by system.
1380 */
1381 const std::string CommonEventSupport::COMMON_EVENT_DISTRIBUTED_ACCOUNT_LOGOFF =
1382 "common.event.DISTRIBUTED_ACCOUNT_LOGOFF";
1383
1384 /**
1385 * Indicates the action of a common event that the os account information has been updated.
1386 * This is a protected common event that can only be sent by system.
1387 */
1388 const std::string CommonEventSupport::COMMON_EVENT_USER_INFO_UPDATED =
1389 "usual.event.USER_INFO_UPDATED";
1390
1391 /**
1392 * Indicate the action of a common event that domain account status has been changed.
1393 * This is a protected common event that can only be sent by system.
1394 */
1395 const std::string CommonEventSupport::COMMON_EVENT_DOMAIN_ACCOUNT_STATUS_CHANGED =
1396 "usual.event.DOMAIN_ACCOUNT_STATUS_CHANGED";
1397
1398 /**
1399 * Indicates the action of a common event that the screen lock.
1400 * This is a protected common event that can only be sent by system.
1401 */
1402 const std::string CommonEventSupport::COMMON_EVENT_SCREEN_LOCKED = "usual.event.SCREEN_LOCKED";
1403
1404 /**
1405 * Indicates the action of a common event that the screen unlock.
1406 * This is a protected common event that can only be sent by system.
1407 */
1408 const std::string CommonEventSupport::COMMON_EVENT_SCREEN_UNLOCKED = "usual.event.SCREEN_UNLOCKED";
1409
1410 /**
1411 * Indicates the action of a common event that the call audio quality information has been updated.
1412 * This is a protected common event that can only be sent by system.
1413 */
1414 const std::string CommonEventSupport::COMMON_EVENT_AUDIO_QUALITY_CHANGE =
1415 "usual.event.AUDIO_QUALITY_CHANGE";
1416
1417 /**
1418 * Indicates the action of a common event about special code.
1419 * This is a protected common event that can only be sent by system.
1420 */
1421 const std::string CommonEventSupport::COMMON_EVENT_SPECIAL_CODE = "common.event.SPECIAL_CODE";
1422
1423 /**
1424 * Indicates the action of a common event about reminder
1425 * When the user clicks the button and the application (creator)
1426 * is in the foreground, a event is sent. event data is: button type,reminder id
1427 */
1428 const std::string CommonEventSupport::COMMON_EVENT_REMINDER_STATUS_CHANGE = "usual.event.REMINDER_STATUS_CHANGE";
1429
1430 /**
1431 * Indicates that the privacy status is changed.
1432 * This is a protected common event that can only be sent by system.
1433 */
1434 const std::string CommonEventSupport::COMMON_EVENT_PRIVACY_STATE_CHANGED = "usual.event.PRIVACY_STATE_CHANGED";
1435
1436 /**
1437 * This common event means that minors mode is enabled.
1438 * This is a protected common event that can only be sent by system.
1439 */
1440 const std::string CommonEventSupport::COMMON_EVENT_MINORSMODE_ON = "usual.event.MINORSMODE_ON";
1441
1442 /**
1443 * This common event means that minors mode is disabled.
1444 * This is a protected common event that can only be sent by system.
1445 */
1446 const std::string CommonEventSupport::COMMON_EVENT_MINORSMODE_OFF = "usual.event.MINORSMODE_OFF";
1447
1448 /**
1449 * Indicates that the file access state is changed.
1450 * This is a protected common event that can only be sent by system.
1451 */
1452 const std::string CommonEventSupport::COMMON_EVENT_SCREEN_LOCK_FILE_ACCESS_STATE_CHANGED =
1453 "usual.event.SCREEN_LOCK_FILE_ACCESS_STATE_CHANGED";
1454
1455 /**
1456 * Indicates the action of a common event that the bundle resources have been changed.
1457 * To subscribe to this common event, your application must have the ohos.permission.GET_BUNDLE_RESOURCES
1458 * permission.
1459 * This is a protected common event, which can be sent only by the system.
1460 */
1461 const std::string CommonEventSupport::COMMON_EVENT_BUNDLE_RESOURCES_CHANGED = "usual.event.BUNDLE_RESOURCES_CHANGED";
1462
1463 /**
1464 * This common event means that datashare is ready.
1465 * This is a protected common event that can only be sent by system.
1466 */
1467 const std::string CommonEventSupport::COMMON_EVENT_DATA_SHARE_READY = "usual.event.DATA_SHARE_READY";
1468
1469 /**
1470 * This common event means that overlay package is added.
1471 * This is a protected common event that can only be sent by system.
1472 */
1473 const std::string CommonEventSupport::COMMON_EVENT_OVERLAY_PACKAGE_ADDED = "usual.event.OVERLAY_PACKAGE_ADDED";
1474
1475 /**
1476 * This common event means that overlay package is changed.
1477 * This is a protected common event that can only be sent by system.
1478 */
1479 const std::string CommonEventSupport::COMMON_EVENT_OVERLAY_PACKAGE_CHANGED = "usual.event.OVERLAY_PACKAGE_CHANGED";
1480
1481 /**
1482 * This common event means that disposed rule is added.
1483 * This is a protected common event that can only be sent by system.
1484 */
1485 const std::string CommonEventSupport::COMMON_EVENT_DISPOSED_RULE_ADDED = "usual.event.DISPOSED_RULE_ADDED";
1486
1487 /**
1488 * This common event means that disposed rule is deleted.
1489 * This is a protected common event that can only be sent by system.
1490 */
1491 const std::string CommonEventSupport::COMMON_EVENT_DISPOSED_RULE_DELETED = "usual.event.DISPOSED_RULE_DELETED";
1492
1493 /**
1494 * Indicates that the second mount is ready.
1495 * This is a protected common event that can only be sent by system.
1496 */
1497 const std::string CommonEventSupport::COMMON_EVENT_SECOND_MOUNTED = "usual.event.SECOND_MOUNTED";
1498
1499 /**
1500 * Indicates that an application begins to restored.
1501 * This is a protected common event that can only be sent by system.
1502 */
1503 const std::string CommonEventSupport::COMMON_EVENT_RESTORE_START = "usual.event.RESTORE_START";
1504
1505 /**
1506 * This common event means that vpn connection status has been changed.
1507 * This is a protected common event that can only be sent by system.
1508 */
1509 const std::string CommonEventSupport::COMMON_EVENT_VPN_CONNECTION_STATUS_CHANGED =
1510 "usual.event.VPN_CONNECTION_STATUS_CHANGED";
1511
1512 /**
1513 * Indicates that the managed browser policy is changed.
1514 * This is a protected common event that can only be sent by system.
1515 */
1516 const std::string CommonEventSupport::COMMON_EVENT_MANAGED_BROWSER_POLICY_CHANGED =
1517 "usual.event.MANAGED_BROWSER_POLICY_CHANGED";
1518
CommonEventSupport()1519 CommonEventSupport::CommonEventSupport()
1520 {
1521 Init();
1522 }
1523
~CommonEventSupport()1524 CommonEventSupport::~CommonEventSupport()
1525 {}
1526
Init()1527 void CommonEventSupport::Init()
1528 {
1529 /**
1530 * Indicates the action of a common event that the user has finished booting and the system has been loaded.
1531 * To subscribe to this common event, your application must have the ohos.permission.RECEIVER_STARTUP_COMPLETED
1532 * permission.
1533 * This common event can only be published by the system.
1534 */
1535 commonEventSupport_.emplace_back(COMMON_EVENT_BOOT_COMPLETED);
1536 /**
1537 * Indicates the action of a common event that the user has finished booting and the system has been loaded but the
1538 * screen is still locked.
1539 * To subscribe to this common event, your application must have the ohos.permission.RECEIVER_STARTUP_COMPLETED
1540 * permission.
1541 * This common event can only be published by the system.
1542 */
1543 commonEventSupport_.emplace_back(COMMON_EVENT_LOCKED_BOOT_COMPLETED);
1544 /**
1545 * Indicates the action of a common event that the device is being shut down and the final shutdown will proceed.
1546 * This is different from sleeping. All unsaved data will be lost after shut down.
1547 * This common event can only be published by the system.
1548 */
1549 commonEventSupport_.emplace_back(COMMON_EVENT_SHUTDOWN);
1550 /**
1551 * Indicates the action of a common event that the charging state, level, and other information about the battery
1552 * have changed.
1553 * This common event can only be published by the system.
1554 */
1555 commonEventSupport_.emplace_back(COMMON_EVENT_BATTERY_CHANGED);
1556 /**
1557 * Indicates the action of a common event that the battery level is low.
1558 * This common event can only be published by the system.
1559 */
1560 commonEventSupport_.emplace_back(COMMON_EVENT_BATTERY_LOW);
1561 /**
1562 * Indicates the action of a common event that the battery exit the low state.
1563 * This common event can only be published by the system.
1564 */
1565 commonEventSupport_.emplace_back(COMMON_EVENT_BATTERY_OKAY);
1566 /**
1567 * Indicates the action of a common event that the device is connected to the external power.
1568 * This common event can only be published by the system.
1569 */
1570 commonEventSupport_.emplace_back(COMMON_EVENT_POWER_CONNECTED);
1571 /**
1572 * Indicates the action of a common event that the device is disconnected from the external power.
1573 * This common event can only be published by the system.
1574 */
1575 commonEventSupport_.emplace_back(COMMON_EVENT_POWER_DISCONNECTED);
1576
1577 /**
1578 * Indicates the action of a common event that the device screen is off and the device is sleeping.
1579 * This common event can only be published by the system.
1580 */
1581 commonEventSupport_.emplace_back(COMMON_EVENT_SCREEN_OFF);
1582 /**
1583 * Indicates the action of a common event that the device screen is on and the device is interactive.
1584 * This common event can only be published by the system.
1585 */
1586 commonEventSupport_.emplace_back(COMMON_EVENT_SCREEN_ON);
1587 /**
1588 * Indicates the action of a common event that the thermal level changed.
1589 * This common event can only be published by the system.
1590 */
1591 commonEventSupport_.emplace_back(COMMON_EVENT_THERMAL_LEVEL_CHANGED);
1592 /**
1593 * Indicates the action of a common event that the device is about to enter the force sleep mode.
1594 * This common event can only be published by the system.
1595 */
1596 commonEventSupport_.emplace_back(COMMON_EVENT_ENTER_FORCE_SLEEP);
1597 /**
1598 * Indicates the action of a common event that the device exits the force sleep mode.
1599 * This common event can only be published by the system.
1600 */
1601 commonEventSupport_.emplace_back(COMMON_EVENT_EXIT_FORCE_SLEEP);
1602 /**
1603 * Indicates the action of a common event that the device is about to enter the hibernate mode.
1604 * This common event can only be published by the system.
1605 */
1606 commonEventSupport_.emplace_back(COMMON_EVENT_ENTER_HIBERNATE);
1607 /**
1608 * Indicates the action of a common event that the device exits the hibernate mode.
1609 * This common event can only be published by the system.
1610 */
1611 commonEventSupport_.emplace_back(COMMON_EVENT_EXIT_HIBERNATE);
1612 /**
1613 * Indicates the action of a common event that the device is idle and charging,
1614 * services can do some business on the background.
1615 * This common event can only be published by the system.
1616 */
1617 commonEventSupport_.emplace_back(COMMON_EVENT_CHARGE_IDLE_MODE_CHANGED);
1618 /**
1619 * Indicates the action of a common event that the user unlocks the device.
1620 * This common event can only be published by the system.
1621 */
1622 commonEventSupport_.emplace_back(COMMON_EVENT_USER_PRESENT);
1623
1624 /**
1625 * Indicates the action of a common event that the system time has changed.
1626 * This common event can only be published by the system.
1627 */
1628 commonEventSupport_.emplace_back(COMMON_EVENT_TIME_TICK);
1629 /**
1630 * Indicates the action of a common event that the system time is set.
1631 * This common event can only be published by the system.
1632 */
1633 commonEventSupport_.emplace_back(COMMON_EVENT_TIME_CHANGED);
1634 /**
1635 * Indicates the action of a common event that the system date has changed.
1636 * This common event can only be published by the system.
1637 */
1638 commonEventSupport_.emplace_back(COMMON_EVENT_DATE_CHANGED);
1639 /**
1640 * Indicates the action of a common event that the system time zone has changed.
1641 * This common event can only be published by the system.
1642 */
1643 commonEventSupport_.emplace_back(COMMON_EVENT_TIMEZONE_CHANGED);
1644
1645 /**
1646 * Indicates the action of a common event that a user closes a temporary system dialog box.
1647 * This common event can only be published by the system.
1648 */
1649 commonEventSupport_.emplace_back(COMMON_EVENT_CLOSE_SYSTEM_DIALOGS);
1650
1651 /**
1652 * Indicates the action of a common event that bundle scan has finished.
1653 * This common event can only be published by the system.
1654 */
1655 commonEventSupport_.emplace_back(COMMON_EVENT_BUNDLE_SCAN_FINISHED);
1656 /**
1657 * Indicates the action of a common event that a new application package has been installed on the device.
1658 * This common event can only be published by the system.
1659 */
1660 commonEventSupport_.emplace_back(COMMON_EVENT_PACKAGE_ADDED);
1661 /**
1662 * This commonEvent means when a new application package start to install on the device.
1663 * This is a protected common event that can only be sent by system.
1664 */
1665 commonEventSupport_.emplace_back(COMMON_EVENT_PACKAGE_INSTALLATION_STARTED);
1666 /**
1667 * This common event means an application package enables or disables a dynamic icon.
1668 * This is a protected common event that can only be sent by system.
1669 */
1670 commonEventSupport_.emplace_back(COMMON_EVENT_DYNAMIC_ICON_CHANGED);
1671 /**
1672 * Indicates the action of a common event that a new version of an installed application package has replaced
1673 * the previous one on the device.
1674 * This common event can only be published by the system.
1675 */
1676 commonEventSupport_.emplace_back(COMMON_EVENT_PACKAGE_REPLACED);
1677 /**
1678 * Indicates the action of a common event that a new version of your application package has replaced
1679 * the previous one. This common event is sent only to the application that was replaced.
1680 * This common event can only be published by the system.
1681 */
1682 commonEventSupport_.emplace_back(COMMON_EVENT_MY_PACKAGE_REPLACED);
1683 /**
1684 * Indicates the action of a common event that an installed application has been uninstalled from the device
1685 * with the application data remained.
1686 * This common event can only be published by the system.
1687 */
1688 commonEventSupport_.emplace_back(COMMON_EVENT_PACKAGE_REMOVED);
1689 /**
1690 * Indicates the action of a common event that an installed bundle has been uninstalled from the device with the
1691 * application data remained.
1692 * This common event can only be published by the system.
1693 */
1694 commonEventSupport_.emplace_back(COMMON_EVENT_BUNDLE_REMOVED);
1695 /**
1696 * Indicates the action of a common event that an installed application, including both the application data and
1697 * code, have been completely uninstalled from the device.
1698 * This common event can only be published by the system.
1699 */
1700 commonEventSupport_.emplace_back(COMMON_EVENT_PACKAGE_FULLY_REMOVED);
1701 /**
1702 * Indicates the action of a common event that an application package has been changed
1703 * (for example, a component in the package has been enabled or disabled).
1704 * This common event can only be published by the system.
1705 */
1706 commonEventSupport_.emplace_back(COMMON_EVENT_PACKAGE_CHANGED);
1707 /**
1708 * Indicates the action of a common event that the user has restarted the application package and killed all its
1709 * processes.
1710 * This common event can only be published by the system.
1711 */
1712 commonEventSupport_.emplace_back(COMMON_EVENT_PACKAGE_RESTARTED);
1713 /**
1714 * Indicates the action of a common event that the user has cleared the application package data.
1715 * This common event is published after COMMON_EVENT_PACKAGE_RESTARTED is triggered and the data has been cleared.
1716 * This common event can only be published by the system.
1717 */
1718 commonEventSupport_.emplace_back(COMMON_EVENT_PACKAGE_DATA_CLEARED);
1719 /**
1720 * Indicates the action of a common event that the user has cleared the application package cache.
1721 * This common event can only be published by the system.
1722 */
1723 commonEventSupport_.emplace_back(COMMON_EVENT_PACKAGE_CACHE_CLEARED);
1724 /**
1725 * Indicates the action of a common event that application packages have been suspended.
1726 * This common event can only be published by the system.
1727 */
1728 commonEventSupport_.emplace_back(COMMON_EVENT_PACKAGES_SUSPENDED);
1729 /**
1730 * Indicates the action of a common event that application packages have not been suspended.
1731 * This common event can only be published by the system.
1732 */
1733 commonEventSupport_.emplace_back(COMMON_EVENT_PACKAGES_UNSUSPENDED);
1734 /**
1735 * Indicates the action of a common event that an application package has been suspended.
1736 * This common event can only be published by the system.
1737 */
1738 commonEventSupport_.emplace_back(COMMON_EVENT_MY_PACKAGE_SUSPENDED);
1739 /**
1740 * Indicates the action of a common event that an application package has not been suspended.
1741 * This common event can only be published by the system.
1742 */
1743 commonEventSupport_.emplace_back(COMMON_EVENT_MY_PACKAGE_UNSUSPENDED);
1744 /**
1745 * Indicates the action of a common event that a user ID has been removed from the system.
1746 * This common event can only be published by the system.
1747 */
1748 commonEventSupport_.emplace_back(COMMON_EVENT_UID_REMOVED);
1749 /**
1750 * Indicates the action of a common event that an installed application is started for the first time.
1751 * This common event can only be published by the system.
1752 */
1753 commonEventSupport_.emplace_back(COMMON_EVENT_PACKAGE_FIRST_LAUNCH);
1754 /**
1755 * Indicates the action of a common event that an application requires system verification.
1756 * This common event can only be published by the system.
1757 */
1758 commonEventSupport_.emplace_back(COMMON_EVENT_PACKAGE_NEEDS_VERIFICATION);
1759 /**
1760 * Indicates the action of a common event that an application has been verified by the system.
1761 * This common event can only be published by the system.
1762 */
1763 commonEventSupport_.emplace_back(COMMON_EVENT_PACKAGE_VERIFIED);
1764
1765 /**
1766 * Indicates the action of a common event that applications installed on the external storage become
1767 * available for the system.
1768 * This common event can only be published by the system.
1769 */
1770 commonEventSupport_.emplace_back(COMMON_EVENT_EXTERNAL_APPLICATIONS_AVAILABLE);
1771 /**
1772 * Indicates the action of a common event that applications installed on the external storage become unavailable for
1773 * the system.
1774 * This common event can only be published by the system.
1775 */
1776 commonEventSupport_.emplace_back(COMMON_EVENT_EXTERNAL_APPLICATIONS_UNAVAILABLE);
1777
1778 /**
1779 * Indicates the action of a common event that the device state (for example, orientation and locale) has changed.
1780 * This common event can only be published by the system.
1781 */
1782 commonEventSupport_.emplace_back(COMMON_EVENT_CONFIGURATION_CHANGED);
1783 /**
1784 * Indicates the action of a common event that the device locale has changed.
1785 * This common event can only be published by the system.
1786 */
1787 commonEventSupport_.emplace_back(COMMON_EVENT_LOCALE_CHANGED);
1788
1789 /**
1790 * Indicates the action of a common event that the device storage is insufficient.
1791 */
1792 commonEventSupport_.emplace_back(COMMON_EVENT_MANAGE_PACKAGE_STORAGE);
1793
1794 /**
1795 * Indicates the action of a common event that one sandbox package is installed.
1796 */
1797 commonEventSupport_.emplace_back(COMMON_EVENT_SANDBOX_PACKAGE_ADDED);
1798 /**
1799 * Indicates the action of a common event that one sandbox package is uninstalled.
1800 */
1801 commonEventSupport_.emplace_back(COMMON_EVENT_SANDBOX_PACKAGE_REMOVED);
1802 /**
1803 * Indicates the action of a common event that the system is in driving mode.
1804 * This is a protected common event, which can be sent only by the system.
1805 */
1806 commonEventSupport_.emplace_back(COMMON_EVENT_DRIVE_MODE);
1807 /**
1808 * Indicates the action of a common event that the system is in home mode.
1809 * This is a protected common event, which can be sent only by the system.
1810 */
1811 commonEventSupport_.emplace_back(COMMON_EVENT_HOME_MODE);
1812 /**
1813 * Indicates the action of a common event that the system is in office mode.
1814 * This is a protected common event, which can be sent only by the system.
1815 */
1816 commonEventSupport_.emplace_back(COMMON_EVENT_OFFICE_MODE);
1817
1818 /**
1819 * Indicates the action of a common event that the window mode is split screen.
1820 * This is a protected common event, which can be sent only by the system.
1821 */
1822 commonEventSupport_.emplace_back(COMMON_EVENT_SPLIT_SCREEN);
1823
1824 /**
1825 * Indicates the action of a common event that the user has been started.
1826 */
1827 commonEventSupport_.emplace_back(COMMON_EVENT_USER_STARTED);
1828 /**
1829 * Indicates the action of a common event that the user has been brought to the background.
1830 */
1831 commonEventSupport_.emplace_back(COMMON_EVENT_USER_BACKGROUND);
1832 /**
1833 * Indicates the action of a common event that the user has been brought to the foreground.
1834 */
1835 commonEventSupport_.emplace_back(COMMON_EVENT_USER_FOREGROUND);
1836 /**
1837 * Indicates the action of a common event that a user switch is happening.
1838 * To subscribe to this common event, your application must have the ohos.permission.MANAGE_LOCAL_ACCOUNTS
1839 * permission.
1840 */
1841 commonEventSupport_.emplace_back(COMMON_EVENT_USER_SWITCHED);
1842 /**
1843 * Indicates the action of a common event that the user is going to be started.
1844 * To subscribe to this common event, your application must have the ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
1845 * permission.
1846 */
1847 commonEventSupport_.emplace_back(COMMON_EVENT_USER_STARTING);
1848 /**
1849 * Indicates the action of a common event that the credential-encrypted storage has become unlocked
1850 * for the current user when the device is unlocked after being restarted.
1851 */
1852 commonEventSupport_.emplace_back(COMMON_EVENT_USER_UNLOCKED);
1853 /**
1854 * Indicates the action of a common event that the user is going to be stopped.
1855 * To subscribe to this common event, your application must have the ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
1856 * permission.
1857 */
1858 commonEventSupport_.emplace_back(COMMON_EVENT_USER_STOPPING);
1859 /**
1860 * Indicates the action of a common event that the user has been stopped.
1861 */
1862 commonEventSupport_.emplace_back(COMMON_EVENT_USER_STOPPED);
1863 /**
1864 * Indicates the action of a common event about a login of a user with account ID.
1865 * This is a protected common event, which can be sent only by the system.
1866 */
1867 commonEventSupport_.emplace_back(COMMON_EVENT_HWID_LOGIN);
1868 /**
1869 * Indicates the action of a common event about a logout of a user with account ID.
1870 * This is a protected common event, which can be sent only by the system.
1871 */
1872 commonEventSupport_.emplace_back(COMMON_EVENT_HWID_LOGOUT);
1873 /**
1874 * Indicates the action of a common event that the account ID is invalid.
1875 * This is a protected common event, which can be sent only by the system.
1876 */
1877 commonEventSupport_.emplace_back(COMMON_EVENT_HWID_TOKEN_INVALID);
1878 /**
1879 * Indicates the action of a common event about a logoff of a account ID.
1880 * This is a protected common event, which can be sent only by the system.
1881 */
1882 commonEventSupport_.emplace_back(COMMON_EVENT_HWID_LOGOFF);
1883
1884 /**
1885 * Indicates the action of a common event about the Wi-Fi state, such as enabled and disabled.
1886 */
1887 commonEventSupport_.emplace_back(COMMON_EVENT_WIFI_POWER_STATE);
1888
1889 /**
1890 * Indicates the action of a common event that the Wi-Fi access point has been scanned and proven to be available.
1891 * To subscribe to this common event, your application must have the ohos.permission.LOCATION permission.
1892 */
1893 commonEventSupport_.emplace_back(COMMON_EVENT_WIFI_SCAN_FINISHED);
1894
1895 /**
1896 * Indicates the action of a common event that the Wi-Fi signal strength (RSSI) has changed.
1897 * To subscribe to this common event, your application must have the ohos.permission.GET_WIFI_INFO permission.
1898 */
1899 commonEventSupport_.emplace_back(COMMON_EVENT_WIFI_RSSI_VALUE);
1900
1901 /**
1902 * Indicates the action of a common event that the Wi-Fi connection state has changed.
1903 */
1904 commonEventSupport_.emplace_back(COMMON_EVENT_WIFI_CONN_STATE);
1905
1906 /**
1907 * Indicates the action of a common event about the Wi-Fi hotspot state, such as enabled or disabled.
1908 */
1909 commonEventSupport_.emplace_back(COMMON_EVENT_WIFI_HOTSPOT_STATE);
1910
1911 /**
1912 * Indicates the action of a common event that a client has joined the Wi-Fi hotspot of the current device. You can
1913 * register this common event to listen for information about the clients joining your hotspot.
1914 * To subscribe to this common event, your application must have the ohos.permission.GET_WIFI_INFO permission.
1915 */
1916 commonEventSupport_.emplace_back(COMMON_EVENT_WIFI_AP_STA_JOIN);
1917
1918 /**
1919 * Indicates the action of a common event that a client has dropped connection to the Wi-Fi hotspot of the current
1920 * device. You can register this common event to listen for information about the clients leaving your hotspot.
1921 * To subscribe to this common event, your application must have the ohos.permission.GET_WIFI_INFO permission.
1922 */
1923 commonEventSupport_.emplace_back(COMMON_EVENT_WIFI_AP_STA_LEAVE);
1924
1925 /**
1926 * Indicates the action of a common event that the state of MPLink (an enhanced Wi-Fi feature) has changed.
1927 * To subscribe to this common event, your application must have the ohos.permission.MPLINK_CHANGE_STATE permission.
1928 */
1929 commonEventSupport_.emplace_back(COMMON_EVENT_WIFI_MPLINK_STATE_CHANGE);
1930
1931 /**
1932 * Indicates the action of a common event that the Wi-Fi P2P connection state has changed.
1933 * To subscribe to this common event, your application must have the ohos.permission.GET_WIFI_INFO and
1934 * ohos.permission.LOCATION permissions.
1935 */
1936 commonEventSupport_.emplace_back(COMMON_EVENT_WIFI_P2P_CONN_STATE);
1937
1938 /**
1939 * Indicates the action of a common event about the Wi-Fi P2P state, such as enabled and disabled.
1940 * To subscribe to this common event, your application must have the ohos.permission.GET_WIFI_INFO permission.
1941 */
1942 commonEventSupport_.emplace_back(COMMON_EVENT_WIFI_P2P_STATE_CHANGED);
1943
1944 /**
1945 * Indicates that the Wi-Fi P2P peers state change.
1946 * To subscribe to this common event, your application must have the ohos.permission.GET_WIFI_INFO permission.
1947 */
1948 commonEventSupport_.emplace_back(COMMON_EVENT_WIFI_P2P_PEERS_STATE_CHANGED);
1949
1950 /**
1951 * Indicates that the Wi-Fi P2P discovery state change.
1952 * To subscribe to this common event, your application must have the ohos.permission.GET_WIFI_INFO permission.
1953 */
1954 commonEventSupport_.emplace_back(COMMON_EVENT_WIFI_P2P_PEERS_DISCOVERY_STATE_CHANGED);
1955
1956 /**
1957 * Indicates that the Wi-Fi P2P current device state change.
1958 * To subscribe to this common event, your application must have the ohos.permission.GET_WIFI_INFO permission.
1959 */
1960 commonEventSupport_.emplace_back(COMMON_EVENT_WIFI_P2P_CURRENT_DEVICE_STATE_CHANGED);
1961
1962 /**
1963 * Indicates that the Wi-Fi P2P group info is changed.
1964 * To subscribe to this common event, your application must have the ohos.permission.GET_WIFI_INFO permission.
1965 */
1966 commonEventSupport_.emplace_back(COMMON_EVENT_WIFI_P2P_GROUP_STATE_CHANGED);
1967
1968 /**
1969 * Indicates that network traffic statistics have been updated.
1970 */
1971 commonEventSupport_.emplace_back(COMMON_EVENT_NETMANAGER_NETSTATES_UPDATED);
1972
1973 /**
1974 * Indicates that the network traffic has exceeded the limit.
1975 */
1976 commonEventSupport_.emplace_back(COMMON_EVENT_NETMANAGER_NETSTATES_LIMITED);
1977
1978 /**
1979 * Indicates the action of a common event about the connection state of Bluetooth handsfree communication.
1980 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
1981 */
1982 commonEventSupport_.emplace_back(COMMON_EVENT_BLUETOOTH_HANDSFREE_AG_CONNECT_STATE_UPDATE);
1983
1984 /**
1985 * Indicates the action of a common event that the device connected to the Bluetooth handsfree is active.
1986 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
1987 */
1988 commonEventSupport_.emplace_back(COMMON_EVENT_BLUETOOTH_HANDSFREE_AG_CURRENT_DEVICE_UPDATE);
1989
1990 /**
1991 * Indicates the action of a common event that the connection state of Bluetooth A2DP has changed.
1992 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
1993 */
1994 commonEventSupport_.emplace_back(COMMON_EVENT_BLUETOOTH_HANDSFREE_AG_AUDIO_STATE_UPDATE);
1995
1996 /**
1997 * Indicates the action of a common event about the connection state of Bluetooth A2DP.
1998 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
1999 */
2000 commonEventSupport_.emplace_back(COMMON_EVENT_BLUETOOTH_A2DPSOURCE_CONNECT_STATE_UPDATE);
2001
2002 /**
2003 * Indicates the action of a common event that the device connected using Bluetooth A2DP is active.
2004 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
2005 */
2006 commonEventSupport_.emplace_back(COMMON_EVENT_BLUETOOTH_A2DPSOURCE_CURRENT_DEVICE_UPDATE);
2007
2008 /**
2009 * Indicates the action of a common event that the playing state of Bluetooth A2DP has changed.
2010 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
2011 */
2012 commonEventSupport_.emplace_back(COMMON_EVENT_BLUETOOTH_A2DPSOURCE_PLAYING_STATE_UPDATE);
2013
2014 /**
2015 * Indicates the action of a common event that the AVRCP connection state of Bluetooth A2DP has changed.
2016 */
2017 commonEventSupport_.emplace_back(COMMON_EVENT_BLUETOOTH_A2DPSOURCE_AVRCP_CONNECT_STATE_UPDATE);
2018
2019 /**
2020 * Indicates the action of a common event that the audio codec state of Bluetooth A2DP has changed.
2021 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
2022 */
2023 commonEventSupport_.emplace_back(COMMON_EVENT_BLUETOOTH_A2DPSOURCE_CODEC_VALUE_UPDATE);
2024
2025 /**
2026 * Indicates the action of a common event that a remote Bluetooth device has been discovered.
2027 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH and
2028 * ohos.permission.LOCATION permissions.
2029 */
2030 commonEventSupport_.emplace_back(COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_DISCOVERED);
2031
2032 /**
2033 * Indicates the action of a common event that the Bluetooth class of a remote Bluetooth device has changed.
2034 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
2035 */
2036 commonEventSupport_.emplace_back(COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_CLASS_VALUE_UPDATE);
2037
2038 /**
2039 * Indicates the action of a common event that a low level (ACL) connection has been established with a remote
2040 * Bluetooth device.
2041 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
2042 */
2043 commonEventSupport_.emplace_back(COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_ACL_CONNECTED);
2044
2045 /**
2046 * Indicates the action of a common event that a low level (ACL) connection has been disconnected from a remote
2047 * Bluetooth device.
2048 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
2049 */
2050 commonEventSupport_.emplace_back(COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_ACL_DISCONNECTED);
2051
2052 /**
2053 * Indicates the action of a common event that the friendly name of a remote Bluetooth device has been retrieved for
2054 * the first time or has been changed since the last retrieval.
2055 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
2056 */
2057 commonEventSupport_.emplace_back(COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_NAME_UPDATE);
2058
2059 /**
2060 * Indicates the action of a common event that the connection state of a remote Bluetooth device has changed.
2061 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
2062 */
2063 commonEventSupport_.emplace_back(COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_PAIR_STATE);
2064
2065 /**
2066 * Indicates the action of a common event that the battery level of a remote Bluetooth device has been retrieved
2067 * for the first time or has been changed since the last retrieval.
2068 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
2069 */
2070 commonEventSupport_.emplace_back(COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_BATTERY_VALUE_UPDATE);
2071
2072 /**
2073 * Indicates the action of a common event about the SDP state of a remote Bluetooth device.
2074 */
2075 commonEventSupport_.emplace_back(COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_SDP_RESULT);
2076
2077 /**
2078 * Indicates the action of a common event about the UUID connection state of a remote Bluetooth device.
2079 * To subscribe to this common event, your application must have the ohos.permission.DISCOVER_BLUETOOTH permission.
2080 */
2081 commonEventSupport_.emplace_back(COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_UUID_VALUE);
2082
2083 /**
2084 * Indicates the action of a common event about the pairing request from a remote Bluetooth device.
2085 * To subscribe to this common event, your application must have the ohos.permission.DISCOVER_BLUETOOTH permission.
2086 */
2087 commonEventSupport_.emplace_back(COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_PAIRING_REQ);
2088
2089 /**
2090 * Indicates the action of a common event that Bluetooth pairing is canceled.
2091 */
2092 commonEventSupport_.emplace_back(COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_PAIRING_CANCEL);
2093
2094 /**
2095 * Indicates the action of a common event about the connection request from a remote Bluetooth device.
2096 */
2097 commonEventSupport_.emplace_back(COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_CONNECT_REQ);
2098
2099 /**
2100 * Indicates the action of a common event about the response to the connection request from a remote Bluetooth
2101 * device.
2102 */
2103 commonEventSupport_.emplace_back(COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_CONNECT_REPLY);
2104
2105 /**
2106 * Indicates the action of a common event that the connection to a remote Bluetooth device has been canceled.
2107 */
2108 commonEventSupport_.emplace_back(COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_CONNECT_CANCEL);
2109
2110 /**
2111 * Indicates the action of a common event that the connection state of a Bluetooth handsfree has changed.
2112 */
2113 commonEventSupport_.emplace_back(COMMON_EVENT_BLUETOOTH_HANDSFREEUNIT_CONNECT_STATE_UPDATE);
2114
2115 /**
2116 * Indicates the action of a common event that the audio state of a Bluetooth handsfree has changed.
2117 */
2118 commonEventSupport_.emplace_back(COMMON_EVENT_BLUETOOTH_HANDSFREEUNIT_AUDIO_STATE_UPDATE);
2119
2120 /**
2121 * Indicates the action of a common event that the audio gateway state of a Bluetooth handsfree has changed.
2122 */
2123 commonEventSupport_.emplace_back(COMMON_EVENT_BLUETOOTH_HANDSFREEUNIT_AG_COMMON_EVENT);
2124
2125 /**
2126 * Indicates the action of a common event that the calling state of a Bluetooth handsfree has changed.
2127 */
2128 commonEventSupport_.emplace_back(COMMON_EVENT_BLUETOOTH_HANDSFREEUNIT_AG_CALL_STATE_UPDATE);
2129
2130 /**
2131 * Indicates the action of a common event that the state of a Bluetooth adapter has been changed, for example,
2132 * Bluetooth has been turned on or off.
2133 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
2134 */
2135 commonEventSupport_.emplace_back(COMMON_EVENT_BLUETOOTH_HOST_STATE_UPDATE);
2136
2137 /**
2138 * Indicates the action of a common event about the requests for the user to allow Bluetooth to be scanned.
2139 */
2140 commonEventSupport_.emplace_back(COMMON_EVENT_BLUETOOTH_HOST_REQ_DISCOVERABLE);
2141
2142 /**
2143 * Indicates the action of a common event about the requests for the user to turn on Bluetooth.
2144 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
2145 */
2146 commonEventSupport_.emplace_back(COMMON_EVENT_BLUETOOTH_HOST_REQ_ENABLE);
2147
2148 /**
2149 * Indicates the action of a common event about the requests for the user to turn off Bluetooth.
2150 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
2151 */
2152 commonEventSupport_.emplace_back(COMMON_EVENT_BLUETOOTH_HOST_REQ_DISABLE);
2153
2154 /**
2155 * Indicates the action of a common event that the Bluetooth scanning mode of a device has changed.
2156 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
2157 */
2158 commonEventSupport_.emplace_back(COMMON_EVENT_BLUETOOTH_HOST_SCAN_MODE_UPDATE);
2159
2160 /**
2161 * Indicates the action of a common event that the Bluetooth scanning has been started on the device.
2162 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
2163 */
2164 commonEventSupport_.emplace_back(COMMON_EVENT_BLUETOOTH_HOST_DISCOVERY_STARTED);
2165
2166 /**
2167 * Indicates the action of a common event that the Bluetooth scanning is finished on the device.
2168 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
2169 */
2170 commonEventSupport_.emplace_back(COMMON_EVENT_BLUETOOTH_HOST_DISCOVERY_FINISHED);
2171
2172 /**
2173 * Indicates the action of a common event that the Bluetooth adapter name of the device has changed.
2174 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
2175 */
2176 commonEventSupport_.emplace_back(COMMON_EVENT_BLUETOOTH_HOST_NAME_UPDATE);
2177
2178 /**
2179 * Indicates the action of a common event that the connection state of Bluetooth A2DP Sink has changed.
2180 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
2181 */
2182 commonEventSupport_.emplace_back(COMMON_EVENT_BLUETOOTH_A2DPSINK_CONNECT_STATE_UPDATE);
2183
2184 /**
2185 * Indicates the action of a common event that the playing state of Bluetooth A2DP Sink has changed.
2186 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
2187 */
2188 commonEventSupport_.emplace_back(COMMON_EVENT_BLUETOOTH_A2DPSINK_PLAYING_STATE_UPDATE);
2189
2190 /**
2191 * Indicates the action of a common event that the audio state of Bluetooth A2DP Sink has changed.
2192 * To subscribe to this common event, your application must have the ohos.permission.USE_BLUETOOTH permission.
2193 */
2194 commonEventSupport_.emplace_back(COMMON_EVENT_BLUETOOTH_A2DPSINK_AUDIO_STATE_UPDATE);
2195
2196 /**
2197 * Indicates the status of the Bluetooth device connect status has been changed.
2198 */
2199 commonEventSupport_.emplace_back(COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_CONNECT_STATUS_VALUE);
2200
2201 /**
2202 * Indicates the action of a common event that the state of the device NFC adapter has changed.
2203 * This is a protected common event, which can be sent only by the system.
2204 */
2205 commonEventSupport_.emplace_back(COMMON_EVENT_NFC_ACTION_ADAPTER_STATE_CHANGED);
2206
2207 /**
2208 * Indicates the action of a common event that the NFC RF field is detected to be in the enabled state.
2209 * To subscribe to this common event, your application must have the ohos.permission.MANAGE_SECURE_SETTINGS
2210 * permission.
2211 * This is a protected common event, which can be sent only by the system.
2212 */
2213 commonEventSupport_.emplace_back(COMMON_EVENT_NFC_ACTION_RF_FIELD_ON_DETECTED);
2214
2215 /**
2216 * Indicates the action of a common event that the NFC RF field is detected to be in the disabled state.
2217 * To subscribe to this common event, your application must have the ohos.permission.MANAGE_SECURE_SETTINGS
2218 * permission.
2219 * This is a protected common event, which can be sent only by the system.
2220 */
2221 commonEventSupport_.emplace_back(COMMON_EVENT_NFC_ACTION_RF_FIELD_OFF_DETECTED);
2222
2223 /**
2224 * Indicates the action of a common event that the system stops charging the battery.
2225 * This is a protected common event, which can be sent only by the system.
2226 */
2227 commonEventSupport_.emplace_back(COMMON_EVENT_DISCHARGING);
2228
2229 /**
2230 * Indicates the action of a common event that the system starts charging the battery.
2231 * This is a protected common event, which can be sent only by the system.
2232 */
2233 commonEventSupport_.emplace_back(COMMON_EVENT_CHARGING);
2234
2235 /**
2236 * Indicates the action of a common event that a charge type has been updated.
2237 * This is a protected common event, which can be sent only by the system.
2238 */
2239 commonEventSupport_.emplace_back(COMMON_EVENT_CHARGE_TYPE_CHANGED);
2240
2241 /**
2242 * Indicates the action of a common event that the system idle mode has changed.
2243 * This is a protected common event, which can be sent only by the system.
2244 */
2245 commonEventSupport_.emplace_back(COMMON_EVENT_DEVICE_IDLE_MODE_CHANGED);
2246
2247 /**
2248 * Indicates the action of a common event that the list of exempt applications is updated in the idle mode.
2249 * This is a protected common event, which can be sent only by the system.
2250 */
2251 commonEventSupport_.emplace_back(COMMON_EVENT_DEVICE_IDLE_EXEMPTION_LIST_UPDATED);
2252
2253 /**
2254 * Indicates the action of a common event that the power save mode of the system has changed.
2255 * This is a protected common event, which can be sent only by the system.
2256 */
2257 commonEventSupport_.emplace_back(COMMON_EVENT_POWER_SAVE_MODE_CHANGED);
2258
2259 /**
2260 * Indicates the action of a common event that a user has been added to the system.
2261 * To subscribe to this common event, your application must have the ohos.permission.MANAGE_LOCAL_ACCOUNTS
2262 * permission.
2263 */
2264 commonEventSupport_.emplace_back(COMMON_EVENT_USER_ADDED);
2265 /**
2266 * Indicates the action of a common event that a user has been removed from the system.
2267 * To subscribe to this common event, your application must have the ohos.permission.MANAGE_LOCAL_ACCOUNTS
2268 * permission.
2269 */
2270 commonEventSupport_.emplace_back(COMMON_EVENT_USER_REMOVED);
2271
2272 /**
2273 * Indicates the action of a common event that an ability has been added.
2274 * To subscribe to this common event, your application must have the ohos.permission.LISTEN_BUNDLE_CHANGE
2275 * permission.
2276 * This is a protected common event, which can be sent only by the system.
2277 */
2278 commonEventSupport_.emplace_back(COMMON_EVENT_ABILITY_ADDED);
2279
2280 /**
2281 * Indicates the action of a common event that an ability has been removed.
2282 * To subscribe to this common event, your application must have the ohos.permission.LISTEN_BUNDLE_CHANGE
2283 * permission.
2284 * This is a protected common event, which can be sent only by the system.
2285 */
2286 commonEventSupport_.emplace_back(COMMON_EVENT_ABILITY_REMOVED);
2287
2288 /**
2289 * Indicates the action of a common event that an ability has been updated.
2290 * To subscribe to this common event, your application must have the ohos.permission.LISTEN_BUNDLE_CHANGE
2291 * permission.
2292 * This is a protected common event, which can be sent only by the system.
2293 */
2294 commonEventSupport_.emplace_back(COMMON_EVENT_ABILITY_UPDATED);
2295
2296 /**
2297 * Indicates the action of a common event that the location mode of the system has changed.
2298 * This is a protected common event, which can be sent only by the system.
2299 */
2300 commonEventSupport_.emplace_back(COMMON_EVENT_LOCATION_MODE_STATE_CHANGED);
2301
2302 /**
2303 * Indicates the action of a common event that the in-vehicle infotainment (IVI) system of a vehicle is sleeping.
2304 * This is a protected common event, which can be sent only by the system.
2305 */
2306 commonEventSupport_.emplace_back(COMMON_EVENT_IVI_SLEEP);
2307
2308 /**
2309 * The ivi is slept and notify the app stop playing.
2310 * This is a protected common event that can only be sent by system.
2311 */
2312 commonEventSupport_.emplace_back(COMMON_EVENT_IVI_PAUSE);
2313
2314 /**
2315 * Indicates the action of a common event that a third-party application is instructed to pause the current work.
2316 * This is a protected common event, which can be sent only by the system.
2317 */
2318 commonEventSupport_.emplace_back(COMMON_EVENT_IVI_STANDBY);
2319
2320 /**
2321 * Indicates the action of a common event that a third-party application is instructed to save its last mode.
2322 * This is a protected common event, which can be sent only by the system.
2323 */
2324 commonEventSupport_.emplace_back(COMMON_EVENT_IVI_LASTMODE_SAVE);
2325
2326 /**
2327 * Indicates the action of a common event that the voltage of the vehicle power system is abnormal.
2328 * This is a protected common event, which can be sent only by the system.
2329 */
2330 commonEventSupport_.emplace_back(COMMON_EVENT_IVI_VOLTAGE_ABNORMAL);
2331
2332 /**
2333 * The ivi temperature is too high.
2334 * This is a protected common event that can only be sent by system.
2335 * This common event will be delete later, please use COMMON_EVENT_IVI_TEMPERATURE_ABNORMAL.
2336 */
2337 commonEventSupport_.emplace_back(COMMON_EVENT_IVI_HIGH_TEMPERATURE);
2338
2339 /**
2340 * The ivi temperature is extreme high.
2341 * This is a protected common event that can only be sent by system.
2342 * This common event will be delete later, please use COMMON_EVENT_IVI_TEMPERATURE_ABNORMAL.
2343 */
2344 commonEventSupport_.emplace_back(COMMON_EVENT_IVI_EXTREME_TEMPERATURE);
2345
2346 /**
2347 * Indicates the action of a common event that the in-vehicle system has an extreme temperature.
2348 * This is a protected common event, which can be sent only by the system.
2349 */
2350 commonEventSupport_.emplace_back(COMMON_EVENT_IVI_TEMPERATURE_ABNORMAL);
2351
2352 /**
2353 * Indicates the action of a common event that the voltage of the vehicle power system is restored to normal.
2354 * This is a protected common event, which can be sent only by the system.
2355 */
2356 commonEventSupport_.emplace_back(COMMON_EVENT_IVI_VOLTAGE_RECOVERY);
2357
2358 /**
2359 * Indicates the action of a common event that the temperature of the in-vehicle system is restored to normal.
2360 * This is a protected common event, which can be sent only by the system.
2361 */
2362 commonEventSupport_.emplace_back(COMMON_EVENT_IVI_TEMPERATURE_RECOVERY);
2363
2364 /**
2365 * Indicates the action of a common event that the battery service is active.
2366 * This is a protected common event, which can be sent only by the system.
2367 */
2368 commonEventSupport_.emplace_back(COMMON_EVENT_IVI_ACTIVE);
2369
2370 /**
2371 * The usb state changed.
2372 * This is a protected common event that can only be sent by system.
2373 */
2374 commonEventSupport_.emplace_back(COMMON_EVENT_USB_STATE);
2375
2376 /**
2377 * The usb port changed.
2378 * This is a protected common event that can only be sent by system.
2379 */
2380 commonEventSupport_.emplace_back(COMMON_EVENT_USB_PORT_CHANGED);
2381
2382 /**
2383 * Indicates the action of a common event that a USB device has been attached when the user device functions as a
2384 * USB host.
2385 * This is a protected common event, which can be sent only by the system.
2386 */
2387 commonEventSupport_.emplace_back(COMMON_EVENT_USB_DEVICE_ATTACHED);
2388
2389 /**
2390 * Indicates the action of a common event that a USB device has been detached when the user device functions as a
2391 * USB host.
2392 * This is a protected common event, which can be sent only by the system.
2393 */
2394 commonEventSupport_.emplace_back(COMMON_EVENT_USB_DEVICE_DETACHED);
2395
2396 /**
2397 * Indicates the action of a common event that a USB accessory has been attached.
2398 * This is a protected common event, which can be sent only by the system.
2399 */
2400 commonEventSupport_.emplace_back(COMMON_EVENT_USB_ACCESSORY_ATTACHED);
2401
2402 /**
2403 * Indicates the action of a common event that a USB accessory has been detached.
2404 * This is a protected common event, which can be sent only by the system.
2405 */
2406 commonEventSupport_.emplace_back(COMMON_EVENT_USB_ACCESSORY_DETACHED);
2407
2408 /**
2409 * The storage space is low.
2410 * This is a protected common event that can only be sent by system.
2411 */
2412 commonEventSupport_.emplace_back(COMMON_EVENT_DEVICE_STORAGE_LOW);
2413
2414 /**
2415 * The storage space is normal.
2416 * This is a protected common event that can only be sent by system.
2417 */
2418 commonEventSupport_.emplace_back(COMMON_EVENT_DEVICE_STORAGE_OK);
2419
2420 /**
2421 * The storage space is full.
2422 * This is a protected common event that can only be sent by system.
2423 */
2424 commonEventSupport_.emplace_back(COMMON_EVENT_DEVICE_STORAGE_FULL);
2425
2426 /**
2427 * The network connection was changed.
2428 * This is a protected common event that can only be sent by system.
2429 */
2430 commonEventSupport_.emplace_back(COMMON_EVENT_CONNECTIVITY_CHANGE);
2431
2432 /**
2433 * The global http proxy was changed.
2434 * This is a protected common event that can only be sent by system.
2435 */
2436 commonEventSupport_.emplace_back(COMMON_EVENT_HTTP_PROXY_CHANGE);
2437
2438 /**
2439 * Indicates the action of a common event that an external storage device was removed.
2440 * To subscribe to this common event, your application must have the ohos.permission.STORAGE_MANAGER permission.
2441 * This common event can be published only by system applications.
2442 */
2443 commonEventSupport_.emplace_back(COMMON_EVENT_DISK_REMOVED);
2444
2445 /**
2446 * Indicates the action of a common event that an external storage device was unmounted.
2447 * To subscribe to this common event, your application must have the ohos.permission.STORAGE_MANAGER permission.
2448 * This common event can be published only by system applications.
2449 */
2450 commonEventSupport_.emplace_back(COMMON_EVENT_DISK_UNMOUNTED);
2451
2452 /**
2453 * Indicates the action of a common event that an external storage device was mounted.
2454 * To subscribe to this common event, your application must have the ohos.permission.STORAGE_MANAGER permission.
2455 * This common event can be published only by system applications.
2456 */
2457 commonEventSupport_.emplace_back(COMMON_EVENT_DISK_MOUNTED);
2458
2459 /**
2460 * Indicates the action of a common event that an external storage device was removed without being unmounted.
2461 * To subscribe to this common event, your application must have the ohos.permission.STORAGE_MANAGER permission.
2462 * This common event can be published only by system applications.
2463 */
2464 commonEventSupport_.emplace_back(COMMON_EVENT_DISK_BAD_REMOVAL);
2465
2466 /**
2467 * Indicates the action of a common event that an external storage device becomes unmountable.
2468 * To subscribe to this common event, your application must have the ohos.permission.STORAGE_MANAGER permission.
2469 * This common event can be published only by system applications.
2470 */
2471 commonEventSupport_.emplace_back(COMMON_EVENT_DISK_UNMOUNTABLE);
2472
2473 /**
2474 * Indicates the action of a common event that an external storage device was ejected.
2475 * To subscribe to this common event, your application must have the ohos.permission.STORAGE_MANAGER permission.
2476 * This common event can be published only by system applications.
2477 */
2478 commonEventSupport_.emplace_back(COMMON_EVENT_DISK_EJECT);
2479
2480 /**
2481 * Indicates the action of a common event that an external storage device was removed.
2482 * To subscribe to this common event, your application must have the ohos.permission.STORAGE_MANAGER permission.
2483 * This common event can be published only by system applications.
2484 */
2485 commonEventSupport_.emplace_back(COMMON_EVENT_VOLUME_REMOVED);
2486
2487 /**
2488 * Indicates the action of a common event that an external storage device was unmounted.
2489 * To subscribe to this common event, your application must have the ohos.permission.STORAGE_MANAGER permission.
2490 * This common event can be published only by system applications.
2491 */
2492 commonEventSupport_.emplace_back(COMMON_EVENT_VOLUME_UNMOUNTED);
2493
2494 /**
2495 * Indicates the action of a common event that an external storage device was mounted.
2496 * To subscribe to this common event, your application must have the ohos.permission.STORAGE_MANAGER permission.
2497 * This common event can be published only by system applications.
2498 */
2499 commonEventSupport_.emplace_back(COMMON_EVENT_VOLUME_MOUNTED);
2500
2501 /**
2502 * Indicates the action of a common event that an external storage device was removed without being unmounted.
2503 * To subscribe to this common event, your application must have the ohos.permission.STORAGE_MANAGER permission.
2504 * This common event can be published only by system applications.
2505 */
2506 commonEventSupport_.emplace_back(COMMON_EVENT_VOLUME_BAD_REMOVAL);
2507
2508 /**
2509 * Indicates the action of a common event that an external storage device was ejected.
2510 * To subscribe to this common event, your application must have the ohos.permission.STORAGE_MANAGER permission.
2511 * This common event can be published only by system applications.
2512 */
2513 commonEventSupport_.emplace_back(COMMON_EVENT_VOLUME_EJECT);
2514
2515 /**
2516 * Indicates the action of a common event that the account visible changed.
2517 * To subscribe to this common event, your application must have the ohos.permission.GET_APP_ACCOUNTS permission.
2518 * This is a protected common event, which can be sent only by the system.
2519 */
2520 commonEventSupport_.emplace_back(COMMON_EVENT_VISIBLE_ACCOUNTS_UPDATED);
2521
2522 /**
2523 * Indicates the action of a common event that the account is deleted.
2524 * To subscribe to this common event, your application must have the ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
2525 * permission.
2526 * This is a protected common event, which can be sent only by the system.
2527 */
2528 commonEventSupport_.emplace_back(COMMON_EVENT_ACCOUNT_DELETED);
2529
2530 /**
2531 * Indicates the action of a common event that the foundation is ready.
2532 * To subscribe to this common event, your application must have the ohos.permission.RECEIVER_STARTUP_COMPLETED
2533 * permission.
2534 * This is a protected common event, which can be sent only by the system.
2535 */
2536 commonEventSupport_.emplace_back(COMMON_EVENT_FOUNDATION_READY);
2537
2538 /**
2539 * Indicates the action of a common event that the default voice subscription has changed.
2540 * This is a protected common event that can only be sent by system.
2541 */
2542 commonEventSupport_.emplace_back(COMMON_EVENT_SIM_CARD_DEFAULT_VOICE_SUBSCRIPTION_CHANGED);
2543
2544 /**
2545 * Indicates the action of a common event that the phone SIM card state has changed.
2546 * This is a protected common event that can only be sent by system.
2547 */
2548 commonEventSupport_.emplace_back(COMMON_EVENT_SIM_STATE_CHANGED);
2549
2550 /**
2551 * Indicates the action of a common event that the airplane mode of the device has changed.
2552 * This common event can be triggered only by system applications.
2553 */
2554 commonEventSupport_.emplace_back(COMMON_EVENT_AIRPLANE_MODE_CHANGED);
2555
2556 /**
2557 * Indicates the action of a common event that a new sms bas been received by the device.
2558 * To subscribe to this common event, your application must have the ohos.permission.RECEIVE_SMS permission.
2559 * This common event can be triggered only by system.
2560 */
2561 commonEventSupport_.emplace_back(COMMON_EVENT_SMS_RECEIVE_COMPLETED);
2562
2563 /**
2564 * Indicates the action of a common event that a new sms emergency cell broadcast bas been received by the device.
2565 * This common event can be triggered only by system.
2566 */
2567 commonEventSupport_.emplace_back(COMMON_EVENT_SMS_EMERGENCY_CB_RECEIVE_COMPLETED);
2568
2569 /**
2570 * Indicates the action of a common event that a new sms normal cell broadcast bas been received by the device.
2571 * This common event can be triggered only by system.
2572 */
2573 commonEventSupport_.emplace_back(COMMON_EVENT_SMS_CB_RECEIVE_COMPLETED);
2574
2575 /**
2576 * Indicates the action of a common event that a STK command has been received by the device.
2577 * This common event can be triggered only by system.
2578 */
2579 commonEventSupport_.emplace_back(COMMON_EVENT_STK_COMMAND);
2580
2581 /**
2582 * Indicates the action of a common event that STK session end.
2583 * This common event can be triggered only by system.
2584 */
2585 commonEventSupport_.emplace_back(COMMON_EVENT_STK_SESSION_END);
2586
2587 /**
2588 * Indicates the action of a common event that the STK phone card state has changed.
2589 * This common event can be triggered only by system.
2590 */
2591 commonEventSupport_.emplace_back(COMMON_EVENT_STK_CARD_STATE_CHANGED);
2592
2593 /**
2594 * Indicates the action of a common event that an alpha string during call control has been received by the device.
2595 * This common event can be triggered only by system.
2596 */
2597 commonEventSupport_.emplace_back(COMMON_EVENT_STK_ALPHA_IDENTIFIER);
2598
2599 /**
2600 * Indicates the action of a common event that the spn display information has been updated.
2601 * This common event can be triggered only by system.
2602 */
2603 commonEventSupport_.emplace_back(COMMON_EVENT_SPN_INFO_CHANGED);
2604
2605 /**
2606 * Indicates the action of a common event that the NITZ time has been updated.
2607 * This is a protected common event that can only be sent by system.
2608 */
2609 commonEventSupport_.emplace_back(COMMON_EVENT_NITZ_TIME_CHANGED);
2610
2611 /**
2612 * Indicates the action of a common event that the NITZ time zone has been updated.
2613 * This is a protected common event that can only be sent by system.
2614 */
2615 commonEventSupport_.emplace_back(COMMON_EVENT_NITZ_TIMEZONE_CHANGED);
2616
2617 /**
2618 * Indicates the action of a common event that a new sms wappush has been received by the device.
2619 * This is a protected common event that can only be sent by system.
2620 */
2621 commonEventSupport_.emplace_back(COMMON_EVENT_SMS_WAPPUSH_RECEIVE_COMPLETED);
2622
2623 /**
2624 * Indicates the action of a common event that the operator config has been updated.
2625 * This is a protected common event that can only be sent by system.
2626 */
2627 commonEventSupport_.emplace_back(COMMON_EVENT_OPERATOR_CONFIG_CHANGED);
2628
2629 /**
2630 * Indicates the action of a common event that the notification slot has been updated.
2631 * This is a protected common event that can only be sent by system.
2632 */
2633 commonEventSupport_.emplace_back(COMMON_EVENT_SLOT_CHANGE);
2634
2635 /**
2636 * Only for test case.
2637 */
2638 commonEventSupport_.emplace_back(COMMON_EVENT_TEST_ACTION1);
2639
2640 /**
2641 * Only for test case.
2642 */
2643 commonEventSupport_.emplace_back(COMMON_EVENT_TEST_ACTION2);
2644
2645 /**
2646 * Indicates the action of a common event that the default SMS subscription has been changed.
2647 * This is a protected common event that can only be sent by system.
2648 */
2649 commonEventSupport_.emplace_back(COMMON_EVENT_SIM_CARD_DEFAULT_SMS_SUBSCRIPTION_CHANGED);
2650
2651 /**
2652 * Indicates the action of a common event that the default data subscription has been changed.
2653 * This is a protected common event that can only be sent by system.
2654 */
2655 commonEventSupport_.emplace_back(COMMON_EVENT_SIM_CARD_DEFAULT_DATA_SUBSCRIPTION_CHANGED);
2656
2657 /**
2658 * Indicates the action of a common event that the call state has been changed.
2659 * To subscribe to this protected common event, your application must have the ohos.permission.GET_TELEPHONY_STATE
2660 * permission.
2661 * This is a protected common event that can only be sent by system.
2662 */
2663 commonEventSupport_.emplace_back(COMMON_EVENT_CALL_STATE_CHANGED);
2664
2665 /**
2666 * Indicates the action of a common event that the default main subscription has been changed.
2667 * This is a protected common event that can only be sent by system.
2668 */
2669 commonEventSupport_.emplace_back(COMMON_EVENT_SIM_CARD_DEFAULT_MAIN_SUBSCRIPTION_CHANGED);
2670
2671 /**
2672 * Indicates the action of a common event that the status of setting primary slot has been changed.
2673 * This is a protected common event that can only be sent by system.
2674 */
2675 commonEventSupport_.emplace_back(COMMON_EVENT_SET_PRIMARY_SLOT_STATUS);
2676
2677 /**
2678 * Indicates the action of a common event that the roaming status of main card has been changed.
2679 * This is a protected common event that can only be sent by system.
2680 */
2681 commonEventSupport_.emplace_back(COMMON_EVENT_PRIMARY_SLOT_ROAMING);
2682
2683 /**
2684 * Indicates the action of a common event that the cellular data state has been changed.
2685 * This is a protected common event that can only be sent by system.
2686 */
2687 commonEventSupport_.emplace_back(COMMON_EVENT_CELLULAR_DATA_STATE_CHANGED);
2688
2689 /**
2690 * Indicates the action of a common event that the signal info has been changed.
2691 * This is a protected common event that can only be sent by system.
2692 */
2693 commonEventSupport_.emplace_back(COMMON_EVENT_SIGNAL_INFO_CHANGED);
2694
2695 /**
2696 * Indicates the action of a common event that the network state has been changed.
2697 * This is a protected common event that can only be sent by system.
2698 */
2699 commonEventSupport_.emplace_back(COMMON_EVENT_NETWORK_STATE_CHANGED);
2700
2701 /**
2702 * Indicates the action of a common event that the incoming call has been missed.
2703 * To subscribe to this protected common event, your application must have the ohos.permission.GET_TELEPHONY_STATE
2704 * permission.
2705 * This is a protected common event that can only be sent by system.
2706 */
2707 commonEventSupport_.emplace_back(COMMON_EVENT_INCOMING_CALL_MISSED);
2708
2709 /**
2710 * Indicate the result of quick fix apply.
2711 * This common event can be triggered only by system.
2712 */
2713 commonEventSupport_.emplace_back(COMMON_EVENT_QUICK_FIX_APPLY_RESULT);
2714
2715 /**
2716 * Indicate the result of quick fix revoke.
2717 * This common event can be triggered only by system.
2718 */
2719 commonEventSupport_.emplace_back(COMMON_EVENT_QUICK_FIX_REVOKE_RESULT);
2720
2721 /**
2722 * Indicates the action of a common event that radio state change.
2723 * To subscribe to this protected common event that can only be sent by system.
2724 */
2725 commonEventSupport_.emplace_back(COMMON_EVENT_RADIO_STATE_CHANGE);
2726
2727 /**
2728 * Indicates the action of a common event about a login of a distributed account.
2729 * This is a protected common event that can only be sent by system.
2730 */
2731 commonEventSupport_.emplace_back(COMMON_EVENT_DISTRIBUTED_ACCOUNT_LOGIN);
2732
2733 /**
2734 * Indicates the action of a common event about a logout of a distributed account.
2735 * This is a protected common event that can only be sent by system.
2736 */
2737 commonEventSupport_.emplace_back(COMMON_EVENT_DISTRIBUTED_ACCOUNT_LOGOUT);
2738
2739 /**
2740 * Indicates the action of a common event that the token of a distributed account is invalid.
2741 * This is a protected common event that can only be sent by system.
2742 */
2743 commonEventSupport_.emplace_back(COMMON_EVENT_DISTRIBUTED_ACCOUNT_TOKEN_INVALID);
2744
2745 /**
2746 * Indicates the action of a common event about a logoff of a distributed account.
2747 * This is a protected common event that can only be sent by system.
2748 */
2749 commonEventSupport_.emplace_back(COMMON_EVENT_DISTRIBUTED_ACCOUNT_LOGOFF);
2750
2751 /**
2752 * Indicates the action of a common event that the user information has been updated.
2753 * This is a protected common event that can only be sent by system.
2754 */
2755 commonEventSupport_.emplace_back(COMMON_EVENT_USER_INFO_UPDATED);
2756
2757 /**
2758 * Indicate the action of a common event that domain account status has been changed.
2759 * This is a protected common event that can only be sent by system.
2760 */
2761 commonEventSupport_.emplace_back(COMMON_EVENT_DOMAIN_ACCOUNT_STATUS_CHANGED);
2762
2763 /**
2764 * Indicates the action of a common event that the screen lock.
2765 * This is a protected common event that can only be sent by system.
2766 */
2767 commonEventSupport_.emplace_back(COMMON_EVENT_SCREEN_LOCKED);
2768
2769 /**
2770 * Indicates the action of a common event that the screen unlock.
2771 * This is a protected common event that can only be sent by system.
2772 */
2773 commonEventSupport_.emplace_back(COMMON_EVENT_SCREEN_UNLOCKED);
2774
2775 /**
2776 * Indicates the action of a common event that the call audio quality information has been updated.
2777 * This is a protected common event that can only be sent by system.
2778 */
2779 commonEventSupport_.emplace_back(COMMON_EVENT_AUDIO_QUALITY_CHANGE);
2780
2781 /**
2782 * Indicates the action of a common event about special code.
2783 * This is a protected common event that can only be sent by system.
2784 */
2785 commonEventSupport_.emplace_back(COMMON_EVENT_SPECIAL_CODE);
2786
2787 /**
2788 * Indicates the action of a common event about reminder
2789 * When the user clicks the button and the application (creator)
2790 * is in the foreground, a event is sent. event data is: button type,reminder id
2791 */
2792 commonEventSupport_.emplace_back(COMMON_EVENT_REMINDER_STATUS_CHANGE);
2793
2794 /**
2795 * Indicates that the privacy status is changed.
2796 * This is a protected common event that can only be sent by system.
2797 */
2798 commonEventSupport_.emplace_back(COMMON_EVENT_PRIVACY_STATE_CHANGED);
2799
2800 /**
2801 * This common event means that minors mode is enabled.
2802 * This is a protected common event that can only be sent by system.
2803 */
2804 commonEventSupport_.emplace_back(COMMON_EVENT_MINORSMODE_ON);
2805
2806 /**
2807 * This common event means that minors mode is disabled.
2808 * This is a protected common event that can only be sent by system.
2809 */
2810 commonEventSupport_.emplace_back(COMMON_EVENT_MINORSMODE_OFF);
2811
2812 /**
2813 * Indicates that the file access state is changed.
2814 * This is a protected common event that can only be sent by system.
2815 */
2816 commonEventSupport_.emplace_back(COMMON_EVENT_SCREEN_LOCK_FILE_ACCESS_STATE_CHANGED);
2817
2818 /**
2819 * Indicates the action of a common event that the bundle resources have been changed.
2820 * To subscribe to this common event, your application must have the ohos.permission.GET_BUNDLE_RESOURCES
2821 * permission.
2822 * This is a protected common event, which can be sent only by the system.
2823 */
2824 commonEventSupport_.emplace_back(COMMON_EVENT_BUNDLE_RESOURCES_CHANGED);
2825
2826 /**
2827 * This common event means that datashare is ready.
2828 * This is a protected common event that can only be sent by system.
2829 */
2830 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_DATA_SHARE_READY);
2831
2832 /**
2833 * This common event means that overlay package is added.
2834 * This is a protected common event that can only be sent by system.
2835 */
2836 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_OVERLAY_PACKAGE_ADDED);
2837
2838 /**
2839 * This common event means that overlay package is changed.
2840 * This is a protected common event that can only be sent by system.
2841 */
2842 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_OVERLAY_PACKAGE_CHANGED);
2843
2844 /**
2845 * This common event means that disposed rule is added.
2846 * This is a protected common event that can only be sent by system.
2847 */
2848 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_DISPOSED_RULE_ADDED);
2849
2850 /**
2851 * This common event means that disposed rule is deleted.
2852 * This is a protected common event that can only be sent by system.
2853 */
2854 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_DISPOSED_RULE_DELETED);
2855
2856 /**
2857 * Indicates that the second mount is ready.
2858 * This is a protected common event that can only be sent by system.
2859 */
2860 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_SECOND_MOUNTED);
2861
2862 /**
2863 * Indicates that an application begins to restored.
2864 * This is a protected common event that can only be sent by system.
2865 */
2866 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_RESTORE_START);
2867
2868 /**
2869 * This common event means that vpn connection status has been changed.
2870 * This is a protected common event that can only be sent by system.
2871 */
2872 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_VPN_CONNECTION_STATUS_CHANGED);
2873
2874 /**
2875 * Indicates that the managed browser policy is changed.
2876 * This is a protected common event that can only be sent by system.
2877 */
2878 commonEventSupport_.emplace_back(CommonEventSupport::COMMON_EVENT_MANAGED_BROWSER_POLICY_CHANGED);
2879 return;
2880 }
2881
IsSystemEvent(std::string & str)2882 bool CommonEventSupport::IsSystemEvent(std::string &str)
2883 {
2884 EVENT_LOGD("enter");
2885
2886 std::vector<std::string>::iterator iter = find(commonEventSupport_.begin(), commonEventSupport_.end(), str);
2887 if (iter != commonEventSupport_.end()) {
2888 return true;
2889 }
2890 return false;
2891 }
2892 } // namespace EventFwk
2893 } // namespace OHOS
2894