use of com.android.internal.telephony.GsmCdmaConnection in project android_frameworks_opt_telephony by LineageOS.
the class VoiceCallSessionStats method onRilCallListChanged.
/**
* Updates internal states when CS calls are created or terminated, or CS call state is changed.
*/
public synchronized void onRilCallListChanged(List<GsmCdmaConnection> connections) {
for (Connection conn : connections) {
int id = getConnectionId(conn);
if (!mCallProtos.contains(id)) {
// handle new connections
if (conn.getDisconnectCause() == DisconnectCause.NOT_DISCONNECTED) {
addCall(conn);
checkCallSetup(conn, mCallProtos.get(id));
} else {
logd("onRilCallListChanged: skip adding disconnected connection");
}
} else {
VoiceCallSession proto = mCallProtos.get(id);
// handle call state change
checkCallSetup(conn, proto);
// handle terminated connections
if (conn.getDisconnectCause() != DisconnectCause.NOT_DISCONNECTED) {
// should be CS
proto.bearerAtEnd = getBearer(conn);
proto.disconnectReasonCode = conn.getDisconnectCause();
proto.disconnectExtraCode = conn.getPreciseDisconnectCause();
proto.disconnectExtraMessage = conn.getVendorDisconnectCause();
finishCall(id);
}
}
}
// NOTE: we cannot check stray connections (CS call in our list but not in RIL), as
// GsmCdmaCallTracker can call this with a partial list
}
Aggregations