| java.lang.Object | |
| ↳ | lineageos.profiles.StreamSettings |
The StreamSettings class allows for creating various AudioManager
overrides on the device depending on their capabilities.
Example for setting the alarm stream defaults and override:
StreamSettings alarmStreamSettings = new StreamSettings(AudioManager.STREAM_ALARM,
am.getStreamVolume(AudioManager.STREAM_ALARM), true));
profile.setStreamSettings(alarmStreamSettings);
|
[Expand]
Inherited Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
| |||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Unwrap
StreamSettings from a parcel.
| |||||||||||
Construct a
StreamSettings with a stream id and default states.
| |||||||||||
Construct a
StreamSettings with a stream id, default value,
and if the setting should override the user defaults.
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Retrieve the stream id id associated with the
StreamSettings
| |||||||||||
Get the default value for the
StreamSettings
| |||||||||||
Check whether or not the
StreamSettings overrides user settings.
| |||||||||||
Set whether or not the
StreamSettings should override default user values
| |||||||||||
Set the default value for the
StreamSettings
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
| |||||||||||
|
| |||||||||||
Construct a StreamSettings with a stream id and default states.
| Parameters | |
|---|---|
streamId |
int: ex: STREAM_ALARM
|
Construct a StreamSettings with a stream id, default value,
and if the setting should override the user defaults.
| Parameters | |
|---|---|
streamId |
int: ex: STREAM_ALARM |
value |
int: default value for the StreamSettings |
override |
boolean: whether or not the StreamSettings should override user defaults
|
Retrieve the stream id id associated with the StreamSettings
| Returns | |
|---|---|
int |
an integer identifier |
Get the default value for the StreamSettings
| Returns | |
|---|---|
int |
integer value corresponding with its state |
Check whether or not the StreamSettings overrides user settings.
| Returns | |
|---|---|
boolean |
true if override |
Set whether or not the StreamSettings should override default user values
| Parameters | |
|---|---|
override |
boolean: boolean override
|
Set the default value for the StreamSettings
| Parameters | |
|---|---|
value |
int: see AudioManager for viable values
|