Search in sources :

Example 86 with AsyncResult

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

the class RadioIndication method currentSignalStrength_1_2.

/**
 * Indicates the current signal strength of the camped or primary serving cell.
 */
public void currentSignalStrength_1_2(int indicationType, android.hardware.radio.V1_2.SignalStrength signalStrength) {
    mRil.processIndication(indicationType);
    SignalStrength ss = new SignalStrength(signalStrength);
    // Note this is set to "verbose" because it happens frequently
    if (RIL.RILJ_LOGV)
        mRil.unsljLogvRet(RIL_UNSOL_SIGNAL_STRENGTH, ss);
    if (mRil.mSignalStrengthRegistrant != null) {
        mRil.mSignalStrengthRegistrant.notifyRegistrant(new AsyncResult(null, ss, null));
    }
}
Also used : AsyncResult(android.os.AsyncResult) SignalStrength(android.telephony.SignalStrength)

Example 87 with AsyncResult

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

the class RadioIndication method hardwareConfigChanged.

public void hardwareConfigChanged(int indicationType, ArrayList<android.hardware.radio.V1_0.HardwareConfig> configs) {
    mRil.processIndication(indicationType);
    ArrayList<HardwareConfig> response = RIL.convertHalHwConfigList(configs, mRil);
    if (RIL.RILJ_LOGD)
        mRil.unsljLogRet(RIL_UNSOL_HARDWARE_CONFIG_CHANGED, response);
    mRil.mHardwareConfigChangeRegistrants.notifyRegistrants(new AsyncResult(null, response, null));
}
Also used : AsyncResult(android.os.AsyncResult)

Example 88 with AsyncResult

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

the class RadioIndication method voiceRadioTechChanged.

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

Example 89 with AsyncResult

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

the class RadioIndication method cdmaNewSms.

public void cdmaNewSms(int indicationType, CdmaSmsMessage msg) {
    mRil.processIndication(indicationType);
    if (RIL.RILJ_LOGD)
        mRil.unsljLog(RIL_UNSOL_RESPONSE_CDMA_NEW_SMS);
    // todo: conversion from CdmaSmsMessage to SmsMessage should be contained in this class so
    // that usage of auto-generated HAL classes is limited to this file
    SmsMessage sms = SmsMessageConverter.newSmsMessageFromCdmaSmsMessage(msg);
    if (mRil.mCdmaSmsRegistrant != null) {
        mRil.mCdmaSmsRegistrant.notifyRegistrant(new AsyncResult(null, sms, null));
    }
}
Also used : SmsMessage(android.telephony.SmsMessage) CdmaSmsMessage(android.hardware.radio.V1_0.CdmaSmsMessage) AsyncResult(android.os.AsyncResult)

Example 90 with AsyncResult

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

the class RadioIndication method currentSignalStrength.

public void currentSignalStrength(int indicationType, android.hardware.radio.V1_0.SignalStrength signalStrength) {
    mRil.processIndication(indicationType);
    SignalStrength ssInitial = new SignalStrength(signalStrength);
    SignalStrength ss = mRil.fixupSignalStrength10(ssInitial);
    // Note this is set to "verbose" because it happens frequently
    if (RIL.RILJ_LOGV)
        mRil.unsljLogvRet(RIL_UNSOL_SIGNAL_STRENGTH, ss);
    if (mRil.mSignalStrengthRegistrant != null) {
        mRil.mSignalStrengthRegistrant.notifyRegistrant(new AsyncResult(null, ss, null));
    }
}
Also used : AsyncResult(android.os.AsyncResult) SignalStrength(android.telephony.SignalStrength)

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