Search in sources :

Example 81 with AsyncResult

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

the class RadioIndication method indicateRingbackTone.

public void indicateRingbackTone(int indicationType, boolean start) {
    mRil.processIndication(indicationType);
    if (RIL.RILJ_LOGD)
        mRil.unsljLogvRet(RIL_UNSOL_RINGBACK_TONE, start);
    mRil.mRingbackToneRegistrants.notifyRegistrants(new AsyncResult(null, start, null));
}
Also used : AsyncResult(android.os.AsyncResult)

Example 82 with AsyncResult

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

the class RadioIndication method responseNetworkScan_1_4.

private void responseNetworkScan_1_4(int indicationType, android.hardware.radio.V1_4.NetworkScanResult result) {
    mRil.processIndication(indicationType);
    ArrayList<CellInfo> cellInfos = RIL.convertHalCellInfoList_1_4(result.networkInfos);
    NetworkScanResult nsr = new NetworkScanResult(result.status, result.error, cellInfos);
    if (RIL.RILJ_LOGD)
        mRil.unsljLogRet(RIL_UNSOL_NETWORK_SCAN_RESULT, nsr);
    mRil.mRilNetworkScanResultRegistrants.notifyRegistrants(new AsyncResult(null, nsr, null));
}
Also used : CellInfo(android.telephony.CellInfo) AsyncResult(android.os.AsyncResult)

Example 83 with AsyncResult

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

the class RadioIndication method cdmaOtaProvisionStatus.

public void cdmaOtaProvisionStatus(int indicationType, int status) {
    mRil.processIndication(indicationType);
    int[] response = new int[1];
    response[0] = status;
    if (RIL.RILJ_LOGD)
        mRil.unsljLogRet(RIL_UNSOL_CDMA_OTA_PROVISION_STATUS, response);
    mRil.mOtaProvisionRegistrants.notifyRegistrants(new AsyncResult(null, response, null));
}
Also used : AsyncResult(android.os.AsyncResult)

Example 84 with AsyncResult

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

the class RadioIndication method currentLinkCapacityEstimate.

/**
 * Indicates current link capacity estimate.
 */
public void currentLinkCapacityEstimate(int indicationType, android.hardware.radio.V1_2.LinkCapacityEstimate 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 85 with AsyncResult

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

the class RadioResponse method getBarringInfoResponse.

/**
 * @param responseInfo Response info struct containing response type, serial no. and error.
 * @param cellIdentity CellIdentity for the barringInfos.
 * @param barringInfos List of BarringInfo for all the barring service types.
 */
public void getBarringInfoResponse(RadioResponseInfo responseInfo, android.hardware.radio.V1_5.CellIdentity cellIdentity, ArrayList<android.hardware.radio.V1_5.BarringInfo> barringInfos) {
    RILRequest rr = mRil.processResponse(responseInfo);
    if (rr != null) {
        BarringInfo bi = BarringInfo.create(cellIdentity, barringInfos);
        if (responseInfo.error == RadioError.NONE) {
            sendMessageResponse(rr.mResult, bi);
            // notify all registrants for the possible barring info change
            mRil.mBarringInfoChangedRegistrants.notifyRegistrants(new AsyncResult(null, bi, null));
        }
        mRil.processResponseDone(rr, responseInfo, bi);
    }
}
Also used : BarringInfo(android.telephony.BarringInfo) 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