public static final class CallAttributes.Builder
extends Object



Build an instance of CallAttributes. In order to build a valid instance, a PhoneAccountHandle, call direction, display name, and Uri address are required.

Note: Pass in the same PhoneAccountHandle that was used to register a PhoneAccount with Telecom. see TelecomManager.registerPhoneAccount

Summary

Public constructors

Builder(PhoneAccountHandle phoneAccountHandle, int callDirection, CharSequence displayName, Uri address)

Constructor for the CallAttributes.Builder class

Public methods

CallAttributes build()

Build an instance of CallAttributes based on the last values passed to the setters or default values.

CallAttributes.Builder setCallCapabilities(int callCapabilities)

Sets the capabilities of this call.

CallAttributes.Builder setCallType(int callType)

Sets the type of call; uses to indicate if a call is a video call or audio call.

CallAttributes.Builder setContactUri(Uri contactUri)

Sets the contact directory URI for the VoIP app.

CallAttributes.Builder setIsGroupCall(boolean isGroupCall)

Sets whether or not this call should be considered a group call.

CallAttributes.Builder setLogExcluded(boolean isExcluded)

Sets the attribute to exclude the call from system call logs.

Inherited methods

From class java.lang.Object

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Public constructors

Builder

public Builder (PhoneAccountHandle phoneAccountHandle, 
                int callDirection, 
                CharSequence displayName, 
                Uri address)

Constructor for the CallAttributes.Builder class

Parameters
phoneAccountHandle PhoneAccountHandle: that belongs to package registered with Telecom.
This value cannot be null.
callDirection int: of the new call that will be added to Telecom.
Value is one of the following:
displayName CharSequence: of the caller for incoming calls or initiating user for outgoing calls.
This value cannot be null.
address Uri: of the caller for incoming calls or destination for outgoing calls.
This value cannot be null.

Public methods

setContactUri

public CallAttributes.Builder setContactUri (Uri contactUri)

Sets the contact directory URI for the VoIP app. This must be a valid URI pointing to the VoIP contact directory or a valid CP2 contact.

Parameters
contactUri Uri: The contact URI pointing to the VoIP contact directory or CP2 contact.
This value cannot be null.
Returns
CallAttributes.Builder Builder.
This value cannot be null.

setIsGroupCall

public CallAttributes.Builder setIsGroupCall (boolean isGroupCall)

Sets whether or not this call should be considered a group call.

Parameters
isGroupCall boolean: whether the call is a group call.
Returns
CallAttributes.Builder Builder.
This value cannot be null.

setLogExcluded

public CallAttributes.Builder setLogExcluded (boolean isExcluded)

Sets the attribute to exclude the call from system call logs.

Parameters
isExcluded boolean: whether the call should be excluded.
Returns
CallAttributes.Builder Builder.
This value cannot be null.

Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Last updated 2026-02-13 UTC.