use of android.os.AsyncResult in project android_frameworks_opt_telephony by LineageOS.
the class RadioIndication method simRefresh.
public void simRefresh(int indicationType, SimRefreshResult refreshResult) {
mRil.processIndication(indicationType);
IccRefreshResponse response = new IccRefreshResponse();
response.refreshResult = refreshResult.type;
response.efId = refreshResult.efId;
response.aid = refreshResult.aid;
if (RIL.RILJ_LOGD)
mRil.unsljLogRet(RIL_UNSOL_SIM_REFRESH, response);
mRil.mIccRefreshRegistrants.notifyRegistrants(new AsyncResult(null, response, null));
}
use of android.os.AsyncResult in project android_frameworks_opt_telephony by LineageOS.
the class RadioIndication method responseDataCallListChanged.
private void responseDataCallListChanged(int indicationType, List<?> dcList) {
mRil.processIndication(indicationType);
if (RIL.RILJ_LOGD)
mRil.unsljLogRet(RIL_UNSOL_DATA_CALL_LIST_CHANGED, dcList);
ArrayList<DataCallResponse> response = RIL.convertDataCallResultList(dcList);
mRil.mDataCallListChangedRegistrants.notifyRegistrants(new AsyncResult(null, response, null));
}
use of android.os.AsyncResult in project android_frameworks_opt_telephony by LineageOS.
the class RadioIndication method newBroadcastSms.
public void newBroadcastSms(int indicationType, ArrayList<Byte> data) {
mRil.processIndication(indicationType);
byte[] response = RIL.arrayListToPrimitiveArray(data);
if (RIL.RILJ_LOGD) {
mRil.unsljLogvRet(RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS, IccUtils.bytesToHexString(response));
}
if (mRil.mGsmBroadcastSmsRegistrant != null) {
mRil.mGsmBroadcastSmsRegistrant.notifyRegistrant(new AsyncResult(null, response, null));
}
}
use of android.os.AsyncResult 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 android.os.AsyncResult in project android_frameworks_opt_telephony by LineageOS.
the class RadioIndication method physicalChannelConfigsIndication.
private void physicalChannelConfigsIndication(List<? extends Object> configs) {
List<PhysicalChannelConfig> response = new ArrayList<>(configs.size());
for (Object obj : configs) {
if (obj instanceof android.hardware.radio.V1_2.PhysicalChannelConfig) {
android.hardware.radio.V1_2.PhysicalChannelConfig config = (android.hardware.radio.V1_2.PhysicalChannelConfig) obj;
response.add(new PhysicalChannelConfig.Builder().setCellConnectionStatus(convertConnectionStatusFromCellConnectionStatus(config.status)).setCellBandwidthDownlinkKhz(config.cellBandwidthDownlink).build());
} else if (obj instanceof android.hardware.radio.V1_4.PhysicalChannelConfig) {
android.hardware.radio.V1_4.PhysicalChannelConfig config = (android.hardware.radio.V1_4.PhysicalChannelConfig) obj;
PhysicalChannelConfig.Builder builder = new PhysicalChannelConfig.Builder();
setFrequencyRangeOrChannelNumber(builder, config);
response.add(builder.setCellConnectionStatus(convertConnectionStatusFromCellConnectionStatus(config.base.status)).setCellBandwidthDownlinkKhz(config.base.cellBandwidthDownlink).setRat(ServiceState.rilRadioTechnologyToNetworkType(config.rat)).setPhysicalCellId(config.physicalCellId).setContextIds(config.contextIds.stream().mapToInt(x -> x).toArray()).build());
} else {
mRil.riljLoge("Unsupported PhysicalChannelConfig " + obj);
}
}
if (RIL.RILJ_LOGD)
mRil.unsljLogRet(RIL_UNSOL_PHYSICAL_CHANNEL_CONFIG, response);
mRil.mPhysicalChannelConfigurationRegistrants.notifyRegistrants(new AsyncResult(null, response, null));
}
Aggregations