SignalThresholdInfo.Builder


public static final class SignalThresholdInfo.Builder
extends Object

java.lang.Object
   ↳ android.telephony.SignalThresholdInfo.Builder


Builder class to create SignalThresholdInfo objects.

Summary

Public constructors

Builder()

Public methods

SignalThresholdInfo build()

Build SignalThresholdInfo object.

SignalThresholdInfo.Builder setHysteresisDb(int hysteresisDb)

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

SignalThresholdInfo.Builder setRadioAccessNetworkType(int ran)

Set the radio access network type for the builder instance.

SignalThresholdInfo.Builder setSignalMeasurementType(int signalMeasurementType)

Set the signal measurement type for the builder instance.

SignalThresholdInfo.Builder setThresholds(int[] thresholds)

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

Inherited methods

Public constructors

Builder

public Builder ()

Public methods

build

Added in API level 31
public SignalThresholdInfo build ()

Build SignalThresholdInfo object.

Returns
SignalThresholdInfo the SignalThresholdInfo object build out This value cannot be null.

Throws
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
public SignalThresholdInfo.Builder setHysteresisDb (int hysteresisDb)

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

Returns
SignalThresholdInfo.Builder the builder to facilitate the chaining This value cannot be null.

setRadioAccessNetworkType

Added in API level 31
public SignalThresholdInfo.Builder setRadioAccessNetworkType (int ran)

Set the radio access network type for the builder instance.

Parameters
ran int: The radio access network type Value is AccessNetworkConstants.AccessNetworkType.UNKNOWN, AccessNetworkConstants.AccessNetworkType.GERAN, AccessNetworkConstants.AccessNetworkType.UTRAN, AccessNetworkConstants.AccessNetworkType.EUTRAN, AccessNetworkConstants.AccessNetworkType.CDMA2000, AccessNetworkConstants.AccessNetworkType.IWLAN, or AccessNetworkConstants.AccessNetworkType.NGRAN

Returns
SignalThresholdInfo.Builder the builder to facilitate the chaining This value cannot be null.

setSignalMeasurementType

Added in API level 31
public SignalThresholdInfo.Builder setSignalMeasurementType (int signalMeasurementType)

Set the signal measurement type for the builder instance.

Parameters
signalMeasurementType int: The signal measurement type Value is SignalThresholdInfo.SIGNAL_MEASUREMENT_TYPE_UNKNOWN, SignalThresholdInfo.SIGNAL_MEASUREMENT_TYPE_RSSI, SignalThresholdInfo.SIGNAL_MEASUREMENT_TYPE_RSCP, SignalThresholdInfo.SIGNAL_MEASUREMENT_TYPE_RSRP, SignalThresholdInfo.SIGNAL_MEASUREMENT_TYPE_RSRQ, SignalThresholdInfo.SIGNAL_MEASUREMENT_TYPE_RSSNR, SignalThresholdInfo.SIGNAL_MEASUREMENT_TYPE_SSRSRP, SignalThresholdInfo.SIGNAL_MEASUREMENT_TYPE_SSRSRQ, SignalThresholdInfo.SIGNAL_MEASUREMENT_TYPE_SSSINR, or SignalThresholdInfo.SIGNAL_MEASUREMENT_TYPE_ECNO

Returns
SignalThresholdInfo.Builder the builder to facilitate the chaining This value cannot be null.

setThresholds

Added in API level 31
public SignalThresholdInfo.Builder setThresholds (int[] thresholds)

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 SignalThresholdInfo.getMinimumNumberOfThresholdsAllowed() and SignalThresholdInfo.getMaximumNumberOfThresholdsAllowed(). An IllegalArgumentException will throw otherwise.

Parameters
thresholds int: array of integer as the signal threshold values This value cannot be null.

Returns
SignalThresholdInfo.Builder the builder to facilitate the chaining This value cannot be null.