use of android.hardware.radio.V1_0.RadioResponseInfo in project android_frameworks_opt_telephony by LineageOS.
the class RILTest method createFakeRadioResponseInfo.
private static RadioResponseInfo createFakeRadioResponseInfo(int serial, int error, int type) {
RadioResponseInfo respInfo = new RadioResponseInfo();
respInfo.serial = serial;
respInfo.error = error;
respInfo.type = type;
return respInfo;
}
use of android.hardware.radio.V1_0.RadioResponseInfo in project android_frameworks_opt_telephony by LineageOS.
the class RadioResponse method responseDataCallList.
private void responseDataCallList(RadioResponseInfo responseInfo, ArrayList<SetupDataCallResult> dataCallResultList) {
RILRequest rr = mRil.processResponse(responseInfo);
if (rr != null) {
ArrayList<DataCallResponse> dcResponseList = new ArrayList<>();
for (SetupDataCallResult dcResult : dataCallResultList) {
dcResponseList.add(RIL.convertDataCallResult(dcResult));
}
if (responseInfo.error == RadioError.NONE) {
sendMessageResponse(rr.mResult, dcResponseList);
}
mRil.processResponseDone(rr, responseInfo, dcResponseList);
}
}
use of android.hardware.radio.V1_0.RadioResponseInfo in project android_frameworks_opt_telephony by LineageOS.
the class RILTest method verifyRILErrorResponse.
private static void verifyRILErrorResponse(RIL ril, int serial, int requestType, int error) {
RadioResponseInfo responseInfo = createFakeRadioResponseInfo(serial, error, RadioResponseType.SOLICITED);
RILRequest rr = ril.processResponse(responseInfo);
assertNotNull(rr);
assertEquals(serial, rr.getSerial());
assertEquals(requestType, rr.getRequest());
assertTrue(ril.getWakeLock(RIL.FOR_WAKELOCK).isHeld());
ril.processResponseDone(rr, responseInfo, null);
assertEquals(0, ril.getRilRequestList().size());
assertFalse(ril.getWakeLock(RIL.FOR_WAKELOCK).isHeld());
}
use of android.hardware.radio.V1_0.RadioResponseInfo in project android_frameworks_opt_telephony by LineageOS.
the class RILTest method verifyRILUnsupportedResponse.
private static void verifyRILUnsupportedResponse(RIL ril, int serial, int requestType, Consumer<RILRequest> unsupportedResponseEmulator) {
RadioResponseInfo responseInfo = createFakeRadioResponseInfo(serial, RadioError.REQUEST_NOT_SUPPORTED, RadioResponseType.SOLICITED);
RILRequest rr = ril.processResponse(responseInfo);
assertNotNull(rr);
assertEquals(serial, rr.getSerial());
assertEquals(requestType, rr.getRequest());
assertTrue(ril.getWakeLock(RIL.FOR_WAKELOCK).isHeld());
unsupportedResponseEmulator.accept(rr);
ril.processResponseDone(rr, responseInfo, null);
assertEquals(1, ril.getRilRequestList().size());
assertTrue(ril.getWakeLock(RIL.FOR_WAKELOCK).isHeld());
}
use of android.hardware.radio.V1_0.RadioResponseInfo in project android_frameworks_opt_telephony by LineageOS.
the class RILTest method verifyRILResponse.
private static void verifyRILResponse(RIL ril, int serial, int requestType) {
RadioResponseInfo responseInfo = createFakeRadioResponseInfo(serial, RadioError.NONE, RadioResponseType.SOLICITED);
RILRequest rr = ril.processResponse(responseInfo);
assertNotNull(rr);
assertEquals(serial, rr.getSerial());
assertEquals(requestType, rr.getRequest());
assertTrue(ril.getWakeLock(RIL.FOR_WAKELOCK).isHeld());
ril.processResponseDone(rr, responseInfo, null);
assertEquals(0, ril.getRilRequestList().size());
assertFalse(ril.getWakeLock(RIL.FOR_WAKELOCK).isHeld());
}
Aggregations