use of android.os.AsyncResult in project android_frameworks_opt_telephony by LineageOS.
the class RadioIndication method onUssd.
public void onUssd(int indicationType, int ussdModeType, String msg) {
mRil.processIndication(indicationType);
if (RIL.RILJ_LOGD)
mRil.unsljLogMore(RIL_UNSOL_ON_USSD, "" + ussdModeType);
// todo: Clean this up with a parcelable class for better self-documentation
String[] resp = new String[2];
resp[0] = "" + ussdModeType;
resp[1] = msg;
if (mRil.mUSSDRegistrant != null) {
mRil.mUSSDRegistrant.notifyRegistrant(new AsyncResult(null, resp, null));
}
}
use of android.os.AsyncResult in project android_frameworks_opt_telephony by LineageOS.
the class RadioIndication method cellInfoList_1_5.
/**
* Get unsolicited message for cellInfoList using HAL V1_5
*/
public void cellInfoList_1_5(int indicationType, ArrayList<android.hardware.radio.V1_5.CellInfo> records) {
mRil.processIndication(indicationType);
ArrayList<CellInfo> response = RIL.convertHalCellInfoList_1_5(records);
if (RIL.RILJ_LOGD)
mRil.unsljLogRet(RIL_UNSOL_CELL_INFO_LIST, response);
mRil.mRilCellInfoListRegistrants.notifyRegistrants(new AsyncResult(null, response, null));
}
use of android.os.AsyncResult in project android_frameworks_opt_telephony by LineageOS.
the class RadioIndication method cdmaPrlChanged.
public void cdmaPrlChanged(int indicationType, int version) {
mRil.processIndication(indicationType);
int[] response = new int[1];
response[0] = version;
if (RIL.RILJ_LOGD)
mRil.unsljLogRet(RIL_UNSOl_CDMA_PRL_CHANGED, response);
mRil.mCdmaPrlChangedRegistrants.notifyRegistrants(new AsyncResult(null, response, null));
}
use of android.os.AsyncResult in project android_frameworks_opt_telephony by LineageOS.
the class RadioIndication method newSms.
public void newSms(int indicationType, ArrayList<Byte> pdu) {
mRil.processIndication(indicationType);
byte[] pduArray = RIL.arrayListToPrimitiveArray(pdu);
if (RIL.RILJ_LOGD)
mRil.unsljLog(RIL_UNSOL_RESPONSE_NEW_SMS);
SmsMessage sms = SmsMessage.newFromCMT(pduArray);
if (mRil.mGsmSmsRegistrant != null) {
mRil.mGsmSmsRegistrant.notifyRegistrant(new AsyncResult(null, sms, null));
}
}
use of android.os.AsyncResult in project android_frameworks_opt_telephony by LineageOS.
the class RadioIndication method callRing.
public void callRing(int indicationType, boolean isGsm, CdmaSignalInfoRecord record) {
mRil.processIndication(indicationType);
char[] response = null;
// Ignore record for gsm
if (!isGsm) {
// todo: Clean this up with a parcelable class for better self-documentation
response = new char[4];
response[0] = (char) (record.isPresent ? 1 : 0);
response[1] = (char) record.signalType;
response[2] = (char) record.alertPitch;
response[3] = (char) record.signal;
mRil.writeMetricsCallRing(response);
}
if (RIL.RILJ_LOGD)
mRil.unsljLogRet(RIL_UNSOL_CALL_RING, response);
if (mRil.mRingRegistrant != null) {
mRil.mRingRegistrant.notifyRegistrant(new AsyncResult(null, response, null));
}
}
Aggregations