Search in sources :

Example 76 with AsyncResult

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));
}
Also used : IccRefreshResponse(com.android.internal.telephony.uicc.IccRefreshResponse) AsyncResult(android.os.AsyncResult)

Example 77 with AsyncResult

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));
}
Also used : DataCallResponse(android.telephony.data.DataCallResponse) AsyncResult(android.os.AsyncResult)

Example 78 with AsyncResult

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));
    }
}
Also used : AsyncResult(android.os.AsyncResult)

Example 79 with AsyncResult

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));
}
Also used : KeepaliveStatus(com.android.internal.telephony.dataconnection.KeepaliveStatus) AsyncResult(android.os.AsyncResult)

Example 80 with AsyncResult

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));
}
Also used : RIL_UNSOL_UICC_APPLICATIONS_ENABLEMENT_CHANGED(com.android.internal.telephony.RILConstants.RIL_UNSOL_UICC_APPLICATIONS_ENABLEMENT_CHANGED) IRadioIndication(android.hardware.radio.V1_5.IRadioIndication) RIL_UNSOL_RINGBACK_TONE(com.android.internal.telephony.RILConstants.RIL_UNSOL_RINGBACK_TONE) RIL_UNSOL_SIGNAL_STRENGTH(com.android.internal.telephony.RILConstants.RIL_UNSOL_SIGNAL_STRENGTH) RIL_UNSOL_PCO_DATA(com.android.internal.telephony.RILConstants.RIL_UNSOL_PCO_DATA) RIL_UNSOL_RESTRICTED_STATE_CHANGED(com.android.internal.telephony.RILConstants.RIL_UNSOL_RESTRICTED_STATE_CHANGED) RIL_UNSOL_EMERGENCY_NUMBER_LIST(com.android.internal.telephony.RILConstants.RIL_UNSOL_EMERGENCY_NUMBER_LIST) RIL_UNSOL_RESPONSE_NEW_SMS(com.android.internal.telephony.RILConstants.RIL_UNSOL_RESPONSE_NEW_SMS) CdmaT53AudioControlInfoRecord(android.hardware.radio.V1_0.CdmaT53AudioControlInfoRecord) CellInfo(android.telephony.CellInfo) RIL_UNSOL_CDMA_INFO_REC(com.android.internal.telephony.RILConstants.RIL_UNSOL_CDMA_INFO_REC) RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED(com.android.internal.telephony.RILConstants.RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED) RIL_UNSOL_DATA_CALL_LIST_CHANGED(com.android.internal.telephony.RILConstants.RIL_UNSOL_DATA_CALL_LIST_CHANGED) RIL_UNSOL_SIM_SMS_STORAGE_FULL(com.android.internal.telephony.RILConstants.RIL_UNSOL_SIM_SMS_STORAGE_FULL) CdmaCallWaitingNotification(com.android.internal.telephony.cdma.CdmaCallWaitingNotification) RIL_UNSOL_STK_SESSION_END(com.android.internal.telephony.RILConstants.RIL_UNSOL_STK_SESSION_END) RIL_UNSOL_STK_CALL_SETUP(com.android.internal.telephony.RILConstants.RIL_UNSOL_STK_CALL_SETUP) SsInfoData(android.hardware.radio.V1_0.SsInfoData) RIL_UNSOL_STK_EVENT_NOTIFY(com.android.internal.telephony.RILConstants.RIL_UNSOL_STK_EVENT_NOTIFY) RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE(com.android.internal.telephony.RILConstants.RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE) PhysicalChannelConfig(android.telephony.PhysicalChannelConfig) SsData(com.android.internal.telephony.gsm.SsData) IccRefreshResponse(com.android.internal.telephony.uicc.IccRefreshResponse) ServiceState(android.telephony.ServiceState) CdmaInformationRecords(com.android.internal.telephony.cdma.CdmaInformationRecords) RIL_UNSOL_CARRIER_INFO_IMSI_ENCRYPTION(com.android.internal.telephony.RILConstants.RIL_UNSOL_CARRIER_INFO_IMSI_ENCRYPTION) SuppSvcNotification(android.hardware.radio.V1_0.SuppSvcNotification) RIL_UNSOL_PHYSICAL_CHANNEL_CONFIG(com.android.internal.telephony.RILConstants.RIL_UNSOL_PHYSICAL_CHANNEL_CONFIG) BarringInfo(android.telephony.BarringInfo) UUID(java.util.UUID) RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE(com.android.internal.telephony.RILConstants.RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE) EmergencyNumber(android.telephony.emergency.EmergencyNumber) NetworkRegistrationInfo(android.telephony.NetworkRegistrationInfo) List(java.util.List) CdmaNumberInfoRecord(android.hardware.radio.V1_0.CdmaNumberInfoRecord) CdmaSignalInfoRecord(android.hardware.radio.V1_0.CdmaSignalInfoRecord) KeepaliveStatus(com.android.internal.telephony.dataconnection.KeepaliveStatus) RIL_UNSOL_SRVCC_STATE_NOTIFY(com.android.internal.telephony.RILConstants.RIL_UNSOL_SRVCC_STATE_NOTIFY) RIL_UNSOl_CDMA_PRL_CHANGED(com.android.internal.telephony.RILConstants.RIL_UNSOl_CDMA_PRL_CHANGED) CdmaCallWaiting(android.hardware.radio.V1_0.CdmaCallWaiting) RIL_UNSOL_LCEDATA_RECV(com.android.internal.telephony.RILConstants.RIL_UNSOL_LCEDATA_RECV) SmsMessage(android.telephony.SmsMessage) RIL_UNSOL_CDMA_CALL_WAITING(com.android.internal.telephony.RILConstants.RIL_UNSOL_CDMA_CALL_WAITING) RIL_UNSOL_RADIO_CAPABILITY(com.android.internal.telephony.RILConstants.RIL_UNSOL_RADIO_CAPABILITY) RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED(com.android.internal.telephony.RILConstants.RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED) CellIdentity(android.telephony.CellIdentity) TelephonyProperties(android.sysprop.TelephonyProperties) AsyncResult(android.os.AsyncResult) IccUtils(com.android.internal.telephony.uicc.IccUtils) RIL_UNSOL_HARDWARE_CONFIG_CHANGED(com.android.internal.telephony.RILConstants.RIL_UNSOL_HARDWARE_CONFIG_CHANGED) PcoDataInfo(android.hardware.radio.V1_0.PcoDataInfo) RadioPowerState(android.telephony.Annotation.RadioPowerState) ArrayList(java.util.ArrayList) RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED(com.android.internal.telephony.RILConstants.RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED) RIL_UNSOL_RIL_CONNECTED(com.android.internal.telephony.RILConstants.RIL_UNSOL_RIL_CONNECTED) RIL_UNSOL_CALL_RING(com.android.internal.telephony.RILConstants.RIL_UNSOL_CALL_RING) CdmaLineControlInfoRecord(android.hardware.radio.V1_0.CdmaLineControlInfoRecord) RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED(com.android.internal.telephony.RILConstants.RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED) TelephonyManager(android.telephony.TelephonyManager) DataCallResponse(android.telephony.data.DataCallResponse) SuppServiceNotification(com.android.internal.telephony.gsm.SuppServiceNotification) SmsMessageConverter(com.android.internal.telephony.cdma.SmsMessageConverter) RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT(com.android.internal.telephony.RILConstants.RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT) RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED(com.android.internal.telephony.RILConstants.RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED) RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED(com.android.internal.telephony.RILConstants.RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED) RIL_UNSOL_ON_USSD(com.android.internal.telephony.RILConstants.RIL_UNSOL_ON_USSD) RIL_UNSOL_MODEM_RESTART(com.android.internal.telephony.RILConstants.RIL_UNSOL_MODEM_RESTART) RIL_UNSOL_CELL_INFO_LIST(com.android.internal.telephony.RILConstants.RIL_UNSOL_CELL_INFO_LIST) RIL_UNSOL_RESPONSE_CDMA_NEW_SMS(com.android.internal.telephony.RILConstants.RIL_UNSOL_RESPONSE_CDMA_NEW_SMS) RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM(com.android.internal.telephony.RILConstants.RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM) CdmaRedirectingNumberInfoRecord(android.hardware.radio.V1_0.CdmaRedirectingNumberInfoRecord) RIL_UNSOL_KEEPALIVE_STATUS(com.android.internal.telephony.RILConstants.RIL_UNSOL_KEEPALIVE_STATUS) PcoData(android.telephony.PcoData) RIL_UNSOL_NETWORK_SCAN_RESULT(com.android.internal.telephony.RILConstants.RIL_UNSOL_NETWORK_SCAN_RESULT) RIL_UNSOL_STK_CC_ALPHA_NOTIFY(com.android.internal.telephony.RILConstants.RIL_UNSOL_STK_CC_ALPHA_NOTIFY) AnomalyReporter(android.telephony.AnomalyReporter) TextUtils(android.text.TextUtils) RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL(com.android.internal.telephony.RILConstants.RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL) CdmaSmsMessage(android.hardware.radio.V1_0.CdmaSmsMessage) RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED(com.android.internal.telephony.RILConstants.RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED) RIL_UNSOL_ON_SS(com.android.internal.telephony.RILConstants.RIL_UNSOL_ON_SS) CfData(android.hardware.radio.V1_0.CfData) RIL_UNSOL_VOICE_RADIO_TECH_CHANGED(com.android.internal.telephony.RILConstants.RIL_UNSOL_VOICE_RADIO_TECH_CHANGED) SignalStrength(android.telephony.SignalStrength) StkCcUnsolSsResult(android.hardware.radio.V1_0.StkCcUnsolSsResult) RIL_UNSOL_RESEND_INCALL_MUTE(com.android.internal.telephony.RILConstants.RIL_UNSOL_RESEND_INCALL_MUTE) SimRefreshResult(android.hardware.radio.V1_0.SimRefreshResult) RIL_UNSOL_STK_PROACTIVE_COMMAND(com.android.internal.telephony.RILConstants.RIL_UNSOL_STK_PROACTIVE_COMMAND) CellConnectionStatus(android.hardware.radio.V1_2.CellConnectionStatus) RIL_UNSOL_NITZ_TIME_RECEIVED(com.android.internal.telephony.RILConstants.RIL_UNSOL_NITZ_TIME_RECEIVED) RIL_UNSOL_CDMA_OTA_PROVISION_STATUS(com.android.internal.telephony.RILConstants.RIL_UNSOL_CDMA_OTA_PROVISION_STATUS) RIL_UNSOL_SIM_REFRESH(com.android.internal.telephony.RILConstants.RIL_UNSOL_SIM_REFRESH) RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS(com.android.internal.telephony.RILConstants.RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS) RIL_UNSOL_SUPP_SVC_NOTIFICATION(com.android.internal.telephony.RILConstants.RIL_UNSOL_SUPP_SVC_NOTIFICATION) CdmaInformationRecord(android.hardware.radio.V1_0.CdmaInformationRecord) LceDataInfo(android.hardware.radio.V1_0.LceDataInfo) ArrayList(java.util.ArrayList) PhysicalChannelConfig(android.telephony.PhysicalChannelConfig) AsyncResult(android.os.AsyncResult)

Aggregations

AsyncResult (android.os.AsyncResult)267 Test (org.junit.Test)60 Message (android.os.Message)57 TelephonyTest (com.android.internal.telephony.TelephonyTest)45 SmallTest (android.test.suitebuilder.annotation.SmallTest)26 ArrayList (java.util.ArrayList)21 Registrant (android.os.Registrant)19 FlakyTest (androidx.test.filters.FlakyTest)17 Intent (android.content.Intent)13 CellInfo (android.telephony.CellInfo)12 MediumTest (android.test.suitebuilder.annotation.MediumTest)12 SmallTest (androidx.test.filters.SmallTest)11 NetworkRegistrationInfo (android.telephony.NetworkRegistrationInfo)9 List (java.util.List)7 Mockito.anyString (org.mockito.Mockito.anyString)6 InvocationOnMock (org.mockito.invocation.InvocationOnMock)6 FlakyTest (android.support.test.filters.FlakyTest)5 MediumTest (android.support.test.filters.MediumTest)5 LteVopsSupportInfo (android.telephony.LteVopsSupportInfo)5 SmsMessage (android.telephony.SmsMessage)5