FileDocCategorySizeDatePackage
ConnectionRequest.javaAPI DocAndroid 5.1 API4770Thu Mar 12 22:22:42 GMT 2015android.telecom

ConnectionRequest

public final class ConnectionRequest extends Object implements android.os.Parcelable
Simple data container encapsulating a request to some entity to create a new {@link Connection}.
hide

Fields Summary
private final PhoneAccountHandle
mAccountHandle
private final android.net.Uri
mAddress
private final android.os.Bundle
mExtras
private final int
mVideoState
public static final Creator
CREATOR
Constructors Summary
public ConnectionRequest(PhoneAccountHandle accountHandle, android.net.Uri handle, android.os.Bundle extras)

param
accountHandle The accountHandle which should be used to place the call.
param
handle The handle (e.g., phone number) to which the {@link Connection} is to connect.
param
extras Application-specific extra data.

        this(accountHandle, handle, extras, VideoProfile.VideoState.AUDIO_ONLY);
    
public ConnectionRequest(PhoneAccountHandle accountHandle, android.net.Uri handle, android.os.Bundle extras, int videoState)

param
accountHandle The accountHandle which should be used to place the call.
param
handle The handle (e.g., phone number) to which the {@link Connection} is to connect.
param
extras Application-specific extra data.
param
videoState Determines the video state for the connection.
hide

        mAccountHandle = accountHandle;
        mAddress = handle;
        mExtras = extras;
        mVideoState = videoState;
    
private ConnectionRequest(android.os.Parcel in)

        mAccountHandle = in.readParcelable(getClass().getClassLoader());
        mAddress = in.readParcelable(getClass().getClassLoader());
        mExtras = in.readParcelable(getClass().getClassLoader());
        mVideoState = in.readInt();
    
Methods Summary
public intdescribeContents()
{@inheritDoc}


          
    
       
        return 0;
    
public PhoneAccountHandlegetAccountHandle()
The account which should be used to place the call.

 return mAccountHandle; 
public android.net.UrigetAddress()
The handle (e.g., phone number) to which the {@link Connection} is to connect.

 return mAddress; 
public android.os.BundlegetExtras()
Application-specific extra data. Used for passing back information from an incoming call {@code Intent}, and for any proprietary extensions arranged between a client and servant {@code ConnectionService} which agree on a vocabulary for such data.

 return mExtras; 
public intgetVideoState()
Describes the video states supported by the client requesting the connection. Valid values: {@link VideoProfile.VideoState#AUDIO_ONLY}, {@link VideoProfile.VideoState#BIDIRECTIONAL}, {@link VideoProfile.VideoState#TX_ENABLED}, {@link VideoProfile.VideoState#RX_ENABLED}.

return
The video state for the connection.
hide

        return mVideoState;
    
public java.lang.StringtoString()

        return String.format("ConnectionRequest %s %s",
                mAddress == null
                        ? Uri.EMPTY
                        : Connection.toLogSafePhoneNumber(mAddress.toString()),
                mExtras == null ? "" : mExtras);
    
public voidwriteToParcel(android.os.Parcel destination, int flags)

        destination.writeParcelable(mAccountHandle, 0);
        destination.writeParcelable(mAddress, 0);
        destination.writeParcelable(mExtras, 0);
        destination.writeInt(mVideoState);