内部 Android 类 com.android.internal.telephony.Call包含一个名为 State 的枚举,定义如下:
public enum State {
IDLE, ACTIVE, HOLDING, DIALING, ALERTING, INCOMING, WAITING, DISCONNECTED, DISCONNECTING;
public boolean isAlive() {
return !(this == IDLE || this == DISCONNECTED || this == DISCONNECTING);
}
public boolean isRinging() {
return this == INCOMING || this == WAITING;
}
public boolean isDialing() {
return this == DIALING || this == ALERTING;
}
}
不同的状态代表什么?
最佳答案
好的,这是我自己尝试回答的问题:
/** Call is idle. */
IDLE,
/** Call is active i.e. audio paths are connected. */
ACTIVE,
/** We have placed the call on hold. */
HOLDING,
/** Outgoing dialling call initiated. */
DIALING,
/** Outgoing call is alerting receiving party. */
ALERTING,
/** Incoming call ready for pickup. */
INCOMING,
/** Incoming call is waiting for pickup, while another call is in progress. */
WAITING,
/** Call is disconnected, by either party. */
DISCONNECTED,
/** Call is currently being disconnected. */
DISCONNECTING;
关于android - Android 电话堆栈中的不同调用状态代表什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6290347/