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

Commit 3d476575 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Match APN types with ignoring the case" into main am: 720fd136 am: 9a44907d

parents faff4d6b 9a44907d
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -435,15 +435,20 @@ public class ApnEditor extends SettingsPreferenceFragment
            return false;
        }

        if (hasAllApns(apnTypesArray1) || TextUtils.isEmpty(apnTypes2)) {
        final String[] apnTypesArray1LowerCase = new String[apnTypesArray1.length];
        for (int i = 0; i < apnTypesArray1.length; i++) {
            apnTypesArray1LowerCase[i] = apnTypesArray1[i].toLowerCase();
        }

        if (hasAllApns(apnTypesArray1LowerCase) || TextUtils.isEmpty(apnTypes2)) {
            return true;
        }

        final List apnTypesList1 = Arrays.asList(apnTypesArray1);
        final List apnTypesList1 = Arrays.asList(apnTypesArray1LowerCase);
        final String[] apnTypesArray2 = apnTypes2.split(",");

        for (String apn : apnTypesArray2) {
            if (apnTypesList1.contains(apn.trim())) {
            if (apnTypesList1.contains(apn.trim().toLowerCase())) {
                Log.d(TAG, "apnTypesMatch: true because match found for " + apn.trim());
                return true;
            }