FileDocCategorySizeDatePackage
GatewayInfo.javaAPI DocAndroid 5.1 API4021Thu Mar 12 22:22:42 GMT 2015android.telecom

GatewayInfo

public class GatewayInfo extends Object implements android.os.Parcelable
Encapsulated gateway address information for outgoing call. When calls are made, the system provides a facility to specify two addresses for the call: one to display as the address being dialed and a separate (gateway) address to actually dial. Telecom provides this information to {@link ConnectionService}s when placing the call as an instance of {@code GatewayInfo}.

The data consists of an address to call, an address to display and the package name of the service. This data is used in two ways:

  1. Call the appropriate gateway address.
  2. Display information about how the call is being routed to the user.
hide

Fields Summary
private final String
mGatewayProviderPackageName
private final android.net.Uri
mGatewayAddress
private final android.net.Uri
mOriginalAddress
public static final Parcelable.Creator
CREATOR
The Parcelable interface.
Constructors Summary
public GatewayInfo(String packageName, android.net.Uri gatewayUri, android.net.Uri originalAddress)

hide

        mGatewayProviderPackageName = packageName;
        mGatewayAddress = gatewayUri;
        mOriginalAddress = originalAddress;
    
Methods Summary
public intdescribeContents()
{@inheritDoc}


          
    
       
        return 0;
    
public android.net.UrigetGatewayAddress()
Returns the gateway address to dial when placing the call.

        return mGatewayAddress;
    
public java.lang.StringgetGatewayProviderPackageName()
Package name of the gateway provider service that provided the gateway information. This can be used to identify the gateway address source and to load an appropriate icon when displaying gateway information in the in-call UI.

        return mGatewayProviderPackageName;
    
public android.net.UrigetOriginalAddress()
Returns the address that the user is trying to connect to via the gateway.

        return mOriginalAddress;
    
public booleanisEmpty()
Indicates whether this {@code GatewayInfo} instance contains any data. A returned value of false indicates that no gateway number is being used for the call.

        return TextUtils.isEmpty(mGatewayProviderPackageName) || mGatewayAddress == null;
    
public voidwriteToParcel(android.os.Parcel destination, int flags)
{@inheritDoc}

        destination.writeString(mGatewayProviderPackageName);
        mGatewayAddress.writeToParcel(destination, 0);
        mOriginalAddress.writeToParcel(destination, 0);