implements Parcelable
Encapsulates triggering thresholds for different severity levels of speed alerts, represented by
SpeedAlertSeverity
.
You can use this class to customize the speed alert triggering thresholds as a percentage for
both SpeedAlertSeverity.MINOR
and SpeedAlertSeverity.MAJOR
alerts, and to
customize the time-based triggering threshold for SpeedAlertSeverity.MAJOR
speed alert.
The speed alerts that are triggered by thresholds from this SpeedAlertOptions
have
their UI customized in SpeedometerUiOptions
.
Nested Class Summary
class | SpeedAlertOptions.Builder | Builder for building SpeedAlertOptions. |
Constant Summary
float | UNKNOWN_PERCENTAGE | |
double | UNKNOWN_TIME |
Inherited Constant Summary
Public Method Summary
double |
getSeverityUpgradeDurationSeconds()
Returns the time in seconds needed to upgrade speed alerts from
SpeedAlertSeverity.MINOR to SpeedAlertSeverity.MAJOR . |
float |
getSpeedAlertThresholdPercentage(SpeedAlertSeverity speedAlertSeverity)
Returns the speed alert triggering threshold as a percentage for the specified
SpeedAlertSeverity . |
Inherited Method Summary
Constants
public static final float UNKNOWN_PERCENTAGE
public static final double UNKNOWN_TIME
Public Methods
public double getSeverityUpgradeDurationSeconds ()
Returns the time in seconds needed to upgrade speed alerts from SpeedAlertSeverity.MINOR
to SpeedAlertSeverity.MAJOR
.
public float getSpeedAlertThresholdPercentage (SpeedAlertSeverity speedAlertSeverity)
Returns the speed alert triggering threshold as a percentage for the specified SpeedAlertSeverity
.
Parameters
speedAlertSeverity |
---|