语言

CallControl.Disconnect(DisconnectCause, IExecutor, IOutcomeReceiver) 方法

定义

请求电信断开呼叫的连接,并从电信跟踪中删除呼叫。

[Android.Runtime.Register("disconnect", "(Landroid/telecom/DisconnectCause;Ljava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "", ApiSince=34)]
public void Disconnect(Android.Telecom.DisconnectCause disconnectCause, Java.Util.Concurrent.IExecutor executor, Android.OS.IOutcomeReceiver callback);
[<Android.Runtime.Register("disconnect", "(Landroid/telecom/DisconnectCause;Ljava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "", ApiSince=34)>]
member this.Disconnect : Android.Telecom.DisconnectCause * Java.Util.Concurrent.IExecutor * Android.OS.IOutcomeReceiver -> unit

参数

disconnectCause
DisconnectCause

表示断开调用连接的原因。 传入的唯一有效代码android.telecom.DisconnectCause是:<ul><li>DisconnectCause#LOCAL</li/li><>DisconnectCause#REMOTE</><>DisconnectCause#REJECTED<li/li><>DisconnectCause#MISSED</li/ul><>

executor
IExecutor

Executor调用回调的OutcomeReceiver依据。

callback
IOutcomeReceiver

这将在电信端完成,详细说明所请求操作的成功或失败。

                               <code data-dev-comment-type="c">OutcomeReceiver#onResult</code> will be called if Telecom has
                               successfully disconnected the call.

                               <code data-dev-comment-type="c">OutcomeReceiver#onError</code> will be called if Telecom has failed
                               to disconnect the call.  A <code data-dev-comment-type="c">CallException</code> will be passed
                               that details why the operation failed.

        &lt;p&gt;
        Note: After the call has been successfully disconnected, calling any CallControl API will
        result in the <code data-dev-comment-type="c">OutcomeReceiver#onError</code> with
        <code data-dev-comment-type="c">CallException#CODE_CALL_IS_NOT_BEING_TRACKED</code>.
特性

注解

请求电信断开呼叫的连接,并从电信跟踪中删除呼叫。

Java文档android.telecom.CallControl.disconnect(android.telecom.DisconnectCause, java.util.concurrent.Executor, android.os.OutcomeReceiver<java.lang.Void, android.telecom.CallException>)。

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于