Search in sources :

Example 91 with AsyncResult

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

Example 92 with AsyncResult

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

Example 93 with AsyncResult

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

Example 94 with AsyncResult

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));
    }
}
Also used : SmsMessage(android.telephony.SmsMessage) CdmaSmsMessage(android.hardware.radio.V1_0.CdmaSmsMessage) AsyncResult(android.os.AsyncResult)

Example 95 with AsyncResult

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));
    }
}
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