Package org.robolectric.shadows
Class ServiceStateBuilder
java.lang.Object
org.robolectric.shadows.ServiceStateBuilder
Builder class to create instance of
ServiceState
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
static ServiceStateBuilder
static ServiceStateBuilder
newBuilder
(ServiceState serviceState) setCellBandwidths
(int[] value) setChannelNumber
(int value) setDataRegState
(int value) setDataRoamingFromRegistration
(boolean value) setEmergencyOnly
(boolean value) setIsManualSelection
(boolean value) setIsUsingCarrierAggregation
(boolean value) Use this method to control return value ofServiceState.isUsingCarrierAggregation()
(up to P).setIwlanPreferred
(boolean value) setNrFrequencyRange
(int value) setOperatorName
(String longName, String shortName, String numeric) setRoaming
(boolean value) setVoiceRegState
(int value)
-
Constructor Details
-
ServiceStateBuilder
public ServiceStateBuilder()
-
-
Method Details
-
newBuilder
-
newBuilder
-
build
-
setVoiceRegState
-
setDataRegState
-
setNrFrequencyRange
-
setIsManualSelection
-
setOperatorName
-
setIwlanPreferred
-
setEmergencyOnly
-
setDataRoamingFromRegistration
-
setIsUsingCarrierAggregation
Use this method to control return value ofServiceState.isUsingCarrierAggregation()
(up to P). On APIs > P, useServiceStateBuilder#setNetworkRegistrationInfoList()
. -
setNetworkRegistrationInfoList
@RequiresApi(29) public ServiceStateBuilder setNetworkRegistrationInfoList(List<NetworkRegistrationInfo> value) -
setRoaming
-
setChannelNumber
-
setCellBandwidths
-