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