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

Commit 10076dd4 authored by Sarah Chin's avatar Sarah Chin Committed by Gerrit Code Review
Browse files

Merge "Add new fields to ApnSetting/DataProfileInfo"

parents eed54602 8028681f
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -959,6 +959,7 @@ public class RILUtils {
        dpi.mtuV6 = dp.getMtuV6();
        dpi.mtuV6 = dp.getMtuV6();
        dpi.persistent = dp.isPersistent();
        dpi.persistent = dp.isPersistent();
        dpi.preferred = dp.isPreferred();
        dpi.preferred = dp.isPreferred();
        dpi.alwaysOn = dp.getApnSetting().isAlwaysOn();


        // profile id is only meaningful when it's persistent on the modem.
        // profile id is only meaningful when it's persistent on the modem.
        dpi.profileId = (dpi.persistent) ? dp.getProfileId()
        dpi.profileId = (dpi.persistent) ? dp.getProfileId()
+4 −0
Original line number Original line Diff line number Diff line
@@ -404,6 +404,7 @@ public class ApnSettingTest extends TelephonyTest {
    @SmallTest
    @SmallTest
    public void testEquals() throws Exception {
    public void testEquals() throws Exception {
        final int dummyInt = 1;
        final int dummyInt = 1;
        final int dummyLong = 1;
        final String dummyString = "dummy";
        final String dummyString = "dummy";
        final String[] dummyStringArr = new String[] {"dummy"};
        final String[] dummyStringArr = new String[] {"dummy"};
        final InetAddress dummyProxyAddress = InetAddress.getByAddress(new byte[]{0, 0, 0, 0});
        final InetAddress dummyProxyAddress = InetAddress.getByAddress(new byte[]{0, 0, 0, 0});
@@ -421,6 +422,9 @@ public class ApnSettingTest extends TelephonyTest {
            if (int.class.equals(f.getType())) {
            if (int.class.equals(f.getType())) {
                testApn = ApnSetting.makeApnSetting(baseApn);
                testApn = ApnSetting.makeApnSetting(baseApn);
                f.setInt(testApn, dummyInt + f.getInt(testApn));
                f.setInt(testApn, dummyInt + f.getInt(testApn));
            } else if (long.class.equals(f.getType())) {
                testApn = ApnSetting.makeApnSetting(baseApn);
                f.setLong(testApn, dummyLong + f.getLong(testApn));
            } else if (boolean.class.equals(f.getType())) {
            } else if (boolean.class.equals(f.getType())) {
                testApn = ApnSetting.makeApnSetting(baseApn);
                testApn = ApnSetting.makeApnSetting(baseApn);
                f.setBoolean(testApn, !f.getBoolean(testApn));
                f.setBoolean(testApn, !f.getBoolean(testApn));
+52 −12
Original line number Original line Diff line number Diff line
@@ -233,12 +233,16 @@ public class DcTrackerTest extends TelephonyTest {
                Telephony.Carriers.WAIT_TIME_RETRY,
                Telephony.Carriers.WAIT_TIME_RETRY,
                Telephony.Carriers.TIME_LIMIT_FOR_MAX_CONNECTIONS,
                Telephony.Carriers.TIME_LIMIT_FOR_MAX_CONNECTIONS,
                Telephony.Carriers.MTU,
                Telephony.Carriers.MTU,
                Telephony.Carriers.MTU_V4,
                Telephony.Carriers.MTU_V6,
                Telephony.Carriers.MVNO_TYPE,
                Telephony.Carriers.MVNO_TYPE,
                Telephony.Carriers.MVNO_MATCH_DATA,
                Telephony.Carriers.MVNO_MATCH_DATA,
                Telephony.Carriers.NETWORK_TYPE_BITMASK,
                Telephony.Carriers.NETWORK_TYPE_BITMASK,
                Telephony.Carriers.LINGERING_NETWORK_TYPE_BITMASK,
                Telephony.Carriers.APN_SET_ID,
                Telephony.Carriers.APN_SET_ID,
                Telephony.Carriers.CARRIER_ID,
                Telephony.Carriers.CARRIER_ID,
                Telephony.Carriers.SKIP_464XLAT
                Telephony.Carriers.SKIP_464XLAT,
                Telephony.Carriers.ALWAYS_ON
        };
        };


        private int mPreferredApnSet = 0;
        private int mPreferredApnSet = 0;
@@ -299,12 +303,16 @@ public class DcTrackerTest extends TelephonyTest {
                    0,                      // wait_time
                    0,                      // wait_time
                    0,                      // max_conns_time
                    0,                      // max_conns_time
                    0,                      // mtu
                    0,                      // mtu
                    0,                      // mtu_v4
                    0,                      // mtu_v6
                    "",                     // mvno_type
                    "",                     // mvno_type
                    "",                     // mnvo_match_data
                    "",                     // mnvo_match_data
                    mFakeApn1Bitmask,       // network_type_bitmask
                    mFakeApn1Bitmask,       // network_type_bitmask
                    0,                      // lingering_network_type_bitmask
                    0,                      // apn_set_id
                    0,                      // apn_set_id
                    -1,                     // carrier_id
                    -1,                     // carrier_id
                    -1                      // skip_464xlat
                    -1,                     // skip_464xlat
                    0                       // always_on
            };
            };
        }
        }


@@ -334,12 +342,16 @@ public class DcTrackerTest extends TelephonyTest {
                    0,                      // wait_time
                    0,                      // wait_time
                    0,                      // max_conns_time
                    0,                      // max_conns_time
                    0,                      // mtu
                    0,                      // mtu
                    0,                      // mtu_v4
                    0,                      // mtu_v6
                    "",                     // mvno_type
                    "",                     // mvno_type
                    "",                     // mnvo_match_data
                    "",                     // mnvo_match_data
                    NETWORK_TYPE_LTE_BITMASK, // network_type_bitmask
                    NETWORK_TYPE_LTE_BITMASK, // network_type_bitmask
                    0,                      // lingering_network_type_bitmask
                    0,                      // apn_set_id
                    0,                      // apn_set_id
                    -1,                     // carrier_id
                    -1,                     // carrier_id
                    -1                      // skip_464xlat
                    -1,                     // skip_464xlat
                    0                       // always_on
            };
            };
        }
        }


@@ -369,12 +381,16 @@ public class DcTrackerTest extends TelephonyTest {
                    0,                      // wait_time
                    0,                      // wait_time
                    0,                      // max_conns_time
                    0,                      // max_conns_time
                    0,                      // mtu
                    0,                      // mtu
                    0,                      // mtu_v4
                    0,                      // mtu_v6
                    "",                     // mvno_type
                    "",                     // mvno_type
                    "",                     // mnvo_match_data
                    "",                     // mnvo_match_data
                    0,                      // network_type_bitmask
                    0,                      // network_type_bitmask
                    0,                      // lingering_network_type_bitmask
                    0,                      // apn_set_id
                    0,                      // apn_set_id
                    -1,                     // carrier_id
                    -1,                     // carrier_id
                    -1                      // skip_464xlat
                    -1,                     // skip_464xlat
                    0                       // always_on
            };
            };
        }
        }


@@ -404,12 +420,16 @@ public class DcTrackerTest extends TelephonyTest {
                    0,                      // wait_time
                    0,                      // wait_time
                    0,                      // max_conns_time
                    0,                      // max_conns_time
                    0,                      // mtu
                    0,                      // mtu
                    0,                      // mtu_v4
                    0,                      // mtu_v6
                    "",                     // mvno_type
                    "",                     // mvno_type
                    "",                     // mnvo_match_data
                    "",                     // mnvo_match_data
                    NETWORK_TYPE_EHRPD_BITMASK, // network_type_bitmask
                    NETWORK_TYPE_EHRPD_BITMASK, // network_type_bitmask
                    0,                      // lingering_network_type_bitmask
                    0,                      // apn_set_id
                    0,                      // apn_set_id
                    -1,                     // carrier_id
                    -1,                     // carrier_id
                    -1                      // skip_464xlat
                    -1,                     // skip_464xlat
                    0                       // always_on
            };
            };
        }
        }


@@ -439,12 +459,16 @@ public class DcTrackerTest extends TelephonyTest {
                    0,                      // wait_time
                    0,                      // wait_time
                    0,                      // max_conns_time
                    0,                      // max_conns_time
                    0,                      // mtu
                    0,                      // mtu
                    0,                      // mtu_v4
                    0,                      // mtu_v6
                    "",                     // mvno_type
                    "",                     // mvno_type
                    "",                     // mnvo_match_data
                    "",                     // mnvo_match_data
                    0,                      // network_type_bitmask
                    0,                      // network_type_bitmask
                    0,                      // lingering_network_type_bitmask
                    0,                      // apn_set_id
                    0,                      // apn_set_id
                    -1,                     // carrier_id
                    -1,                     // carrier_id
                    -1                      // skip_464xlat
                    -1,                     // skip_464xlat
                    0                       // always_on
            };
            };
        }
        }


@@ -474,12 +498,16 @@ public class DcTrackerTest extends TelephonyTest {
                    0,                      // wait_time
                    0,                      // wait_time
                    0,                      // max_conns_time
                    0,                      // max_conns_time
                    0,                      // mtu
                    0,                      // mtu
                    0,                      // mtu_v4
                    0,                      // mtu_v6
                    "",                     // mvno_type
                    "",                     // mvno_type
                    "",                     // mnvo_match_data
                    "",                     // mnvo_match_data
                    NETWORK_TYPE_LTE_BITMASK, // network_type_bitmask
                    NETWORK_TYPE_LTE_BITMASK, // network_type_bitmask
                    0,                      // lingering_network_type_bitmask
                    0,                      // apn_set_id
                    0,                      // apn_set_id
                    -1,                     // carrier_id
                    -1,                     // carrier_id
                    -1                      // skip_464xlat
                    -1,                     // skip_464xlat
                    0                       // always_on
            };
            };
        }
        }


@@ -509,12 +537,16 @@ public class DcTrackerTest extends TelephonyTest {
                    0,                      // wait_time
                    0,                      // wait_time
                    0,                      // max_conns_time
                    0,                      // max_conns_time
                    0,                      // mtu
                    0,                      // mtu
                    0,                      // mtu_v4
                    0,                      // mtu_v6
                    "",                     // mvno_type
                    "",                     // mvno_type
                    "",                     // mnvo_match_data
                    "",                     // mnvo_match_data
                    NETWORK_TYPE_LTE_BITMASK,  // network_type_bitmask
                    NETWORK_TYPE_LTE_BITMASK,  // network_type_bitmask
                    0,                      // lingering_network_type_bitmask
                    1,                      // apn_set_id
                    1,                      // apn_set_id
                    -1,                     // carrier_id
                    -1,                     // carrier_id
                    -1                      // skip_464xlat
                    -1,                     // skip_464xlat
                    0                       // always_on
            };
            };
        }
        }


@@ -544,12 +576,16 @@ public class DcTrackerTest extends TelephonyTest {
                    0,                      // wait_time
                    0,                      // wait_time
                    0,                      // max_conns_time
                    0,                      // max_conns_time
                    0,                      // mtu
                    0,                      // mtu
                    0,                      // mtu_v4
                    0,                      // mtu_v6
                    "",                     // mvno_type
                    "",                     // mvno_type
                    "",                     // mnvo_match_data
                    "",                     // mnvo_match_data
                    NETWORK_TYPE_LTE_BITMASK, // network_type_bitmask
                    NETWORK_TYPE_LTE_BITMASK, // network_type_bitmask
                    0,                      // lingering_network_type_bitmask
                    -1,                     // apn_set_id
                    -1,                     // apn_set_id
                    -1,                     // carrier_id
                    -1,                     // carrier_id
                    -1                      // skip_464xlat
                    -1,                     // skip_464xlat
                    0                       // always_on
            };
            };
        }
        }


@@ -579,12 +615,16 @@ public class DcTrackerTest extends TelephonyTest {
                    0,                      // wait_time
                    0,                      // wait_time
                    0,                      // max_conns_time
                    0,                      // max_conns_time
                    0,                      // mtu
                    0,                      // mtu
                    0,                      // mtu_v4
                    0,                      // mtu_v6
                    "",                     // mvno_type
                    "",                     // mvno_type
                    "",                     // mnvo_match_data
                    "",                     // mnvo_match_data
                    NETWORK_TYPE_NR_BITMASK, // network_type_bitmask
                    NETWORK_TYPE_NR_BITMASK, // network_type_bitmask
                    0,                      // lingering_network_type_bitmask
                    0,                      // apn_set_id
                    0,                      // apn_set_id
                    -1,                     // carrier_id
                    -1,                     // carrier_id
                    -1                      // skip_464xlat
                    -1,                     // skip_464xlat
                    0                       // always_on
            };
            };
        }
        }