Search in sources :

Example 96 with AsyncResult

use of android.os.AsyncResult in project android_frameworks_opt_telephony by LineageOS.

the class RadioIndication method modemReset.

public void modemReset(int indicationType, String reason) {
    mRil.processIndication(indicationType);
    if (RIL.RILJ_LOGD)
        mRil.unsljLogRet(RIL_UNSOL_MODEM_RESTART, reason);
    mRil.writeMetricsModemRestartEvent(reason);
    mRil.mModemResetRegistrants.notifyRegistrants(new AsyncResult(null, reason, null));
}
Also used : AsyncResult(android.os.AsyncResult)

Example 97 with AsyncResult

use of android.os.AsyncResult in project android_frameworks_opt_telephony by LineageOS.

the class RadioIndication method currentEmergencyNumberList.

/**
 * Indicates current emergency number list.
 */
public void currentEmergencyNumberList(int indicationType, ArrayList<android.hardware.radio.V1_4.EmergencyNumber> emergencyNumberList) {
    List<EmergencyNumber> response = new ArrayList<>(emergencyNumberList.size());
    for (android.hardware.radio.V1_4.EmergencyNumber emergencyNumberHal : emergencyNumberList) {
        EmergencyNumber emergencyNumber = new EmergencyNumber(emergencyNumberHal.number, MccTable.countryCodeForMcc(emergencyNumberHal.mcc), emergencyNumberHal.mnc, emergencyNumberHal.categories, emergencyNumberHal.urns, emergencyNumberHal.sources, EmergencyNumber.EMERGENCY_CALL_ROUTING_UNKNOWN);
        response.add(emergencyNumber);
    }
    if (RIL.RILJ_LOGD)
        mRil.unsljLogRet(RIL_UNSOL_EMERGENCY_NUMBER_LIST, response);
    // Cache emergency number list from last indication.
    mRil.cacheEmergencyNumberListIndication(response);
    // Notify emergency number list from radio to registrants
    mRil.mEmergencyNumberListRegistrants.notifyRegistrants(new AsyncResult(null, response, null));
}
Also used : EmergencyNumber(android.telephony.emergency.EmergencyNumber) ArrayList(java.util.ArrayList) AsyncResult(android.os.AsyncResult)

Example 98 with AsyncResult

use of android.os.AsyncResult in project android_frameworks_opt_telephony by LineageOS.

the class RadioIndication method barringInfoChanged.

/**
 * Indicate that BarringInfo has changed for the current cell and user.
 *
 * @param cellIdentity a CellIdentity the CellIdentity of the Cell
 * @param barringInfos the updated barring information from the current cell, filtered for the
 *        current PLMN and access class / access category.
 */
public void barringInfoChanged(int indicationType, android.hardware.radio.V1_5.CellIdentity cellIdentity, ArrayList<android.hardware.radio.V1_5.BarringInfo> barringInfos) {
    mRil.processIndication(indicationType);
    if (cellIdentity == null || barringInfos == null) {
        AnomalyReporter.reportAnomaly(UUID.fromString("645b16bb-c930-4c1c-9c5d-568696542e05"), "Invalid barringInfoChanged indication");
        mRil.riljLoge("Invalid barringInfoChanged indication");
        return;
    }
    CellIdentity ci = CellIdentity.create(cellIdentity);
    BarringInfo cbi = BarringInfo.create(cellIdentity, barringInfos);
    mRil.mBarringInfoChangedRegistrants.notifyRegistrants(new AsyncResult(null, cbi, null));
}
Also used : CellIdentity(android.telephony.CellIdentity) BarringInfo(android.telephony.BarringInfo) AsyncResult(android.os.AsyncResult)

Example 99 with AsyncResult

use of android.os.AsyncResult in project android_frameworks_opt_telephony by LineageOS.

the class RadioIndication method lceData.

public void lceData(int indicationType, LceDataInfo lce) {
    mRil.processIndication(indicationType);
    LinkCapacityEstimate response = RIL.convertHalLceData(lce, mRil);
    if (RIL.RILJ_LOGD)
        mRil.unsljLogRet(RIL_UNSOL_LCEDATA_RECV, response);
    if (mRil.mLceInfoRegistrants != null) {
        mRil.mLceInfoRegistrants.notifyRegistrants(new AsyncResult(null, response, null));
    }
}
Also used : AsyncResult(android.os.AsyncResult)

Example 100 with AsyncResult

use of android.os.AsyncResult in project android_frameworks_opt_telephony by LineageOS.

the class RadioIndication method carrierInfoForImsiEncryption.

/**
 * Indicates when the carrier info to encrypt IMSI is being requested
 * @param indicationType RadioIndicationType
 */
public void carrierInfoForImsiEncryption(int indicationType) {
    mRil.processIndication(indicationType);
    if (RIL.RILJ_LOGD)
        mRil.unsljLogRet(RIL_UNSOL_CARRIER_INFO_IMSI_ENCRYPTION, null);
    mRil.mCarrierInfoForImsiEncryptionRegistrants.notifyRegistrants(new AsyncResult(null, null, null));
}
Also used : 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