public class GatewayInfo
extends Object implements Parcelable
| java.lang.Object | |
| android.telecom.GatewayInfo | |
用于传出呼叫的封装网关地址信息。 当进行呼叫时,系统提供一个工具为呼叫指定两个地址:一个显示为正在拨打的地址和一个单独的(网关)地址以实际拨打。 电信将该信息作为ConnectionService的一个实例提供GatewayInfo 。
数据由要调用的地址,要显示的地址和服务的包名称组成。 这些数据有两种使用方式:
Inherited constants |
|---|
android.os.Parcelable
|
Fields |
|
|---|---|
public static final Creator<GatewayInfo> |
CREATOR Parcelable接口。 |
Public constructors |
|
|---|---|
GatewayInfo(String packageName, Uri gatewayUri, Uri originalAddress) |
|
公共方法(Public methods) |
|
|---|---|
int |
describeContents() 描述此Parcelable实例的封送表示中包含的特殊对象的种类。 |
Uri |
getGatewayAddress() 拨打电话时返回要拨打的网关地址。 |
String |
getGatewayProviderPackageName() 提供网关信息的网关提供商服务的包名称。 |
Uri |
getOriginalAddress() 返回用户通过网关尝试连接的地址。 |
boolean |
isEmpty() 指示此 |
void |
writeToParcel(Parcel destination, int flags) 将此对象平铺到一个包裹中。 |
继承方法(Inherited methods) |
|
|---|---|
java.lang.Object
|
|
android.os.Parcelable
|
|
GatewayInfo (String packageName, Uri gatewayUri, Uri originalAddress)
| 参数(Parameters) | |
|---|---|
packageName |
String
|
gatewayUri |
Uri
|
originalAddress |
Uri
|
int describeContents ()
描述此Parcelable实例的封送表示中包含的特殊对象的种类。 例如,如果对象在writeToParcel(Parcel, int)的输出中包含writeToParcel(Parcel, int) ,则此方法的返回值必须包含CONTENTS_FILE_DESCRIPTOR位。
| 返回(Returns) | |
|---|---|
int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. |
String getGatewayProviderPackageName ()
提供网关信息的网关提供商服务的包名称。 这可用于识别网关地址源,并在通话UI中显示网关信息时加载适当的图标。
| 返回(Returns) | |
|---|---|
String |
|
boolean isEmpty ()
指示此GatewayInfo实例是否包含任何数据。 返回值为false表示没有网关号码用于呼叫。
| 返回(Returns) | |
|---|---|
boolean |
|
void writeToParcel (Parcel destination, int flags)
将此对象平铺到一个包裹中。
| 参数(Parameters) | |
|---|---|
destination |
Parcel: The Parcel in which the object should be written. |
flags |
int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. |