FileDocCategorySizeDatePackage
PreciseCallState.javaAPI DocAndroid 5.1 API11518Thu Mar 12 22:22:42 GMT 2015android.telephony

PreciseCallState

public class PreciseCallState extends Object implements android.os.Parcelable
Contains precise call state and call fail causes generated by the framework and the RIL. The following call information is included in returned PreciseCallState:
  • Ringing call state.
  • Foreground call state.
  • Background call state.
  • Disconnect cause; generated by the framework.
  • Precise disconnect cause; generated by the RIL.
hide

Fields Summary
public static final int
PRECISE_CALL_STATE_NOT_VALID
Call state is not valid (Not received a call state).
public static final int
PRECISE_CALL_STATE_IDLE
Call state: No activity.
public static final int
PRECISE_CALL_STATE_ACTIVE
Call state: Active.
public static final int
PRECISE_CALL_STATE_HOLDING
Call state: On hold.
public static final int
PRECISE_CALL_STATE_DIALING
Call state: Dialing.
public static final int
PRECISE_CALL_STATE_ALERTING
Call state: Alerting.
public static final int
PRECISE_CALL_STATE_INCOMING
Call state: Incoming.
public static final int
PRECISE_CALL_STATE_WAITING
Call state: Waiting.
public static final int
PRECISE_CALL_STATE_DISCONNECTED
Call state: Disconnected.
public static final int
PRECISE_CALL_STATE_DISCONNECTING
Call state: Disconnecting.
private int
mRingingCallState
private int
mForegroundCallState
private int
mBackgroundCallState
private int
mDisconnectCause
private int
mPreciseDisconnectCause
public static final Parcelable.Creator
CREATOR
Constructors Summary
public PreciseCallState(int ringingCall, int foregroundCall, int backgroundCall, int disconnectCause, int preciseDisconnectCause)
Constructor

hide


           
          
                
        mRingingCallState = ringingCall;
        mForegroundCallState = foregroundCall;
        mBackgroundCallState = backgroundCall;
        mDisconnectCause = disconnectCause;
        mPreciseDisconnectCause = preciseDisconnectCause;
    
public PreciseCallState()
Empty Constructor

hide

    
private PreciseCallState(android.os.Parcel in)
Construct a PreciseCallState object from the given parcel.

        mRingingCallState = in.readInt();
        mForegroundCallState = in.readInt();
        mBackgroundCallState = in.readInt();
        mDisconnectCause = in.readInt();
        mPreciseDisconnectCause = in.readInt();
    
Methods Summary
public intdescribeContents()

        return 0;
    
public booleanequals(java.lang.Object obj)

        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        PreciseCallState other = (PreciseCallState) obj;
        return (mRingingCallState != other.mRingingCallState &&
            mForegroundCallState != other.mForegroundCallState &&
            mBackgroundCallState != other.mBackgroundCallState &&
            mDisconnectCause != other.mDisconnectCause &&
            mPreciseDisconnectCause != other.mPreciseDisconnectCause);
    
public intgetBackgroundCallState()
Get precise background call state

see
PreciseCallState#PRECISE_CALL_STATE_NOT_VALID
see
PreciseCallState#PRECISE_CALL_STATE_IDLE
see
PreciseCallState#PRECISE_CALL_STATE_ACTIVE
see
PreciseCallState#PRECISE_CALL_STATE_HOLDING
see
PreciseCallState#PRECISE_CALL_STATE_DIALING
see
PreciseCallState#PRECISE_CALL_STATE_ALERTING
see
PreciseCallState#PRECISE_CALL_STATE_INCOMING
see
PreciseCallState#PRECISE_CALL_STATE_WAITING
see
PreciseCallState#PRECISE_CALL_STATE_DISCONNECTED
see
PreciseCallState#PRECISE_CALL_STATE_DISCONNECTING

        return mBackgroundCallState;
    
public intgetDisconnectCause()
Get disconnect cause generated by the framework

see
DisconnectCause#NOT_VALID
see
DisconnectCause#NOT_DISCONNECTED
see
DisconnectCause#INCOMING_MISSED
see
DisconnectCause#NORMAL
see
DisconnectCause#LOCAL
see
DisconnectCause#BUSY
see
DisconnectCause#CONGESTION
see
DisconnectCause#MMI
see
DisconnectCause#INVALID_NUMBER
see
DisconnectCause#NUMBER_UNREACHABLE
see
DisconnectCause#SERVER_UNREACHABLE
see
DisconnectCause#INVALID_CREDENTIALS
see
DisconnectCause#OUT_OF_NETWORK
see
DisconnectCause#SERVER_ERROR
see
DisconnectCause#TIMED_OUT
see
DisconnectCause#LOST_SIGNAL
see
DisconnectCause#LIMIT_EXCEEDED
see
DisconnectCause#INCOMING_REJECTED
see
DisconnectCause#POWER_OFF
see
DisconnectCause#OUT_OF_SERVICE
see
DisconnectCause#ICC_ERROR
see
DisconnectCause#CALL_BARRED
see
DisconnectCause#FDN_BLOCKED
see
DisconnectCause#CS_RESTRICTED
see
DisconnectCause#CS_RESTRICTED_NORMAL
see
DisconnectCause#CS_RESTRICTED_EMERGENCY
see
DisconnectCause#UNOBTAINABLE_NUMBER
see
DisconnectCause#CDMA_LOCKED_UNTIL_POWER_CYCLE
see
DisconnectCause#CDMA_DROP
see
DisconnectCause#CDMA_INTERCEPT
see
DisconnectCause#CDMA_REORDER
see
DisconnectCause#CDMA_SO_REJECT
see
DisconnectCause#CDMA_RETRY_ORDER
see
DisconnectCause#CDMA_ACCESS_FAILURE
see
DisconnectCause#CDMA_PREEMPTED
see
DisconnectCause#CDMA_NOT_EMERGENCY
see
DisconnectCause#CDMA_ACCESS_BLOCKED
see
DisconnectCause#ERROR_UNSPECIFIED

        return mDisconnectCause;
    
public intgetForegroundCallState()
Get precise foreground call state

see
PreciseCallState#PRECISE_CALL_STATE_NOT_VALID
see
PreciseCallState#PRECISE_CALL_STATE_IDLE
see
PreciseCallState#PRECISE_CALL_STATE_ACTIVE
see
PreciseCallState#PRECISE_CALL_STATE_HOLDING
see
PreciseCallState#PRECISE_CALL_STATE_DIALING
see
PreciseCallState#PRECISE_CALL_STATE_ALERTING
see
PreciseCallState#PRECISE_CALL_STATE_INCOMING
see
PreciseCallState#PRECISE_CALL_STATE_WAITING
see
PreciseCallState#PRECISE_CALL_STATE_DISCONNECTED
see
PreciseCallState#PRECISE_CALL_STATE_DISCONNECTING

        return mForegroundCallState;
    
public intgetPreciseDisconnectCause()
Get disconnect cause generated by the RIL

see
PreciseDisconnectCause#NOT_VALID
see
PreciseDisconnectCause#NO_DISCONNECT_CAUSE_AVAILABLE
see
PreciseDisconnectCause#UNOBTAINABLE_NUMBER
see
PreciseDisconnectCause#NORMAL
see
PreciseDisconnectCause#BUSY
see
PreciseDisconnectCause#NUMBER_CHANGED
see
PreciseDisconnectCause#STATUS_ENQUIRY
see
PreciseDisconnectCause#NORMAL_UNSPECIFIED
see
PreciseDisconnectCause#NO_CIRCUIT_AVAIL
see
PreciseDisconnectCause#TEMPORARY_FAILURE
see
PreciseDisconnectCause#SWITCHING_CONGESTION
see
PreciseDisconnectCause#CHANNEL_NOT_AVAIL
see
PreciseDisconnectCause#QOS_NOT_AVAIL
see
PreciseDisconnectCause#BEARER_NOT_AVAIL
see
PreciseDisconnectCause#ACM_LIMIT_EXCEEDED
see
PreciseDisconnectCause#CALL_BARRED
see
PreciseDisconnectCause#FDN_BLOCKED
see
PreciseDisconnectCause#IMSI_UNKNOWN_IN_VLR
see
PreciseDisconnectCause#IMEI_NOT_ACCEPTED
see
PreciseDisconnectCause#CDMA_LOCKED_UNTIL_POWER_CYCLE
see
PreciseDisconnectCause#CDMA_DROP
see
PreciseDisconnectCause#CDMA_INTERCEPT
see
PreciseDisconnectCause#CDMA_REORDER
see
PreciseDisconnectCause#CDMA_SO_REJECT
see
PreciseDisconnectCause#CDMA_RETRY_ORDER
see
PreciseDisconnectCause#CDMA_ACCESS_FAILURE
see
PreciseDisconnectCause#CDMA_PREEMPTED
see
PreciseDisconnectCause#CDMA_NOT_EMERGENCY
see
PreciseDisconnectCause#CDMA_ACCESS_BLOCKED
see
PreciseDisconnectCause#ERROR_UNSPECIFIED

        return mPreciseDisconnectCause;
    
public intgetRingingCallState()
Get precise ringing call state

see
PreciseCallState#PRECISE_CALL_STATE_NOT_VALID
see
PreciseCallState#PRECISE_CALL_STATE_IDLE
see
PreciseCallState#PRECISE_CALL_STATE_ACTIVE
see
PreciseCallState#PRECISE_CALL_STATE_HOLDING
see
PreciseCallState#PRECISE_CALL_STATE_DIALING
see
PreciseCallState#PRECISE_CALL_STATE_ALERTING
see
PreciseCallState#PRECISE_CALL_STATE_INCOMING
see
PreciseCallState#PRECISE_CALL_STATE_WAITING
see
PreciseCallState#PRECISE_CALL_STATE_DISCONNECTED
see
PreciseCallState#PRECISE_CALL_STATE_DISCONNECTING

        return mRingingCallState;
    
public inthashCode()


    
       
        final int prime = 31;
        int result = 1;
        result = prime * result + mRingingCallState;
        result = prime * result + mForegroundCallState;
        result = prime * result + mBackgroundCallState;
        result = prime * result + mDisconnectCause;
        result = prime * result + mPreciseDisconnectCause;
        return result;
    
public java.lang.StringtoString()

        StringBuffer sb = new StringBuffer();

        sb.append("Ringing call state: " + mRingingCallState);
        sb.append(", Foreground call state: " + mForegroundCallState);
        sb.append(", Background call state: " + mBackgroundCallState);
        sb.append(", Disconnect cause: " + mDisconnectCause);
        sb.append(", Precise disconnect cause: " + mPreciseDisconnectCause);

        return sb.toString();
    
public voidwriteToParcel(android.os.Parcel out, int flags)

        out.writeInt(mRingingCallState);
        out.writeInt(mForegroundCallState);
        out.writeInt(mBackgroundCallState);
        out.writeInt(mDisconnectCause);
        out.writeInt(mPreciseDisconnectCause);