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