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

Commit 720fd136 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Match APN types with ignoring the case" into main

parents 24db817a 8bce735f
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -429,15 +429,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;
            }