Added in API level 31

TelephonyCallback.CallDisconnectCauseListener


public static interface TelephonyCallback.CallDisconnectCauseListener

android.telephony.TelephonyCallback.CallDisconnectCauseListener


Interface for call disconnect cause listener.

Summary

Public methods

abstract void onCallDisconnectCauseChanged(int disconnectCause, int preciseDisconnectCause)

Callback invoked when call disconnect cause changes on the registered subscription.

Public methods

onCallDisconnectCauseChanged

Added in API level 31
public abstract void onCallDisconnectCauseChanged (int disconnectCause, 
                int preciseDisconnectCause)

Callback invoked when call disconnect cause changes on the registered subscription. Note, the registration subscription ID comes from TelephonyManager object which registers TelephonyCallback by TelephonyManager.registerTelephonyCallback(Executor, TelephonyCallback). If this TelephonyManager object was created with TelephonyManager.createForSubscriptionId(int), then the callback applies to the subscription ID. Otherwise, this callback applies to SubscriptionManager.getDefaultSubscriptionId().
Requires Manifest.permission.READ_PRECISE_PHONE_STATE

Parameters
disconnectCause int: the disconnect cause Value is DisconnectCause.NOT_VALID, DisconnectCause.NOT_DISCONNECTED, DisconnectCause.INCOMING_MISSED, DisconnectCause.NORMAL, DisconnectCause.LOCAL, DisconnectCause.BUSY, DisconnectCause.CONGESTION, DisconnectCause.MMI, DisconnectCause.INVALID_NUMBER, DisconnectCause.NUMBER_UNREACHABLE, DisconnectCause.SERVER_UNREACHABLE, DisconnectCause.INVALID_CREDENTIALS, DisconnectCause.OUT_OF_NETWORK, DisconnectCause.SERVER_ERROR, DisconnectCause.TIMED_OUT, DisconnectCause.LOST_SIGNAL, DisconnectCause.LIMIT_EXCEEDED, DisconnectCause.INCOMING_REJECTED, DisconnectCause.POWER_OFF, DisconnectCause.OUT_OF_SERVICE, DisconnectCause.ICC_ERROR, DisconnectCause.CALL_BARRED, DisconnectCause.FDN_BLOCKED, DisconnectCause.CS_RESTRICTED, DisconnectCause.CS_RESTRICTED_NORMAL, DisconnectCause.CS_RESTRICTED_EMERGENCY, DisconnectCause.UNOBTAINABLE_NUMBER, DisconnectCause.CDMA_LOCKED_UNTIL_POWER_CYCLE, DisconnectCause.CDMA_DROP, DisconnectCause.CDMA_INTERCEPT, DisconnectCause.CDMA_REORDER, DisconnectCause.CDMA_SO_REJECT, DisconnectCause.CDMA_RETRY_ORDER, DisconnectCause.CDMA_ACCESS_FAILURE, DisconnectCause.CDMA_PREEMPTED, DisconnectCause.CDMA_NOT_EMERGENCY, DisconnectCause.CDMA_ACCESS_BLOCKED, or DisconnectCause.ERROR_UNSPECIFIED

preciseDisconnectCause int: the precise disconnect cause Value is android.telephony.PreciseDisconnectCause.NOT_VALID, android.telephony.PreciseDisconnectCause.NO_DISCONNECT_CAUSE_AVAILABLE, android.telephony.PreciseDisconnectCause.UNOBTAINABLE_NUMBER, android.telephony.PreciseDisconnectCause.NORMAL, android.telephony.PreciseDisconnectCause.BUSY, android.telephony.PreciseDisconnectCause.NUMBER_CHANGED, android.telephony.PreciseDisconnectCause.STATUS_ENQUIRY, android.telephony.PreciseDisconnectCause.NORMAL_UNSPECIFIED, android.telephony.PreciseDisconnectCause.NO_CIRCUIT_AVAIL, android.telephony.PreciseDisconnectCause.TEMPORARY_FAILURE, android.telephony.PreciseDisconnectCause.SWITCHING_CONGESTION, android.telephony.PreciseDisconnectCause.CHANNEL_NOT_AVAIL, android.telephony.PreciseDisconnectCause.QOS_NOT_AVAIL, android.telephony.PreciseDisconnectCause.BEARER_NOT_AVAIL, android.telephony.PreciseDisconnectCause.ACM_LIMIT_EXCEEDED, android.telephony.PreciseDisconnectCause.CALL_BARRED, android.telephony.PreciseDisconnectCause.FDN_BLOCKED, android.telephony.PreciseDisconnectCause.IMSI_UNKNOWN_IN_VLR, android.telephony.PreciseDisconnectCause.IMEI_NOT_ACCEPTED, android.telephony.PreciseDisconnectCause.CDMA_LOCKED_UNTIL_POWER_CYCLE, android.telephony.PreciseDisconnectCause.CDMA_DROP, android.telephony.PreciseDisconnectCause.CDMA_INTERCEPT, android.telephony.PreciseDisconnectCause.CDMA_REORDER, android.telephony.PreciseDisconnectCause.CDMA_SO_REJECT, android.telephony.PreciseDisconnectCause.CDMA_RETRY_ORDER, android.telephony.PreciseDisconnectCause.CDMA_ACCESS_FAILURE, android.telephony.PreciseDisconnectCause.CDMA_PREEMPTED, android.telephony.PreciseDisconnectCause.CDMA_NOT_EMERGENCY, android.telephony.PreciseDisconnectCause.CDMA_ACCESS_BLOCKED, or android.telephony.PreciseDisconnectCause.ERROR_UNSPECIFIED