未验证 提交 f03f6749 编写于 作者: O openharmony_ci 提交者: Gitee

!20484 翻译完成 18147+19438+19434+19519+19608+19703+19318+19575:系统公共事件整改

Merge pull request !20484 from ester.zhou/TR-19703
# Common Events of the Account Subsystem
This document lists the common system events provided by the account subsystem to applications. Applications can use [APIs](../js-apis-commonEventManager.md) to subscribe to common system events.
## COMMON_EVENT_USER_ADDED
Indicates that a user has been added to the system.
- Value: usual.event.USER_ADDED
- Required subscriber permissions: ohos.permission.MANAGE_LOCAL_ACCOUNTS
When a system account is created, the event notification service is triggered to publish this event carrying the system account ID.
APIs related to this event: **createOsAccount** and **createOsAccountForDomain**. These APIs are system APIs. For details, see [@ohos.account.osAccount (OS Account Management)](../js-apis-osAccount.md).
## COMMON_EVENT_USER_REMOVED
Indicates that a user has been removed from the system.
- Value: usual.event.USER_REMOVED
- Required subscriber permissions: ohos.permission.MANAGE_LOCAL_ACCOUNTS
When a system account is removed, the event notification service is triggered to publish this event carrying the system account ID.
APIs related to this event: **removeOsAccount**. This API is a system API. For details, see [@ohos.account.osAccount (OS Account Management)](../js-apis-osAccount.md).
## COMMON_EVENT_DOMAIN_ACCOUNT_STATUS_CHANGED<sup>10+<sup>
Indicates that the status of the domain account status changes.
- Value: usual.event.DOMAIN_ACCOUNT_STATUS_CHANGED
- Required subscriber permissions: ohos.permission.GET_LOCAL_ACCOUNTS
When a domain user account is authenticated, deleted, or has the token updated, the event notification service is triggered to publish this event carrying the system account ID, domain name, and account status.
APIs related to this event: **removeOsAccount**, **DomainAccountManager.auth**, and **updateAccountToken**. These APIs are system APIs. For details, see [@ohos.account.osAccount (OS Account Management)](../js-apis-osAccount.md).
## COMMON_EVENT_USER_SWITCHED
Indicates that user switching is in progress.
- Value: usual.event.USER_SWITCHED
- Required subscriber permissions: ohos.permission.MANAGE_LOCAL_ACCOUNTS
When the system account is switched, the event notification service is triggered to publish this event carrying the system account ID.
APIs related to this event: **activateOsAccount**. This API is a system API. For details, see [@ohos.account.osAccount (OS Account Management)](../js-apis-osAccount.md).
## COMMON_EVENT_USER_INFO_UPDATED<sup>9+<sup>
Indicates that the user information has been updated.
- Value: **usual.event.USER_INFO_UPDATED**
- Required subscriber permissions: none
When the distributed account information, system account profile picture, or system account name is changed, the event notification service is triggered to publish this event carrying the system account ID.
APIs related to this event: **setOsAccountName**, **setOsAccountProfilePhoto**, and **setOsAccountDistributedInfon**. The first two are system APIs, and the last is a public API. For details, see [@ohos.account.osAccount (OS Account Management)](../js-apis-osAccount.md).
## COMMON_EVENT_DISTRIBUTED_ACCOUNT_LOGIN
(Reserved, not supported yet) Indicates a successful login to a distributed account.
- Value: usual.event.DISTRIBUTED_ACCOUNT_LOGIN
- Required subscriber permissions: none
## COMMON_EVENT_DISTRIBUTED_ACCOUNT_LOGOUT
(Reserved, not supported yet) Indicates a successful logout of a distributed account.
- Value: usual.event.DISTRIBUTED_ACCOUNT_LOGOUT
- Required subscriber permissions: none
## COMMON_EVENT_DISTRIBUTED_ACCOUNT_TOKEN_INVALID
(Reserved, not supported yet) Indicates the token of a distributed account is invalid.
- Value: usual.event.DISTRIBUTED_ACCOUNT_TOKEN_INVALID
- Required subscriber permissions: none
## COMMON_EVENT_DISTRIBUTED_ACCOUNT_LOGOFF
(Reserved, not supported yet) Indicates that a distributed account is deregistered.
- Value: usual.event.DISTRIBUTED_ACCOUNT_LOGOFF
- Required subscriber permissions: none
# Common Events of the File Management Subsystem
This document lists the common system events provided by the file management subsystem to applications. Applications can use [APIs](../js-apis-commonEventManager.md) to subscribe to common system events.
## COMMON_EVENT_VOLUME_REMOVED<sup>9+<sup>
Indicates that an external storage device was removed.
- Value: usual.event.data.VOLUME_REMOVED
- Required subscriber permissions: ohos.permission.STORAGE_MANAGER
When an external storage device is removed, the event notification service is triggered to publish this event.
## COMMON_EVENT_VOLUME_UNMOUNTED<sup>9+<sup>
Indicates that an external storage device was unmounted.
- Value: usual.event.data.VOLUME_UNMOUNTED
- Required subscriber permissions: ohos.permission.STORAGE_MANAGER
When an external storage device is successfully unmounted by calling [unmount](../js-apis-file-volumemanager.md) or by removing the device, the event notification service is triggered to publish this event.
## COMMON_EVENT_VOLUME_MOUNTED<sup>9+<sup>
Indicates that an external storage device was mounted.
- Value: usual.event.data.VOLUME_MOUNTED
- Required subscriber permissions: ohos.permission.STORAGE_MANAGER
When an external storage device is mounted by calling [mount](../js-apis-file-volumemanager.md) or by inserting the device, the event notification service is triggered to publish this event.
## COMMON_EVENT_VOLUME_BAD_REMOVAL<sup>9+<sup>
Indicates that an external storage device was removed without being unmounted.
- Value: usual.event.data.VOLUME_BAD_REMOVAL
- Required subscriber permissions: ohos.permission.STORAGE_MANAGER
When an external storage device is directly removed without being umounted, the event notification service is triggered to publish this event.
## COMMON_EVENT_VOLUME_EJECT<sup>9+<sup>
Indicates that an external storage device is about to be ejected.
- Value: usual.event.data.VOLUME_EJECT
- Required subscriber permissions: ohos.permission.STORAGE_MANAGER
When the user calls [unmount](../js-apis-file-volumemanager.md) on a mounted external storage device or removes the device, the event notification service is triggered to publish this event.
# Common Events of the SMS Application
This document lists the common system events provided by the SMS application to applications. Applications can use [APIs](../js-apis-commonEventManager.md) to subscribe to common system events.
## COMMON_EVENT_SMS_RECEIVE_COMPLETED
Indicates that a new SMS message has been received.
- Value: usual.event.SMS_RECEIVE_COMPLETED
- Required subscriber permissions: none
When the device receives a new SMS message, the event notification service is triggered to publish this event.
# Common Events of the Network Management Subsystem
This document lists the common system events provided by the network management subsystem to applications. Applications can use [APIs](../js-apis-commonEventManager.md) to subscribe to common system events.
## COMMON_EVENT_CONNECTIVITY_CHANGE<sup>10+<sup>
Indicates that the network connection state has changed.
- Value: usual.event.CONNECTIVITY_CHANGE
- Required subscriber permissions: none
When the (Ethernet, Wi-Fi, or cellular) network connection state changes (to disconnected, connecting, or connected), the event notification service is triggered to publish this event.
## COMMON_EVENT_AIRPLANE_MODE_CHANGED<sup>10+<sup>
Indicates that the airplane mode state has changed.
- Value: usual.event.AIRPLANE_MODE
- Required subscriber permissions: none
When the airplane mode is set, the event notification service is triggered to publish this event.
## COMMON_EVENT_HTTP_PROXY_CHANGE<sup>10+<sup>
Indicates that the HTTP proxy configuration has changed.
- Value: usual.event.HTTP_PROXY_CHANGE
- Required subscriber permissions: none
When the configuration of the global or network-specific (such as Ethernet and Wi-Fi) HTTP proxy changes, the event notification service is triggered to publish this event.
## COMMON_EVENT_NET_QUOTA_WARNING<sup>10+<sup>
Indicates that the network data usage has reached the alarm threshold.
- Value: usual.event.QUOTA_WARNING
- Required subscriber permissions: none
When the network data usage reaches 80% of the limit, the event notification service is triggered to publish this event.
## COMMON_EVENT_NET_QUOTA_LIMIT_REMINDED<sup>10+<sup>
Indicates that the network data usage has reached the upper limit, and network access is still available.
- Value: usual.event.NET_QUOTA_LIMIT_REMINDED
- Required subscriber permissions: none
When the network data usage reaches the upper limit and the user chooses to continue to use the network, the event notification service is triggered to publish this event.
## COMMON_EVENT_NET_QUOTA_LIMIT<sup>10+<sup>
Indicates that the network data usage has reached the upper limit, and network access becomes unavailable.
- Value: usual.event.NET_QUOTA_LIMIT
- Required subscriber permissions: none
When the network data usage reaches the upper limit and continuing to use the network is not allowed, the event notification service is triggered to publish this event.
# Common Events of the NFC Subsystem
This document lists the common system events provided by the NFC subsystem to applications. Applications can use [APIs](../js-apis-commonEventManager.md) to subscribe to common system events.
## COMMON_EVENT_NFC_ACTION_ADAPTER_STATE_CHANGED
Indicates that the state of the device NFC adapter has changed.
- Value: usual.event.nfc.action.ADAPTER_STATE_CHANGED
- Required subscriber permissions: none
When the state of the device NFC adapter changes, the event notification service is triggered to publish this event.
## COMMON_EVENT_NFC_ACTION_RF_FIELD_ON_DETECTED
Indicates that the NFC RF field is on.
- Value: usual.event.nfc.action.RF_FIELD_ON_DETECTED
- Required subscriber permissions: ohos.permission.MANAGE_SECURE_SETTINGS
When the NFC RF field becomes available, the event notification service is triggered to publish this event.
## COMMON_EVENT_NFC_ACTION_RF_FIELD_OFF_DETECTED
Indicates that the NFC RF field is off.
- Value: usual.event.nfc.action.RF_FIELD_OFF_DETECTED
- Required subscriber permissions: ohos.permission.MANAGE_SECURE_SETTINGS
When the NFC RF field becomes unavailable, the event notification service is triggered to publish this event.
# Common Events of the Power Management Subsystem
This document lists the common system events provided by the power management subsystem to applications. Applications can use [APIs](../js-apis-commonEventManager.md) to subscribe to common system events.
## COMMON_EVENT_BATTERY_CHANGED
Indicates that the charging state, level, and other information about the battery have changed.
- Value: usual.event.BATTERY_CHANGED
- Required subscriber permissions: none
When any of the following information changes, the event notification service is triggered to publish this event: battery level, battery voltage, battery temperature, battery health status, type of the charger connected to the device, maximum current of the charger, maximum voltage of the charger, battery charging status, number of charging times, total battery capacity, remaining battery capacity, battery model, current of the battery, and battery charging type.
## COMMON_EVENT_BATTERY_LOW
Indicates that the battery level is low.
- Value: usual.event.BATTERY_LOW
- Required subscriber permissions: none
When the battery level drops to lower than the low battery level set for the device, the event notification service is triggered to publish this event. For details about how to set the low battery level, see [Battery Level Customization](../../../../device-dev/subsystems/subsys-power-battery-level-customization.md).
## COMMON_EVENT_BATTERY_OKAY
Indicates that the battery level is normal.
- Value: usual.event.BATTERY_OKAY
- Required subscriber permissions: none
When the battery level changes from the low level to normal level, the event notification service is triggered to publish this event.
## COMMON_EVENT_POWER_CONNECTED
Indicates that the device is connected to an external power supply.
- Value: usual.event.POWER_CONNECTED
- Required subscriber permissions: none
When the device connects to an external charger, the event notification service is triggered to publish this event.
## COMMON_EVENT_POWER_DISCONNECTED
Indicates that the device is disconnected from the external power supply.
- Value: usual.event.POWER_DISCONNECTED
- Required subscriber permissions: none
When the device is disconnected from the external power supply, the event notification service is triggered to publish this event.
## COMMON_EVENT_DISCHARGING
Indicates that the system stops charging the battery.
- Value: usual.event.DISCHARGING
- Required subscriber permissions: none
When the system stops charging the battery, the event notification service is triggered to publish this event.
## COMMON_EVENT_CHARGING
Indicates that the system starts charging the battery.
- Value: usual.event.CHARGING
- Required subscriber permissions: none
When the system starts charging the battery, the event notification service is triggered to publish this event.
## COMMON_EVENT_CHARGE_TYPE_CHANGED
Indicates that the system charging type has changed. This event is available only for system applications.
- Value: usual.event.CHARGE_TYPE_CHANGED
- Required subscriber permissions: none
When the system charging type changes, the event notification service is triggered to publish this event.
## COMMON_EVENT_SHUTDOWN
Indicates that the device is being and will be shut down.
- Value: usual.event.SHUTDOWN
- Required subscriber permissions: none
When the device is being shut down until it is powered off, the event notification service is triggered to publish this event.
## COMMON_EVENT_SCREEN_OFF
Indicates that the device screen is off and the device is in sleep mode.
- Value: usual.event.SCREEN_OFF
- Required subscriber permissions: none
When the device screen is turned off and the device is in sleep mode, the event notification service is triggered to publish this event.
## COMMON_EVENT_SCREEN_ON
Indicates that the device screen is on and the device is in the active state.
- Value: usual.event.SCREEN_ON
- Required subscriber permissions: none
When the device screen is turned on and in the active state, the event notification service is triggered to publish this event.
## COMMON_EVENT_POWER_SAVE_MODE_CHANGED
Indicates that the system power saving mode has changed.
- Value: usual.event.POWER_SAVE_MODE_CHANGED
- Required subscriber permissions: none
When the system power saving mode changes, the event notification service is triggered to publish this event.
## COMMON_EVENT_THERMAL_LEVEL_CHANGED
Indicates that the device's thermal level has changed.
- Value: usual.event.THERMAL_LEVEL_CHANGED
- Required subscriber permissions: none
When the device's thermal level changes, the event notification service is triggered to publish this event. For details about how to configure the thermal level, see [Thermal Level Customization](../../../../device-dev/subsystems/subsys-thermal_level.md).
# Common Events of the Theme Framework - Lock Screen
This document lists the common system events provided by the theme framework - lock screen to applications. Applications can use [APIs](../js-apis-commonEventManager.md) to subscribe to common system events.
## COMMON_EVENT_SCREEN_LOCKED
Indicates that the screen has been locked.
- Value: usual.event.SCREEN_LOCKED
- Required subscriber permissions: none
When the screen is locked, the event notification service is triggered to publish this event.
## COMMON_EVENT_SCREEN_UNLOCKED
Indicates that the screen has been unlocked.
- Value: usual.event.SCREEN_UNLOCKED
- Required subscriber permissions: none
When the screen is unlocked, the event notification service is triggered to publish this event.
# Common Events of the Time and Time Zone Subsystem
This document lists the common system events provided by the time and time zone subsystem to applications. Applications can use [APIs](../js-apis-commonEventManager.md) to subscribe to common system events.
## COMMON_EVENT_TIME_CHANGED
Indicates that the system time has been set.
- Value: usual.event.TIME_CHANGED
- Required subscriber permissions: none
When the system time is set, the event notification service is triggered to publish this event.
## COMMON_EVENT_TIME_TICK
Indicates that the system time has changed.
- Value: usual.event.TIME_TICK
- Required subscriber permissions: none
When the system time changes, the event notification service is triggered to publish this event.
## COMMON_EVENT_TIMEZONE_CHANGED
Indicates that the system time zone has changed.
- Value: usual.event.TIMEZONE_CHANGED
- Required subscriber permissions: none
When the system time zone changes, the event notification service is triggered to publish this event.
# Common Events of the Wi-Fi Subsystem
This document lists the common system events provided by the Wi-Fi subsystem to applications. Applications can use [APIs](../js-apis-commonEventManager.md) to subscribe to common system events.
## COMMON_EVENT_WIFI_POWER_STATE
Indicates that the Wi-Fi state has changed, for example, enabled or disabled.
- Value: usual.event.wifi.POWER_STATE
- Required subscriber permissions: none
When the Wi-Fi state changes, the event notification service is triggered to publish this event.
## COMMON_EVENT_WIFI_SCAN_FINISHED
Indicates that the Wi-Fi access point has been detected and proven to be available.
- Value: usual.event.wifi.SCAN_FINISHED
- Required subscriber permissions: ohos.permission.LOCATION
When a Wi-Fi access point is detected and proven to be available, the event notification service is triggered to publish this event.
## COMMON_EVENT_WIFI_SCAN_STATE
Indicates that the Wi-Fi access point state has changed.
- Value: usual.event.wifi.SCAN_STATE
- Required subscriber permissions: ohos.permission.LOCATION
When the Wi-Fi access point state changes, the event notification service is triggered to publish this event.
## COMMON_EVENT_WIFI_RSSI_VALUE
Indicates that the Wi-Fi signal strength (RSSI) has changed.
- Value: usual.event.wifi.RSSI_VALUE
- Required subscriber permissions: ohos.permission.GET_WIFI_INFO
When the Wi-Fi signal strength (RSSI) changes, the event notification service is triggered to publish this event.
## COMMON_EVENT_WIFI_CONN_STATE
Indicates that the Wi-Fi connection state has changed.
- Value: usual.event.wifi.CONN_STATE
- Required subscriber permissions: none
When the Wi-Fi connection state changes, the event notification service is triggered to publish this event.
## COMMON_EVENT_WIFI_HOTSPOT_STATE
Indicates that the Wi-Fi hotspot state has changed, for example, enabled or disabled.
- Value: usual.event.wifi.HOTSPOT_STATE
- Required subscriber permissions: none
When the Wi-Fi hotspot state changes, the event notification service is triggered to publish this event.
## COMMON_EVENT_WIFI_AP_STA_JOIN
Indicates that a client has joined the Wi-Fi hotspot of the current device.
- Value: usual.event.wifi.WIFI_HS_STA_JOIN
- Required subscriber permissions: ohos.permission.GET_WIFI_INFO
When a client joins the Wi-Fi hotspot of the current device, the event notification service is triggered to publish this event.
## COMMON_EVENT_WIFI_AP_STA_LEAVE
Indicates that a client has disconnected from the Wi-Fi hotspot of the current device.
- Value: usual.event.wifi.WIFI_HS_STA_LEAVE
- Required subscriber permissions: ohos.permission.GET_WIFI_INFO
When a client is disconnected from the Wi-Fi hotspot of the current device, the event notification service is triggered to publish this event.
## COMMON_EVENT_WIFI_MPLINK_STATE_CHANGE
Indicates that the state of MPLINK (an enhanced Wi-Fi feature) has changed.
- Value: usual.event.wifi.mplink.STATE_CHANGE
- Required subscriber permissions: ohos.permission.MPLINK_CHANGE_STATE
When the state of MPLINK (an enhanced Wi-Fi feature) changes, the event notification service is triggered to publish this event.
## COMMON_EVENT_WIFI_P2P_CONN_STATE
Indicates that the Wi-Fi P2P connection state has changed.
- Value: usual.event.wifi.p2p.CONN_STATE_CHANGE
- Required subscriber permissions: ohos.permission.GET_WIFI_INFO and ohos.permission.LOCATION
When the Wi-Fi P2P connection state changes, the event notification service is triggered to publish this event.
## COMMON_EVENT_WIFI_P2P_STATE_CHANGED
Indicates that the Wi-Fi P2P state has changed, for example, enabled or disabled.
- Value: usual.event.wifi.p2p.STATE_CHANGE
- Required subscriber permissions: ohos.permission.GET_WIFI_INFO
When the Wi-Fi P2P state changes, the event notification service is triggered to publish this event.
## COMMON_EVENT_WIFI_P2P_PEERS_STATE_CHANGED
Indicates that the state of the Wi-Fi P2P peer device has changed.
- Value: usual.event.wifi.p2p.DEVICES_CHANGE
- Required subscriber permissions: ohos.permission.GET_WIFI_INFO
When the state of the Wi-Fi P2P peer device changes, the event notification service is triggered to publish this event.
## COMMON_EVENT_WIFI_P2P_PEERS_DISCOVERY_STATE_CHANGED
Indicates that the Wi-Fi P2P discovery state has changed.
- Value: usual.event.wifi.p2p.PEER_DISCOVERY_STATE_CHANGE
- Required subscriber permissions: ohos.permission.GET_WIFI_INFO
When the Wi-Fi P2P discovery state changes, the event notification service is triggered to publish this event.
## COMMON_EVENT_WIFI_P2P_CURRENT_DEVICE_STATE_CHANGED
Indicates that the state of the Wi-Fi P2P local device has changed.
- Value: usual.event.wifi.p2p.CURRENT_DEVICE_CHANGE
- Required subscriber permissions: ohos.permission.GET_WIFI_INFO
When the state of the Wi-Fi P2P local device changes, the event notification service is triggered to publish this event.
## COMMON_EVENT_WIFI_P2P_GROUP_STATE_CHANGED
Indicates that the Wi-Fi P2P group information has changed.
- Value: usual.event.wifi.p2p.GROUP_STATE_CHANGED
- Required subscriber permissions: ohos.permission.GET_WIFI_INFO
When the Wi-Fi P2P group information changes, the event notification service is triggered to publish this event.
# Common Events of the Window Management Subsystem
This document lists the common system events provided by the window management subsystem to applications. Applications can use [APIs](../js-apis-commonEventManager.md) to subscribe to common system events.
### COMMON_EVENT_SPLIT_SCREEN<sup>10+</sup>
Indicates a screen splitting action.
- Value: usual.event.SPLIT_SCREEN
- Required subscriber permissions: none
When any of the following actions is performed, the event notification service is triggered to publish this event: accessing the recent tasks screen, creating a split-screen bar, and destroying a split-screen bar.
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册