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