use of com.android.internal.telephony.dataconnection.KeepaliveStatus in project android_frameworks_opt_telephony by LineageOS.
the class RadioIndication method keepaliveStatus.
/**
* Indicates a change in the status of an ongoing Keepalive session
* @param indicationType RadioIndicationType
* @param halStatus Status of the ongoing Keepalive session
*/
public void keepaliveStatus(int indicationType, android.hardware.radio.V1_1.KeepaliveStatus halStatus) {
mRil.processIndication(indicationType);
if (RIL.RILJ_LOGD) {
mRil.unsljLogRet(RIL_UNSOL_KEEPALIVE_STATUS, "handle=" + halStatus.sessionHandle + " code=" + halStatus.code);
}
KeepaliveStatus ks = new KeepaliveStatus(halStatus.sessionHandle, halStatus.code);
mRil.mNattKeepaliveStatusRegistrants.notifyRegistrants(new AsyncResult(null, ks, null));
}
use of com.android.internal.telephony.dataconnection.KeepaliveStatus in project android_frameworks_opt_telephony by LineageOS.
the class RadioResponse method startKeepaliveResponse.
/**
* @param responseInfo Response info struct containing response type, serial no. and error
* @param keepaliveStatus status of the keepalive with a handle for the session
*/
public void startKeepaliveResponse(RadioResponseInfo responseInfo, android.hardware.radio.V1_1.KeepaliveStatus keepaliveStatus) {
RILRequest rr = mRil.processResponse(responseInfo);
if (rr == null)
return;
KeepaliveStatus ret = null;
try {
switch(responseInfo.error) {
case RadioError.NONE:
int convertedStatus = convertHalKeepaliveStatusCode(keepaliveStatus.code);
if (convertedStatus < 0) {
ret = new KeepaliveStatus(KeepaliveStatus.ERROR_UNSUPPORTED);
} else {
ret = new KeepaliveStatus(keepaliveStatus.sessionHandle, convertedStatus);
}
// If responseInfo.error is NONE, response function sends the response message
// even if result is actually an error.
sendMessageResponse(rr.mResult, ret);
break;
case RadioError.REQUEST_NOT_SUPPORTED:
ret = new KeepaliveStatus(KeepaliveStatus.ERROR_UNSUPPORTED);
break;
case RadioError.NO_RESOURCES:
ret = new KeepaliveStatus(KeepaliveStatus.ERROR_NO_RESOURCES);
break;
default:
ret = new KeepaliveStatus(KeepaliveStatus.ERROR_UNKNOWN);
break;
}
} finally {
// If responseInfo.error != NONE, the processResponseDone sends the response message.
mRil.processResponseDone(rr, responseInfo, ret);
}
}
Aggregations