public static class SystemSettings.Wireless extends Object
| 限定符和类型 | 字段 | 说明 |
|---|---|---|
static String |
AIRPLANE_MODE_RADIOS |
Indicates the list of radio signals to be disabled when airplane mode is enabled.
|
static String |
BLUETOOTH_DISCOVER_TIMEOUT |
Indicates the duration (in seconds) that the device can be discovered through Bluetooth.
|
static String |
BLUETOOTH_DISCOVERABILITY_STATUS |
Specifies whether the device can be discovered or connected by other devices through Bluetooth.
|
static String |
BLUETOOTH_RADIO |
A constant of
AIRPLANE_MODE_RADIOS to indicate that Bluetooth is disabled in airplane mode. |
static String |
BLUETOOTH_STATUS |
Specifies whether Bluetooth is enabled.
|
static String |
CELL_RADIO |
A constant of
AIRPLANE_MODE_RADIOS to indicate that cellular radio is disabled in airplane mode. |
static String |
NFC_RADIO |
A constant of
AIRPLANE_MODE_RADIOS to indicate that NFC is disabled in airplane mode. |
static String |
OWNER_LOCKDOWN_WIFI_CFG |
Specifies whether the Wi-Fi configuration created by the application of the device owner should be
locked down.
|
static String |
WIFI_DHCP_MAX_RETRY_COUNT |
Indicates the maximum number of attempts to obtain an IP address from the DHCP server.
|
static String |
WIFI_RADIO |
A constant of
AIRPLANE_MODE_RADIOS to indicate that Wi-Fi is disabled in airplane mode. |
static String |
WIFI_STATUS |
Specifies whether Wi-Fi is enabled.
|
static String |
WIFI_TO_MOBILE_DATA_AWAKE_TIMEOUT |
Indicates the maximum duration to hold a wake lock when waiting for the mobile data connection to
establish after the Wi-Fi connection is disconnected.
|
static String |
WIFI_WATCHDOG_STATUS |
Specifies whether Wi-Fi watchdog is enabled.
|
public static final String AIRPLANE_MODE_RADIOS
BLUETOOTH_RADIO - Bluetooth is disabled in airplane mode.
CELL_RADIO - Cellular radio is disabled in airplane mode.
NFC_RADIO - NFC is disabled in airplane mode.
WIFI_RADIO - Wi-Fi is disabled in airplane mode.
public static final String BLUETOOTH_DISCOVERABILITY_STATUS
0, the device cannot be connected or discovered. If the value is 1, the
device can be connected but cannot be discovered. If the value is 2, the device can be connected
and discovered.public static final String BLUETOOTH_DISCOVER_TIMEOUT
After the duration expires, the device cannot be discovered through Bluetooth.
public static final String BLUETOOTH_RADIO
AIRPLANE_MODE_RADIOS to indicate that Bluetooth is disabled in airplane mode.public static final String BLUETOOTH_STATUS
If the value is true, Bluetooth is enabled. If the value is false, Bluetooth is disabled.
public static final String CELL_RADIO
AIRPLANE_MODE_RADIOS to indicate that cellular radio is disabled in airplane mode.public static final String NFC_RADIO
AIRPLANE_MODE_RADIOS to indicate that NFC is disabled in airplane mode.public static final String OWNER_LOCKDOWN_WIFI_CFG
If the value is true, the Wi-Fi configuration should be locked down.
If the value is false, the Wi-Fi configuration should not be locked down.
public static final String WIFI_DHCP_MAX_RETRY_COUNT
public static final String WIFI_RADIO
AIRPLANE_MODE_RADIOS to indicate that Wi-Fi is disabled in airplane mode.public static final String WIFI_STATUS
If the value is true, Wi-Fi is enabled. If the value is false, Wi-Fi is disabled.
public static final String WIFI_TO_MOBILE_DATA_AWAKE_TIMEOUT
public static boolean enableAirplaneMode(Context context, boolean enable)
After airplane mode is set, the common event
CommonEventSupport.COMMON_EVENT_AIRPLANE_MODE_CHANGED is published.
Permissions: SystemPermission.MANAGE_SECURE_SETTINGS
context - Indicates the application context.enable - Specifies whether to enable airplane mode. The value true means to enable airplane
mode, and false means to disable airplane mode.true if the operation is successful; returns false otherwise.