Added in API level 31

Builder


class Builder
kotlin.Any
   ↳ android.telephony.SignalThresholdInfo.Builder

Builder class to create SignalThresholdInfo objects.

Summary

Public constructors

Public methods
SignalThresholdInfo

Build SignalThresholdInfo object.

SignalThresholdInfo.Builder
setHysteresisDb(hysteresisDb: Int)

Set the interval in dB defining the required minimum magnitude change to report a signal strength change.

SignalThresholdInfo.Builder

Set the radio access network type for the builder instance.

SignalThresholdInfo.Builder
setSignalMeasurementType(signalMeasurementType: Int)

Set the signal measurement type for the builder instance.

SignalThresholdInfo.Builder
setThresholds(thresholds: IntArray)

Set the signal strength thresholds of the corresponding signal measurement type.

Public constructors

Builder

Builder()

Public methods

build

Added in API level 31
fun build(): SignalThresholdInfo

Build SignalThresholdInfo object.

Return
SignalThresholdInfo the SignalThresholdInfo object build out This value cannot be null.
Exceptions
java.lang.IllegalArgumentException if the signal measurement type is invalid, any value in the thresholds is out of range, or the RAN is not allowed to set with the signal measurement type

setHysteresisDb

Added in API level 34
fun setHysteresisDb(hysteresisDb: Int): SignalThresholdInfo.Builder

Set the interval in dB defining the required minimum magnitude change to report a signal strength change. A value of zero disables dB-based hysteresis restrictions. Note:

Default hysteresis db value is 2. Minimum hysteresis db value allowed to set is 0. If hysteresis db value is not set, default hysteresis db value of 2 will be used.

Parameters
hysteresisDb Int: the interval in dB Value is 0 or greater
Return
SignalThresholdInfo.Builder the builder to facilitate the chaining This value cannot be null.

setThresholds

Added in API level 31
fun setThresholds(thresholds: IntArray): SignalThresholdInfo.Builder

Set the signal strength thresholds of the corresponding signal measurement type. The range and unit must reference specific SignalMeasurementType. The length of the thresholds should between the numbers return from getMinimumNumberOfThresholdsAllowed() and getMaximumNumberOfThresholdsAllowed(). An IllegalArgumentException will throw otherwise.

Parameters
thresholds IntArray: array of integer as the signal threshold values This value cannot be null.
Return
SignalThresholdInfo.Builder the builder to facilitate the chaining This value cannot be null.