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.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
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
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
public SignalThresholdInfo.Builder setRadioAccessNetworkType (int ran)
Set the radio access network type for the builder instance.
Returns | |
---|---|
SignalThresholdInfo.Builder |
the builder to facilitate the chaining
This value cannot be null . |
setSignalMeasurementType
public SignalThresholdInfo.Builder setSignalMeasurementType (int signalMeasurementType)
Set the signal measurement type for the builder instance.
Returns | |
---|---|
SignalThresholdInfo.Builder |
the builder to facilitate the chaining
This value cannot be null . |
setThresholds
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 . |
See also:
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
SignalThresholdInfo.SIGNAL_MEASUREMENT_TYPE_ECNO
for more details on signal strength thresholds