public final class

RingModeSettings

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

Class Overview

The StreamSettings class allows for creating various AudioManager overrides on the device depending on their capabilities.

Example for setting the default ring mode to muted:

 RingModeSettings ringSettings = new RingModeSettings(RING_MODE_MUTE, true));
 profile.setRingMode(ringSettings);
 

Summary

Constants
String RING_MODE_MUTE
String RING_MODE_NORMAL
String RING_MODE_VIBRATE
[Expand]
Inherited Constants
From interface android.os.Parcelable
Public Constructors
RingModeSettings(Parcel parcel)
Unwrap RingModeSettings from a parcel.
RingModeSettings()
Construct a RingModeSettings with a default state of #RING_MODE_NORMAL.
RingModeSettings(String value, boolean override)
Construct a RingModeSettings with a default value and whether or not it should override user settings.
Public Methods
int describeContents()
String getValue()
Get the default value for the RingModeSettings
boolean isOverride()
Check whether or not the RingModeSettings overrides user settings.
void setOverride(boolean override)
Set whether or not the RingModeSettings should override default user values
void setValue(String value)
Set the default value for the RingModeSettings
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

Constants

public static final String RING_MODE_MUTE

added in API level 2

Constant Value: "mute"

public static final String RING_MODE_NORMAL

added in API level 2

Constant Value: "normal"

public static final String RING_MODE_VIBRATE

added in API level 2

Constant Value: "vibrate"

Public Constructors

public RingModeSettings (Parcel parcel)

added in API level 2

Unwrap RingModeSettings from a parcel.

public RingModeSettings ()

added in API level 2

Construct a RingModeSettings with a default state of #RING_MODE_NORMAL.

public RingModeSettings (String value, boolean override)

added in API level 2

Construct a RingModeSettings with a default value and whether or not it should override user settings.

Parameters
value String: ex: RING_MODE_VIBRATE
override boolean: whether or not the setting should override user settings

Public Methods

public int describeContents ()

added in API level 2

Returns
int

public String getValue ()

added in API level 2

Get the default value for the RingModeSettings

Returns
String integer value corresponding with its type

public boolean isOverride ()

added in API level 2

Check whether or not the RingModeSettings overrides user settings.

Returns
boolean true if override

public void setOverride (boolean override)

added in API level 2

Set whether or not the RingModeSettings should override default user values

Parameters
override boolean: boolean override

public void setValue (String value)

added in API level 2

Set the default value for the RingModeSettings

Parameters
value String: ex: RING_MODE_VIBRATE