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

Commit 045a66eb authored by Marcos Marado's avatar Marcos Marado Committed by Gerrit Code Review
Browse files

APN Settings: on MVNOs, filter unmatching MMS APNs

If you have an MVNO, you only show the APNs for it.
However, the filtering doesn't happen to MMS APNs, so you end up listing all
the MMS APNs for that mcc/mnc pair anyway.

With this patch we now also filter out MMS APNs.

Change-Id: I61742cffa2c5e000782eec5282d2c76357807871
Issue-Id: CYNGNOS-1462
parent 49b8117b
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -313,7 +313,11 @@ public class ApnSettings extends SettingsPreferenceFragment implements

                if (isMvno) {
                    if (!mvnoMatches(mvnoType, mvnoData, simOperatorName, imsiSIM, gid1)) {
                        if (pref.getSelectable()) {
                            apnList.removePreference(pref);
                        } else {
                            mmsApnList.remove(pref);
                        }
                    } else {
                        ApnInfo apnInfo = new ApnInfo(name, apn, key, type, mvnoType, readOnly);
                        if ("spn".equals(mvnoType)) {
@@ -334,10 +338,12 @@ public class ApnSettings extends SettingsPreferenceFragment implements
                if (mvnoImsiList.size() > 0) {
                    for (Preference pref : mvnoGid1List) {
                        apnList.removePreference(pref);
                        mmsApnList.remove(pref);
                    }
                }
                for (Preference pref : mvnoSpnList) {
                    apnList.removePreference(pref);
                    mmsApnList.remove(pref);
                }
            }