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

Commit 5d3ec4f9 authored by Ling Ma's avatar Ling Ma
Browse files

Merge similar data profile - ignore gid difference

Fix: 240225494
Test: atest
Change-Id: I2a8300ad28a70cfd3b570d7ec9e2cafcdc010d2e
parent dbaf7873
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -917,6 +917,9 @@ public class DataProfileManager extends Handler {
                ? apn1.getMtuV4() : apn2.getMtuV4());
        apnBuilder.setMtuV6(apn2.getMtuV6() <= ApnSetting.UNSET_MTU
                ? apn1.getMtuV6() : apn2.getMtuV6());
        // legacy properties that don't matter
        apnBuilder.setMvnoType(apn1.getMvnoType());
        apnBuilder.setMvnoMatchData(apn1.getMvnoMatchData());

        // The following fields in apn1 and apn2 should be the same, otherwise ApnSetting.similar()
        // should fail earlier.
@@ -931,8 +934,6 @@ public class DataProfileManager extends Handler {
        apnBuilder.setMaxConns(apn1.getMaxConns());
        apnBuilder.setWaitTime(apn1.getWaitTime());
        apnBuilder.setMaxConnsTime(apn1.getMaxConnsTime());
        apnBuilder.setMvnoType(apn1.getMvnoType());
        apnBuilder.setMvnoMatchData(apn1.getMvnoMatchData());
        apnBuilder.setApnSetId(apn1.getApnSetId());
        apnBuilder.setCarrierId(apn1.getCarrierId());
        apnBuilder.setSkip464Xlat(apn1.getSkip464Xlat());
+4 −0
Original line number Diff line number Diff line
@@ -795,6 +795,8 @@ public class DataProfileManagerTest extends TelephonyTest {
                        .setProtocol(ApnSetting.PROTOCOL_IPV4V6)
                        .setRoamingProtocol(ApnSetting.PROTOCOL_IPV4V6)
                        .setCarrierEnabled(true)
                        .setMvnoMatchData("1")
                        .setMvnoType(1)
                        .build())
                .build();

@@ -809,6 +811,8 @@ public class DataProfileManagerTest extends TelephonyTest {
                        .setProtocol(ApnSetting.PROTOCOL_IPV4V6)
                        .setRoamingProtocol(ApnSetting.PROTOCOL_IPV4V6)
                        .setCarrierEnabled(true)
                        .setMvnoMatchData("2")
                        .setMvnoType(2)
                        .build())
                .build();