Class CallDetailsBuilder
java.lang.Object
org.robolectric.shadows.CallDetailsBuilder
Builder for
Call.Details.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds and returns a newCall.Detailsinstance with the configured values.static CallDetailsBuilderCreates a new, empty builder forCall.Details.static CallDetailsBuildernewBuilder(Call.Details original) Creates a new builder populated with data from the givenCall.Details.setAccountHandle(PhoneAccountHandle handle) Sets the phone account handle associated with the call.setCallDirection(int callDirection) Sets the direction of the call (e.g., incoming or outgoing).setCallProperties(int properties) Sets properties associated with the call.setConnectTimeMillis(long connectTimeMillis) Sets the time the call connected in milliseconds.setContactDisplayName(String name) Sets the display name of the contact.setDisconnectCause(DisconnectCause disconnectCause) Sets the disconnect cause for the call.Sets the extras bundle for the call details.Sets the handle (e.g.setState(int state) Sets the state of the call.setVideoState(int videoState) Sets the video state of the call.
-
Method Details
-
newBuilder
Creates a new, empty builder forCall.Details. -
newBuilder
Creates a new builder populated with data from the givenCall.Details. -
setState
Sets the state of the call.- Parameters:
state- the call state (e.g.,Call.STATE_ACTIVE)- Returns:
- this builder instance
-
setCallDirection
Sets the direction of the call (e.g., incoming or outgoing).- Parameters:
callDirection- the call direction (e.g.,Call.Details.DIRECTION_INCOMING)- Returns:
- this builder instance
-
setVideoState
Sets the video state of the call.- Parameters:
videoState- the video state (e.g.,VideoProfile.STATE_AUDIO_ONLY)- Returns:
- this builder instance
-
setAccountHandle
Sets the phone account handle associated with the call.- Parameters:
handle- the phone account handle for the call- Returns:
- this builder instance
-
setContactDisplayName
Sets the display name of the contact.- Parameters:
name- the display name of the contact- Returns:
- this builder instance
-
setHandle
Sets the handle (e.g. phone number) for the call.- Parameters:
handle- the handle for the call- Returns:
- this builder instance
-
setConnectTimeMillis
Sets the time the call connected in milliseconds.- Parameters:
connectTimeMillis- the time the call connected in milliseconds- Returns:
- this builder instance
-
setDisconnectCause
Sets the disconnect cause for the call.- Parameters:
disconnectCause- the disconnect cause for the call- Returns:
- this builder instance
-
setCallProperties
Sets properties associated with the call.- Parameters:
properties- the properties associated with the call- Returns:
- this builder instance
-
setExtras
Sets the extras bundle for the call details.- Parameters:
extras- the extras bundle for the call details- Returns:
- this builder instance
-
build
Builds and returns a newCall.Detailsinstance with the configured values.- Returns:
- the constructed
Call.Detailsobject.
-