use of android.hardware.radio.V1_0.IRadio in project android_frameworks_opt_telephony by LineageOS.
the class RIL method sendSMSExpectMore.
@Override
public void sendSMSExpectMore(String smscPdu, String pdu, Message result) {
IRadio radioProxy = getRadioProxy(result);
if (radioProxy != null) {
RILRequest rr = obtainRequest(RIL_REQUEST_SEND_SMS_EXPECT_MORE, result, mRILDefaultWorkSource);
// Do not log function arg for privacy
if (RILJ_LOGD)
riljLog(rr.serialString() + "> " + requestToString(rr.mRequest));
GsmSmsMessage msg = constructGsmSendSmsRilRequest(smscPdu, pdu);
try {
radioProxy.sendSMSExpectMore(rr.mSerial, msg);
mMetrics.writeRilSendSms(mPhoneId, rr.mSerial, SmsSession.Event.Tech.SMS_GSM, SmsSession.Event.Format.SMS_FORMAT_3GPP);
} catch (RemoteException | RuntimeException e) {
handleRadioProxyExceptionForRR(rr, "sendSMSExpectMore", e);
}
}
}
use of android.hardware.radio.V1_0.IRadio in project android_frameworks_opt_telephony by LineageOS.
the class RIL method getModemActivityInfo.
@Override
public void getModemActivityInfo(Message result, WorkSource workSource) {
workSource = getDeafultWorkSourceIfInvalid(workSource);
IRadio radioProxy = getRadioProxy(result);
if (radioProxy != null) {
RILRequest rr = obtainRequest(RIL_REQUEST_GET_ACTIVITY_INFO, result, workSource);
if (RILJ_LOGD) {
riljLog(rr.serialString() + "> " + requestToString(rr.mRequest));
}
try {
radioProxy.getModemActivityInfo(rr.mSerial);
Message msg = mRilHandler.obtainMessage(EVENT_BLOCKING_RESPONSE_TIMEOUT);
msg.obj = null;
msg.arg1 = rr.mSerial;
mRilHandler.sendMessageDelayed(msg, DEFAULT_BLOCKING_MESSAGE_RESPONSE_TIMEOUT_MS);
} catch (RemoteException | RuntimeException e) {
handleRadioProxyExceptionForRR(rr, "getModemActivityInfo", e);
}
}
}
use of android.hardware.radio.V1_0.IRadio in project android_frameworks_opt_telephony by LineageOS.
the class RIL method supplySimDepersonalization.
@Override
public void supplySimDepersonalization(PersoSubState persoType, String controlKey, Message result) {
IRadio radioProxy = getRadioProxy(result);
// IRadio V1.5
if (mRadioVersion.greaterOrEqual(RADIO_HAL_VERSION_1_5)) {
android.hardware.radio.V1_5.IRadio radioProxy15 = (android.hardware.radio.V1_5.IRadio) radioProxy;
if (radioProxy15 != null) {
RILRequest rr = obtainRequest(RIL_REQUEST_ENTER_SIM_DEPERSONALIZATION, result, mRILDefaultWorkSource);
if (RILJ_LOGD) {
riljLog(rr.serialString() + "> " + requestToString(rr.mRequest) + " controlKey = " + controlKey + " persoType" + persoType);
}
try {
radioProxy15.supplySimDepersonalization(rr.mSerial, convertPersoTypeToHalPersoType(persoType), convertNullToEmptyString(controlKey));
} catch (RemoteException | RuntimeException e) {
handleRadioProxyExceptionForRR(rr, "supplySimDepersonalization", e);
}
}
} else {
if (result != null) {
AsyncResult.forMessage(result, null, CommandException.fromRilErrno(REQUEST_NOT_SUPPORTED));
result.sendToTarget();
}
}
}
use of android.hardware.radio.V1_0.IRadio in project android_frameworks_opt_telephony by LineageOS.
the class RIL method setCallForward.
@Override
public void setCallForward(int action, int cfReason, int serviceClass, String number, int timeSeconds, Message result) {
IRadio radioProxy = getRadioProxy(result);
if (radioProxy != null) {
RILRequest rr = obtainRequest(RIL_REQUEST_SET_CALL_FORWARD, result, mRILDefaultWorkSource);
if (RILJ_LOGD) {
riljLog(rr.serialString() + "> " + requestToString(rr.mRequest) + " action = " + action + " cfReason = " + cfReason + " serviceClass = " + serviceClass + " timeSeconds = " + timeSeconds);
}
android.hardware.radio.V1_0.CallForwardInfo cfInfo = new android.hardware.radio.V1_0.CallForwardInfo();
cfInfo.status = action;
cfInfo.reason = cfReason;
cfInfo.serviceClass = serviceClass;
cfInfo.toa = PhoneNumberUtils.toaFromString(number);
cfInfo.number = convertNullToEmptyString(number);
cfInfo.timeSeconds = timeSeconds;
try {
radioProxy.setCallForward(rr.mSerial, cfInfo);
} catch (RemoteException | RuntimeException e) {
handleRadioProxyExceptionForRR(rr, "setCallForward", e);
}
}
}
use of android.hardware.radio.V1_0.IRadio in project android_frameworks_opt_telephony by LineageOS.
the class RIL method iccIOForApp.
@Override
public void iccIOForApp(int command, int fileId, String path, int p1, int p2, int p3, String data, String pin2, String aid, Message result) {
IRadio radioProxy = getRadioProxy(result);
if (radioProxy != null) {
RILRequest rr = obtainRequest(RIL_REQUEST_SIM_IO, result, mRILDefaultWorkSource);
if (RILJ_LOGD) {
if (TelephonyUtils.IS_DEBUGGABLE) {
riljLog(rr.serialString() + "> iccIO: " + requestToString(rr.mRequest) + " command = 0x" + Integer.toHexString(command) + " fileId = 0x" + Integer.toHexString(fileId) + " path = " + path + " p1 = " + p1 + " p2 = " + p2 + " p3 = " + " data = " + data + " aid = " + aid);
} else {
riljLog(rr.serialString() + "> iccIO: " + requestToString(rr.mRequest));
}
}
IccIo iccIo = new IccIo();
iccIo.command = command;
iccIo.fileId = fileId;
iccIo.path = convertNullToEmptyString(path);
iccIo.p1 = p1;
iccIo.p2 = p2;
iccIo.p3 = p3;
iccIo.data = convertNullToEmptyString(data);
iccIo.pin2 = convertNullToEmptyString(pin2);
iccIo.aid = convertNullToEmptyString(aid);
try {
radioProxy.iccIOForApp(rr.mSerial, iccIo);
} catch (RemoteException | RuntimeException e) {
handleRadioProxyExceptionForRR(rr, "iccIOForApp", e);
}
}
}
Aggregations