java.lang.Object | |
↳ | cyanogenmod.profiles.ConnectionSettings |
The ConnectionSettings
class allows for creating Network/Hardware overrides
depending on their capabilities.
Example for enabling/disabling sync settings:
ConnectionSettings connectionSettings = new ConnectionSettings(ConnectionSettings.PROFILE_CONNECTION_SYNC, shouldBeEnabled() ?STATE_ENABLED
:STATE_DISALED
, true) profile.setConnectionSettings(connectionSettings);
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ConnectionSettings.BooleanState |
BooleanStates for specific ConnectionSettings
|
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | PROFILE_CONNECTION_2G3G4G |
The PROFILE_CONNECTION_2G3G4G allows for flipping between 2G/3G/4G (if exists)
on the device.
|
|||||||||
int | PROFILE_CONNECTION_BLUETOOTH |
The PROFILE_CONNECTION_BLUETOOTH allows for enabling and disabling the Bluetooth device
(if exists) on the device.
|
|||||||||
int | PROFILE_CONNECTION_GPS |
The PROFILE_CONNECTION_GPS allows for enabling and disabling the GPS radio (if exists)
on the device.
|
|||||||||
int | PROFILE_CONNECTION_MOBILEDATA |
The PROFILE_CONNECTION_MOBILEDATA allows for enabling and disabling the mobile
data connection.
|
|||||||||
int | PROFILE_CONNECTION_NFC |
The PROFILE_CONNECTION_NFC allows for enabling and disabling the NFC device
(if exists) on the device.
|
|||||||||
int | PROFILE_CONNECTION_SYNC |
The PROFILE_CONNECTION_SYNC allows for enabling and disabling the global sync state
on the device.
|
|||||||||
int | PROFILE_CONNECTION_WIFI |
The PROFILE_CONNECTION_WIFI allows for enabling and disabling the WiFi connection
on the device.
|
|||||||||
int | PROFILE_CONNECTION_WIFIAP |
The PROFILE_CONNECTION_WIFIAP allows for enabling and disabling the WiFi hotspot
on the device.
|
|||||||||
int | PROFILE_CONNECTION_WIMAX |
The PROFILE_CONNECTION_WIMAX allows for enabling and disabling the WIMAX radio (if exists)
on the device.
|
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
android.os.Parcelable
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Unwrap
ConnectionSettings from a parcel.
| |||||||||||
Construct a
ConnectionSettings with a connection id and default states.
| |||||||||||
Construct a
ConnectionSettings with a connection id, default value
, and if the setting should override the user defaults.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Retrieve the connection id associated with the
ConnectionSettings
| |||||||||||
Get the subscription id which this
ConnectionSettings should apply to.
| |||||||||||
Get the default value for the
ConnectionSettings
| |||||||||||
Check whether or not the
ConnectionSettings overrides user settings.
| |||||||||||
Set whether or not the
ConnectionSettings should override default user values
| |||||||||||
Set the default value for the
ConnectionSettings
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
android.os.Parcelable
|
The PROFILE_CONNECTION_2G3G4G
allows for flipping between 2G/3G/4G (if exists)
on the device.
The PROFILE_CONNECTION_BLUETOOTH
allows for enabling and disabling the Bluetooth device
(if exists) on the device. Boolean connection settings ConnectionSettings.BooleanState
The PROFILE_CONNECTION_GPS
allows for enabling and disabling the GPS radio (if exists)
on the device. Boolean connection settings ConnectionSettings.BooleanState
The PROFILE_CONNECTION_MOBILEDATA
allows for enabling and disabling the mobile
data connection. Boolean connection settings ConnectionSettings.BooleanState
The PROFILE_CONNECTION_NFC
allows for enabling and disabling the NFC device
(if exists) on the device. Boolean connection settings ConnectionSettings.BooleanState
The PROFILE_CONNECTION_SYNC
allows for enabling and disabling the global sync state
on the device. Boolean connection settings ConnectionSettings.BooleanState
The PROFILE_CONNECTION_WIFI
allows for enabling and disabling the WiFi connection
on the device. Boolean connection settings ConnectionSettings.BooleanState
The PROFILE_CONNECTION_WIFIAP
allows for enabling and disabling the WiFi hotspot
on the device. Boolean connection settings ConnectionSettings.BooleanState
The PROFILE_CONNECTION_WIMAX
allows for enabling and disabling the WIMAX radio (if exists)
on the device. Boolean connection settings ConnectionSettings.BooleanState
Unwrap ConnectionSettings
from a parcel.
Construct a ConnectionSettings
with a connection id and default states.
connectionId | ex: #PROFILE_CONNECTION_NFC |
---|
Construct a ConnectionSettings
with a connection id, default value
, and if the setting should override the user defaults.
connectionId | an identifier for the ConnectionSettings (ex:#PROFILE_CONNECTION_WIFI) |
---|---|
value | default value for the ConnectionSettings (ex:STATE_ENABLED ) |
override | whether or not the ConnectionSettings should override user defaults
|
Retrieve the connection id associated with the ConnectionSettings
Get the subscription id which this ConnectionSettings
should apply to.
Get the default value for the ConnectionSettings
Check whether or not the ConnectionSettings
overrides user settings.
Set whether or not the ConnectionSettings
should override default user values
override | boolean override |
---|
Set the default value for the ConnectionSettings
value | ConnectionSettings.BooleanState
|
---|