Search in sources :

Example 11 with VoLteServiceState

use of android.telephony.VoLteServiceState in project android_frameworks_opt_telephony by LineageOS.

the class Phone method handleSrvccStateChanged.

private void handleSrvccStateChanged(int[] ret) {
    Rlog.d(LOG_TAG, "handleSrvccStateChanged");
    ArrayList<Connection> conn = null;
    Phone imsPhone = mImsPhone;
    Call.SrvccState srvccState = Call.SrvccState.NONE;
    if (ret != null && ret.length != 0) {
        int state = ret[0];
        switch(state) {
            case VoLteServiceState.HANDOVER_STARTED:
                srvccState = Call.SrvccState.STARTED;
                if (imsPhone != null) {
                    conn = imsPhone.getHandoverConnection();
                    migrateFrom(imsPhone);
                } else {
                    Rlog.d(LOG_TAG, "HANDOVER_STARTED: mImsPhone null");
                }
                break;
            case VoLteServiceState.HANDOVER_COMPLETED:
                srvccState = Call.SrvccState.COMPLETED;
                if (imsPhone != null) {
                    imsPhone.notifySrvccState(srvccState);
                } else {
                    Rlog.d(LOG_TAG, "HANDOVER_COMPLETED: mImsPhone null");
                }
                break;
            case VoLteServiceState.HANDOVER_FAILED:
            case VoLteServiceState.HANDOVER_CANCELED:
                srvccState = Call.SrvccState.FAILED;
                break;
            default:
                // ignore invalid state
                return;
        }
        getCallTracker().notifySrvccState(srvccState, conn);
        VoLteServiceState lteState = new VoLteServiceState(state);
        notifyVoLteServiceStateChanged(lteState);
    }
}
Also used : ImsPhoneCall(com.android.internal.telephony.imsphone.ImsPhoneCall) ImsCall(com.android.ims.ImsCall) VoLteServiceState(android.telephony.VoLteServiceState)

Aggregations

VoLteServiceState (android.telephony.VoLteServiceState)11 RemoteException (android.os.RemoteException)5 SmallTest (android.test.suitebuilder.annotation.SmallTest)5 Bundle (android.os.Bundle)1 Parcel (android.os.Parcel)1 ImsCall (com.android.ims.ImsCall)1 ImsPhoneCall (com.android.internal.telephony.imsphone.ImsPhoneCall)1 Test (org.junit.Test)1