Most visited

Recently visited

Added in API level 23

Call.Details

public static class Call.Details
extends Object

java.lang.Object
   ↳ android.telecom.Call.Details


Summary

Constants

int CAPABILITY_CANNOT_DOWNGRADE_VIDEO_TO_AUDIO

设置时,可防止视频 Call降级为仅音频呼叫。

int CAPABILITY_CAN_PAUSE_VIDEO

对于视频通话,使用 STATE_PAUSED VideoState指示是否可以暂停呼叫的传出视频。

int CAPABILITY_DISCONNECT_FROM_CONFERENCE

Conference呼叫可以单独断开。

int CAPABILITY_HOLD

目前可以暂停或取消呼叫。

int CAPABILITY_MANAGE_CONFERENCE

呼叫支持电话会议管理。

int CAPABILITY_MERGE_CONFERENCE

会议内的呼叫可以合并。

int CAPABILITY_MUTE

呼叫可以静音。

int CAPABILITY_RESPOND_VIA_TEXT

呼叫支持通过文本选项进行响应

int CAPABILITY_SEPARATE_FROM_CONFERENCE

通话可以从其母公司 Conference分离,如果有的话。

int CAPABILITY_SUPPORTS_VT_LOCAL_BIDIRECTIONAL

本地设备支持双向视频通话。

int CAPABILITY_SUPPORTS_VT_LOCAL_RX

本地设备支持接收视频。

int CAPABILITY_SUPPORTS_VT_LOCAL_TX

本地设备支持传输视频。

int CAPABILITY_SUPPORTS_VT_REMOTE_BIDIRECTIONAL

远程设备支持双向视频通话。

int CAPABILITY_SUPPORTS_VT_REMOTE_RX

远程设备支持接收视频。

int CAPABILITY_SUPPORTS_VT_REMOTE_TX

远程设备支持传输视频。

int CAPABILITY_SUPPORT_HOLD

通话支持保持功能。

int CAPABILITY_SWAP_CONFERENCE

会议中的呼叫可以在前景和背景之间交换。

int PROPERTY_CONFERENCE

通话目前是否为会议。

int PROPERTY_EMERGENCY_CALLBACK_MODE

是否在设备处于紧急回拨模式时进行呼叫。

int PROPERTY_ENTERPRISE_CALL

通话是否与工作档案相关联。

int PROPERTY_GENERIC_CONFERENCE

电话是否是通用会议,我们不知道会议参与者的确切状态(例如,

int PROPERTY_HIGH_DEF_AUDIO

通话正在使用高清音频。

int PROPERTY_WIFI

连接正在使用WIFI。

Public methods

static boolean can(int capabilities, int capability)

提供的功能是否支持指定的功能。

boolean can(int capability)

Details的功能是否支持指定的功能。

static String capabilitiesToString(int capabilities)

将一组能力位( CAPABILITY_* )渲染为可读的字符串。

boolean equals(Object o)

指示其他某个对象是否“等于”这一个。

PhoneAccountHandle getAccountHandle()
int getCallCapabilities()
int getCallProperties()
String getCallerDisplayName()
int getCallerDisplayNamePresentation()
final long getConnectTimeMillis()
DisconnectCause getDisconnectCause()
Bundle getExtras()
GatewayInfo getGatewayInfo()
Uri getHandle()
int getHandlePresentation()
Bundle getIntentExtras()
StatusHints getStatusHints()
int getVideoState()
boolean hasProperty(int property)

Details的属性是否包含指定的属性。

static boolean hasProperty(int properties, int property)

所提供的属性是否包含指定的属性。

int hashCode()

返回对象的哈希码值。

static String propertiesToString(int properties)

将一组属性位( PROPERTY_* )渲染为可读的字符串。

String toString()

返回对象的字符串表示形式。

Inherited methods

From class java.lang.Object

Constants

CAPABILITY_CANNOT_DOWNGRADE_VIDEO_TO_AUDIO

Added in API level 24
int CAPABILITY_CANNOT_DOWNGRADE_VIDEO_TO_AUDIO

设置时,可防止视频 Call被降级为纯音频呼叫。

当VideoState将 STATE_TX_ENABLEDSTATE_RX_ENABLED位设置为表示无法将连接从视频呼叫降级回 STATE_TX_ENABLED的VideoState时,应该设置该 STATE_AUDIO_ONLY

直观地说,可以降级为音频的呼叫也应具有本地和远程视频功能(请参阅 CAPABILITY_SUPPORTS_VT_LOCAL_BIDIRECTIONALCAPABILITY_SUPPORTS_VT_REMOTE_BIDIRECTIONAL )。

常量值:4194304(0x00400000)

CAPABILITY_CAN_PAUSE_VIDEO

Added in API level 23
int CAPABILITY_CAN_PAUSE_VIDEO

对于视频通话,指示是否可以使用 STATE_PAUSED VideoState来暂停呼叫的传出视频。

常量值:1048576(0x00100000)

CAPABILITY_DISCONNECT_FROM_CONFERENCE

Added in API level 23
int CAPABILITY_DISCONNECT_FROM_CONFERENCE

Conference呼叫可以单独断开。

常量值:8192(0x00002000)

CAPABILITY_HOLD

Added in API level 23
int CAPABILITY_HOLD

目前可以暂停或取消呼叫。

常数值:1(0x00000001)

CAPABILITY_MANAGE_CONFERENCE

Added in API level 23
int CAPABILITY_MANAGE_CONFERENCE

呼叫支持电话会议管理。 此功能仅适用于可以将Connection作为子女的Conference调用。

常量值:128(0x00000080)

CAPABILITY_MERGE_CONFERENCE

Added in API level 23
int CAPABILITY_MERGE_CONFERENCE

会议内的呼叫可以合并。 ConnectionService可以选择在合并子Connection之前添加Conference呼叫。 这就是如何实现基于CDMA的Connection 对于这些未合并的Conference ,此功能允许在电话会议处于通话用户界面的前台时显示合并按钮。

这仅适用于 Conference

常量值:4(0x00000004)

CAPABILITY_MUTE

Added in API level 23
int CAPABILITY_MUTE

呼叫可以静音。

常量值:64(0x00000040)

CAPABILITY_RESPOND_VIA_TEXT

Added in API level 23
int CAPABILITY_RESPOND_VIA_TEXT

呼叫支持通过文本选项进行响应

常量值:32(0x00000020)

CAPABILITY_SEPARATE_FROM_CONFERENCE

Added in API level 23
int CAPABILITY_SEPARATE_FROM_CONFERENCE

通话可以从其母公司 Conference分离,如果有的话。

常量值:4096(0x00001000)

CAPABILITY_SUPPORTS_VT_LOCAL_BIDIRECTIONAL

Added in API level 23
int CAPABILITY_SUPPORTS_VT_LOCAL_BIDIRECTIONAL

本地设备支持双向视频通话。

常量值:768(0x00000300)

CAPABILITY_SUPPORTS_VT_LOCAL_RX

Added in API level 23
int CAPABILITY_SUPPORTS_VT_LOCAL_RX

本地设备支持接收视频。

常量值:256(0x00000100)

CAPABILITY_SUPPORTS_VT_LOCAL_TX

Added in API level 23
int CAPABILITY_SUPPORTS_VT_LOCAL_TX

本地设备支持传输视频。

常量值:512(0x00000200)

CAPABILITY_SUPPORTS_VT_REMOTE_BIDIRECTIONAL

Added in API level 23
int CAPABILITY_SUPPORTS_VT_REMOTE_BIDIRECTIONAL

远程设备支持双向视频通话。

常量值:3072(0x00000c00)

CAPABILITY_SUPPORTS_VT_REMOTE_RX

Added in API level 23
int CAPABILITY_SUPPORTS_VT_REMOTE_RX

远程设备支持接收视频。

常量值:1024(0x00000400)

CAPABILITY_SUPPORTS_VT_REMOTE_TX

Added in API level 23
int CAPABILITY_SUPPORTS_VT_REMOTE_TX

远程设备支持传输视频。

常量值:2048(0x00000800)

CAPABILITY_SUPPORT_HOLD

Added in API level 23
int CAPABILITY_SUPPORT_HOLD

通话支持保持功能。

常量值:2(0x00000002)

CAPABILITY_SWAP_CONFERENCE

Added in API level 23
int CAPABILITY_SWAP_CONFERENCE

会议中的呼叫可以在前景和背景之间交换。 有关更多信息,请参阅CAPABILITY_MERGE_CONFERENCE

这只适用于 Conference

常量值:8(0x00000008)

PROPERTY_CONFERENCE

Added in API level 23
int PROPERTY_CONFERENCE

通话目前是否为会议。

常数值:1(0x00000001)

PROPERTY_EMERGENCY_CALLBACK_MODE

Added in API level 23
int PROPERTY_EMERGENCY_CALLBACK_MODE

是否在设备处于紧急回拨模式时进行呼叫。

常量值:4(0x00000004)

PROPERTY_ENTERPRISE_CALL

Added in API level 24
int PROPERTY_ENTERPRISE_CALL

通话是否与工作档案相关联。

常量值:32(0x00000020)

PROPERTY_GENERIC_CONFERENCE

Added in API level 23
int PROPERTY_GENERIC_CONFERENCE

是否是通用会议,我们不知道会议参与者的确切状态(例如,在CDMA上)。

常量值:2(0x00000002)

PROPERTY_HIGH_DEF_AUDIO

Added in API level 23
int PROPERTY_HIGH_DEF_AUDIO

通话正在使用高清音频。

常量值:16(0x00000010)

PROPERTY_WIFI

Added in API level 23
int PROPERTY_WIFI

连接正在使用WIFI。

常量值:8(0x00000008)

Public methods

can

Added in API level 23
boolean can (int capabilities, 
                int capability)

提供的功能是否支持指定的功能。

Parameters
capabilities int: A bit field of capabilities.
capability int: The capability to check capabilities for.
Returns
boolean Whether the specified capability is supported.

can

Added in API level 23
boolean can (int capability)

Details的功能是否支持指定的功能。

Parameters
capability int: The capability to check capabilities for.
Returns
boolean Whether the specified capability is supported.

capabilitiesToString

Added in API level 23
String capabilitiesToString (int capabilities)

将一组能力位( CAPABILITY_* )渲染为可读的字符串。

Parameters
capabilities int: A capability bit field.
Returns
String A human readable string representation.

equals

Added in API level 23
boolean equals (Object o)

指示其他某个对象是否“等于”这一个。

equals方法在非空对象引用上实现等价关系:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

Objectequals方法实现了对象上最可能的等价关系; 也就是说,对于任何非空参考值xy ,此方法返回true当且仅当xy引用同一对象( x == y的值为true )。

请注意,无论何时覆盖此方法,通常都需要重写 hashCode方法,以便维护 hashCode方法的一般合约,该方法声明等同对象必须具有相同的哈希代码。

Parameters
o Object: the reference object with which to compare.
Returns
boolean true if this object is the same as the obj argument; false otherwise.

getAccountHandle

Added in API level 23
PhoneAccountHandle getAccountHandle ()

Returns
PhoneAccountHandle The PhoneAccountHandle whereby the Call is currently being routed.

getCallCapabilities

Added in API level 23
int getCallCapabilities ()

Returns
int A bitmask of the capabilities of the Call, as defined by the various CAPABILITY_* constants in this class.

getCallProperties

Added in API level 23
int getCallProperties ()

Returns
int A bitmask of the properties of the Call, as defined by the various PROPERTY_* constants in this class.

getCallerDisplayName

Added in API level 23
String getCallerDisplayName ()

Returns
String The display name for the caller.

getCallerDisplayNamePresentation

Added in API level 23
int getCallerDisplayNamePresentation ()

Returns
int The presentation requirements for the caller display name. See TelecomManager for valid values.

getConnectTimeMillis

Added in API level 23
long getConnectTimeMillis ()

Returns
long The time the Call has been connected. This information is updated periodically, but user interfaces should not rely on this to display any "call time clock".

getDisconnectCause

Added in API level 23
DisconnectCause getDisconnectCause ()

Returns
DisconnectCause For a STATE_DISCONNECTED Call, the disconnect cause expressed by DisconnectCause.

getExtras

Added in API level 23
Bundle getExtras ()

Returns
Bundle The extras associated with this call.

getGatewayInfo

Added in API level 23
GatewayInfo getGatewayInfo ()

Returns
GatewayInfo Information about any calling gateway the Call may be using.

getHandle

Added in API level 23
Uri getHandle ()

Returns
Uri The handle (e.g., phone number) to which the Call is currently connected.

getHandlePresentation

Added in API level 23
int getHandlePresentation ()

Returns
int The presentation requirements for the handle. See TelecomManager for valid values.

getIntentExtras

Added in API level 23
Bundle getIntentExtras ()

Returns
Bundle The extras used with the original intent to place this call.

getStatusHints

Added in API level 23
StatusHints getStatusHints ()

Returns
StatusHints The current StatusHints, or null if none have been set.

getVideoState

Added in API level 23
int getVideoState ()

Returns
int The video state of the Call.

hasProperty

Added in API level 23
boolean hasProperty (int property)

Details的属性是否包含指定的属性。

Parameters
property int: The property to check properties for.
Returns
boolean Whether the specified property is supported.

hasProperty

Added in API level 23
boolean hasProperty (int properties, 
                int property)

所提供的属性是否包含指定的属性。

Parameters
properties int: A bit field of properties.
property int: The property to check properties for.
Returns
boolean Whether the specified property is supported.

hashCode

Added in API level 23
int hashCode ()

返回对象的哈希码值。 为了散列表的好处而支持此方法,例如由HashMap提供的HashMap

hashCode的总合同是:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals(Object) method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals(java.lang.Object) method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.

尽可能合理实用,类Object定义的hashCode方法确实为不同的对象返回不同的整数。 (这通常通过将对象的内部地址转换为整数来实现,但Java TM编程语言不需要此实现技术。)

Returns
int a hash code value for this object.

propertiesToString

Added in API level 23
String propertiesToString (int properties)

将一组属性位( PROPERTY_* )渲染为可读的字符串。

Parameters
properties int: A property bit field.
Returns
String A human readable string representation.

toString

Added in API level 23
String toString ()

返回对象的字符串表示形式。 一般来说, toString方法会返回一个“文本表示”该对象的字符串。 结果应该是一个简洁但内容丰富的表述,对于一个人来说很容易阅读。 建议所有子类重写此方法。

ObjecttoString方法返回一个字符串,其中包含对象为实例的类的名称,符号字符“ @ ”以及对象的哈希代码的无符号十六进制表示形式。 换句话说,这个方法返回一个字符串,其值等于:

 getClass().getName() + '@' + Integer.toHexString(hashCode())
 

Returns
String a string representation of the object.

Hooray!