summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/settings/ApnSettings.java7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/com/android/settings/ApnSettings.java b/src/com/android/settings/ApnSettings.java
index 0459a13..4bb836a 100644
--- a/src/com/android/settings/ApnSettings.java
+++ b/src/com/android/settings/ApnSettings.java
@@ -164,9 +164,6 @@ public class ApnSettings extends SettingsPreferenceFragment implements
SubscriptionManager.INVALID_SUBSCRIPTION_ID);
mImsi = activity.getIntent().getStringExtra(EXTRA_IMSI);
- if (mImsi == null) {
- mImsi = "";
- }
mUm = (UserManager) getSystemService(Context.USER_SERVICE);
@@ -419,7 +416,7 @@ public class ApnSettings extends SettingsPreferenceFragment implements
ContentValues values = new ContentValues();
values.put(APN_ID, mSelectedKey);
- if (TelephonyManager.getDefault().getPhoneCount() > 1) {
+ if (TelephonyManager.getDefault().getPhoneCount() > 1 && mImsi != null) {
Uri qUri = Uri.withAppendedPath(PREFERRED_MSIM_APN_URI,
String.valueOf(mSubscriptionInfo.getSubscriptionId()));
qUri = Uri.withAppendedPath(qUri, mImsi);
@@ -433,7 +430,7 @@ public class ApnSettings extends SettingsPreferenceFragment implements
String key = null;
Uri uri;
- if (TelephonyManager.getDefault().getPhoneCount() > 1) {
+ if (TelephonyManager.getDefault().getPhoneCount() > 1 && mImsi != null) {
uri = Uri.withAppendedPath(PREFERRED_MSIM_APN_URI,
String.valueOf(mSubscriptionInfo.getSubscriptionId()));
uri = Uri.withAppendedPath(uri, mImsi);