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

Commit 6a1dc7b7 authored by Ling Ma's avatar Ling Ma
Browse files

APN anomaly report - allow UNKNOWN lingering network

Test: basic
Bug: 235640218
Change-Id: I8451f2ef038b8de0e37372efd2976ec44ad2fe90
parent 46bfc351
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -804,10 +804,17 @@ public class DataProfileManager extends Handler {
        for (int i = 0; i < profiles.size(); i++) {
            ApnSetting a = profiles.get(i).getApnSetting();
            if (a == null) continue;
            if ((a.getNetworkTypeBitmask() | a.getLingeringNetworkTypeBitmask())
            if (// Lingering network is not the default and doesn't cover all the regular networks
                    (int) TelephonyManager.NETWORK_TYPE_BITMASK_UNKNOWN
                    != a.getLingeringNetworkTypeBitmask()
                            && (a.getNetworkTypeBitmask() | a.getLingeringNetworkTypeBitmask())
                    != a.getLingeringNetworkTypeBitmask()) {
                reportAnomaly("Apn[" + a.getApnName()
                                + "] supported network should be a subset of the lingering network",
                reportAnomaly("Apn[" + a.getApnName() + "] network "
                                + TelephonyManager.convertNetworkTypeBitmaskToString(
                                        a.getNetworkTypeBitmask()) + " should be a subset of "
                                + "the lingering network "
                                + TelephonyManager.convertNetworkTypeBitmaskToString(
                                a.getLingeringNetworkTypeBitmask()),
                        "9af73e18-b523-4dc5-adab-4bb24355d838");
            }
            for (int j = i + 1; j < profiles.size(); j++) {