Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1d607f70 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Revert "[Telephony]Unit test support for Apn Id removal at ApnSe..."" into udc-dev

parents 18e251ef d62218ee
Loading
Loading
Loading
Loading
+1 −51
Original line number Diff line number Diff line
@@ -205,11 +205,9 @@ public class ApnSettingTest extends TelephonyTest {
        Field[] fields = ApnSetting.class.getDeclaredFields();
        for (Field f : fields) {
            int modifiers = f.getModifiers();
            if (Modifier.isStatic(modifiers) || !Modifier.isFinal(modifiers)
                    || "mId".equals(f.getName())) {
            if (Modifier.isStatic(modifiers) || !Modifier.isFinal(modifiers)) {
                continue;
            }

            f.setAccessible(true);
            ApnSetting testApn = null;
            if (int.class.equals(f.getType())) {
@@ -380,52 +378,4 @@ public class ApnSettingTest extends TelephonyTest {
                .build();
        assertEquals("proxy.mobile.att.net", apn3.getMmsProxyAddressAsString());
    }

    @Test
    public void testApnProfileEqualsWithoutID() {
        ApnSetting apn1 = new ApnSetting.Builder()
                .setId(1234)
                .setOperatorNumeric("310260")
                .setEntryName("ims")
                .setApnName("ims")
                .setApnTypeBitmask(ApnSetting.TYPE_IMS)
                .setProtocol(ApnSetting.PROTOCOL_IPV6)
                .setRoamingProtocol(ApnSetting.PROTOCOL_IPV6)
                .setNetworkTypeBitmask((int) (TelephonyManager.NETWORK_TYPE_BITMASK_EDGE
                        | TelephonyManager.NETWORK_TYPE_BITMASK_GPRS))
                .setMtuV4(1440)
                .setCarrierEnabled(true)
                .build();

        ApnSetting apn2 = new ApnSetting.Builder()
                .setId(1235)
                .setOperatorNumeric("310260")
                .setEntryName("ims")
                .setApnName("ims")
                .setApnTypeBitmask(ApnSetting.TYPE_IMS)
                .setProtocol(ApnSetting.PROTOCOL_IPV6)
                .setRoamingProtocol(ApnSetting.PROTOCOL_IPV6)
                .setNetworkTypeBitmask((int) (TelephonyManager.NETWORK_TYPE_BITMASK_EDGE
                        | TelephonyManager.NETWORK_TYPE_BITMASK_GPRS))
                .setMtuV4(1440)
                .setCarrierEnabled(true)
                .build();

        ApnSetting apn3 = new ApnSetting.Builder()
                .setId(1234)
                .setOperatorNumeric("310260")
                .setEntryName("ims")
                .setApnName("ims2")
                .setApnTypeBitmask(ApnSetting.TYPE_IMS)
                .setProtocol(ApnSetting.PROTOCOL_IPV6)
                .setRoamingProtocol(ApnSetting.PROTOCOL_IPV6)
                .setNetworkTypeBitmask((int) (TelephonyManager.NETWORK_TYPE_BITMASK_EDGE
                        | TelephonyManager.NETWORK_TYPE_BITMASK_GPRS))
                .setMtuV4(1440)
                .setCarrierEnabled(true)
                .build();

        assertTrue(apn1.equals(apn2));
        assertFalse(apn1.equals(apn3));
    }
}