java.lang.Object | |
↳ | cyanogenmod.app.PartnerInterface |
The PartnerInterface allows applications to interact with a subset of system settings.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | MODIFY_NETWORK_SETTINGS_PERMISSION | Allows an application to change network settings, such as enabling or disabling airplane mode. | |||||||||
String | MODIFY_SOUND_SETTINGS_PERMISSION | Allows an application to change system sound settings, such as the zen mode. | |||||||||
int | ZEN_MODE_IMPORTANT_INTERRUPTIONS | Sets zen mode to important interruptions mode, so that only notifications that the user has chosen in Settings to be of high importance will cause the user's device to notify them. | |||||||||
int | ZEN_MODE_NO_INTERRUPTIONS | Sets zen mode so that no interruptions will be allowed. | |||||||||
int | ZEN_MODE_OFF | Turn off zen mode. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Retrieves the package name of the application that currently holds the
HOTWORD input.
| |||||||||||
Get or create an instance of the
PartnerInterface
| |||||||||||
Reboots the device, immediately.
| |||||||||||
Turns on or off airplane mode.
| |||||||||||
Turns on or off mobile network.
| |||||||||||
Set the zen mode for the device.
| |||||||||||
Set the zen mode for the device, allow a duration parameter
You will need
MODIFY_SOUND_SETTINGS_PERMISSION
to utilize this functionality.
| |||||||||||
Shuts down the device, immediately.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Allows an application to change network settings, such as enabling or disabling airplane mode.
Allows an application to change system sound settings, such as the zen mode.
Sets zen mode to important interruptions mode, so that only notifications that the user has chosen in Settings to be of high importance will cause the user's device to notify them. This condition is held indefinitely until changed again.
Sets zen mode so that no interruptions will be allowed. The device is effectively silenced indefinitely, until the mode is changed again.
Turn off zen mode. This restores the original ring and interruption settings that the user had set before zen mode was enabled.
Retrieves the package name of the application that currently holds the
HOTWORD
input.
Get or create an instance of the PartnerInterface
Reboots the device, immediately.
You will need ERROR(/android.Manifest.permission.REBOOT)
to utilize this functionality.
Turns on or off airplane mode.
You will need MODIFY_NETWORK_SETTINGS_PERMISSION
to utilize this functionality.
enabled | if true, sets airplane mode to enabled, otherwise disables airplane mode. |
---|
Turns on or off mobile network.
You will need MODIFY_NETWORK_SETTINGS_PERMISSION
to utilize this functionality.
enabled | if true, sets mobile network to enabled, otherwise disables mobile network. |
---|
Set the zen mode for the device.
You will need MODIFY_SOUND_SETTINGS_PERMISSION
to utilize this functionality.
mode | The zen mode to set the device to.
One of ZEN_MODE_IMPORTANT_INTERRUPTIONS ,
ZEN_MODE_NO_INTERRUPTIONS or
ZEN_MODE_OFF .
|
---|
Set the zen mode for the device, allow a duration parameter
You will need MODIFY_SOUND_SETTINGS_PERMISSION
to utilize this functionality.
mode | The zen mode to set the device to.
One of ZEN_MODE_IMPORTANT_INTERRUPTIONS ,
ZEN_MODE_NO_INTERRUPTIONS .
If using ZEN_MODE_OFF , the duration will be ignored |
---|---|
durationMillis | The duration in milliseconds, if duration + System.currentTimeMillis() results in long overflow, duration will be "indefinitely". all durationMillis < 0 will mean "indefinitely". |
Shuts down the device, immediately.
You will need ERROR(/android.Manifest.permission.REBOOT)
to utilize this functionality.