public final class

StreamSettings

extends Object
implements Parcelable
java.lang.Object
   ↳ lineageos.profiles.StreamSettings

Class Overview

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);
 

Summary

[Expand]
Inherited Constants
From interface android.os.Parcelable
Public Constructors
StreamSettings(Parcel parcel)
Unwrap StreamSettings from a parcel.
StreamSettings(int streamId)
Construct a StreamSettings with a stream id and default states.
StreamSettings(int streamId, int value, boolean override)
Construct a StreamSettings with a stream id, default value, and if the setting should override the user defaults.
Public Methods
int describeContents()
int getStreamId()
Retrieve the stream id id associated with the StreamSettings
int getValue()
Get the default value for the StreamSettings
boolean isOverride()
Check whether or not the StreamSettings overrides user settings.
void setOverride(boolean override)
Set whether or not the StreamSettings should override default user values
void setValue(int value)
Set the default value for the StreamSettings
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

Public Constructors

public StreamSettings (Parcel parcel)

added in API level 2

Unwrap StreamSettings from a parcel.

public StreamSettings (int streamId)

added in API level 2

Construct a StreamSettings with a stream id and default states.

Parameters
streamId int: ex: STREAM_ALARM

public StreamSettings (int streamId, int value, boolean override)

added in API level 2

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

Public Methods

public int describeContents ()

added in API level 2

Returns
int

public int getStreamId ()

added in API level 2

Retrieve the stream id id associated with the StreamSettings

Returns
int an integer identifier

public int getValue ()

added in API level 2

Get the default value for the StreamSettings

Returns
int integer value corresponding with its state

public boolean isOverride ()

added in API level 2

Check whether or not the StreamSettings overrides user settings.

Returns
boolean true if override

public void setOverride (boolean override)

added in API level 2

Set whether or not the StreamSettings should override default user values

Parameters
override boolean: boolean override

public void setValue (int value)

added in API level 2

Set the default value for the StreamSettings

Parameters
value int: see AudioManager for viable values