summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcos Marado <mmarado@cyngn.com>2015-12-18 16:53:41 +0000
committerdoc HD <doc.divxm@gmail.com>2015-12-23 19:06:01 +0200
commitcc2d8e69b4ffacf75a39cf221c936fa0aed524df (patch)
treeb9ebc1ac0a9de2a75a390575fd568f8d1ee2e1aa
parentb1c139eed38c151a9002c51c437ed4865684ec55 (diff)
APN Settings: on MVNOs, filter unmatching MMS APNslp5.1
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
-rw-r--r--src/com/android/settings/ApnSettings.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/com/android/settings/ApnSettings.java b/src/com/android/settings/ApnSettings.java
index 275434557fe..352b8fe1cab 100644
--- a/src/com/android/settings/ApnSettings.java
+++ b/src/com/android/settings/ApnSettings.java
@@ -313,7 +313,11 @@ public class ApnSettings extends SettingsPreferenceFragment implements
if (isMvno) {
if (!mvnoMatches(mvnoType, mvnoData, simOperatorName, imsiSIM, gid1)) {
- apnList.removePreference(pref);
+ 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);
}
}