Search in sources :

Example 6 with DataProfileInfo

use of android.hardware.radio.V1_0.DataProfileInfo in project android_frameworks_opt_telephony by LineageOS.

the class RILTest method testSetInitialAttachApn.

@FlakyTest
@Test
public void testSetInitialAttachApn() throws Exception {
    ApnSetting apnSetting = ApnSetting.makeApnSetting(-1, "22210", "Vodafone IT", "web.omnitel.it", null, -1, null, null, -1, "", "", 0, ApnSetting.TYPE_DUN, ApnSetting.PROTOCOL_IP, ApnSetting.PROTOCOL_IP, true, 0, 0, false, 0, 0, 0, 0, -1, "");
    DataProfile dataProfile = DcTracker.createDataProfile(apnSetting, apnSetting.getProfileId(), false);
    boolean isRoaming = false;
    mRILUnderTest.setInitialAttachApn(dataProfile, isRoaming, obtainMessage());
    verify(mRadioProxy).setInitialAttachApn(mSerialNumberCaptor.capture(), eq((DataProfileInfo) invokeMethod(mRILInstance, "convertToHalDataProfile10", new Class<?>[] { DataProfile.class }, new Object[] { dataProfile })), eq(dataProfile.isPersistent()), eq(isRoaming));
    verifyRILResponse(mRILUnderTest, mSerialNumberCaptor.getValue(), RIL_REQUEST_SET_INITIAL_ATTACH_APN);
}
Also used : DataProfile(android.telephony.data.DataProfile) DataProfileInfo(android.hardware.radio.V1_0.DataProfileInfo) ApnSetting(android.telephony.data.ApnSetting) FlakyTest(androidx.test.filters.FlakyTest) FlakyTest(androidx.test.filters.FlakyTest) Test(org.junit.Test)

Aggregations

DataProfileInfo (android.hardware.radio.V1_0.DataProfileInfo)4 IRadio (android.hardware.radio.V1_0.IRadio)3 RemoteException (android.os.RemoteException)3 DataProfile (android.telephony.data.DataProfile)3 FlakyTest (androidx.test.filters.FlakyTest)2 ArrayList (java.util.ArrayList)2 Test (org.junit.Test)2 LinkAddress (android.net.LinkAddress)1 ServiceState (android.telephony.ServiceState)1 ApnSetting (android.telephony.data.ApnSetting)1 InetAddress (java.net.InetAddress)1