Android 电话堆栈中的不同呼叫状态代表什么?

发布于 2024-11-15 00:33:30 字数 734 浏览 5 评论 0原文

内部 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;
    }
}

不同的状态代表什么?

The internal Android class com.android.internal.telephony.Call contains an enum called State and defined as follows:

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;
    }
}

What does the different states represent?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

夜雨飘雪 2024-11-22 00:33:30

好吧,这是我自己尝试回答这个问题:

/** 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;

Okay, this is my own attempt at answering the question:

/** 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;
空心↖ 2024-11-22 00:33:30
3GPP TS 27.007 version 13.5.0 Release 13

List current calls +CLCC

Command 
+CLCC

Possible response(s)
[+CLCC: <ccid1>,<dir>,<stat>,<mode>,<mpty>[,<number>
,<type>[,<alpha>[,<priority>[,<CLI validity>]]]]
[<CR><LF>+CLCC: <ccid2>,<dir>,<stat>,<mode>,<mpty>[,
<number>,<type>[,<alpha>[,<priority>[,<CLI validity>
]]]]
[...]]]
+CME ERROR: <err>

<stat>: integer type (state of the call)
0 active
1 held
2 dialing (MO call)
3 alerting (MO call)
4 incoming (MT call)
5 waiting (MT call) 

My interpretation:

0 active: call in progress (setup was successful)
1 held: call on hold
2 dialing (MO call): number dialed
3 alerting (MO call): number dialed and the called party is alerted
4 incoming (MT call): incoming call, ringtone played (AT RING notification)
5 waiting (MT call): call waiting notification while another call is active (if call waiting feature enabled)
3GPP TS 27.007 version 13.5.0 Release 13

List current calls +CLCC

Command 
+CLCC

Possible response(s)
[+CLCC: <ccid1>,<dir>,<stat>,<mode>,<mpty>[,<number>
,<type>[,<alpha>[,<priority>[,<CLI validity>]]]]
[<CR><LF>+CLCC: <ccid2>,<dir>,<stat>,<mode>,<mpty>[,
<number>,<type>[,<alpha>[,<priority>[,<CLI validity>
]]]]
[...]]]
+CME ERROR: <err>

<stat>: integer type (state of the call)
0 active
1 held
2 dialing (MO call)
3 alerting (MO call)
4 incoming (MT call)
5 waiting (MT call) 

My interpretation:

0 active: call in progress (setup was successful)
1 held: call on hold
2 dialing (MO call): number dialed
3 alerting (MO call): number dialed and the called party is alerted
4 incoming (MT call): incoming call, ringtone played (AT RING notification)
5 waiting (MT call): call waiting notification while another call is active (if call waiting feature enabled)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文