diff --git a/src/com/android/phone/CallFeaturesSetting.java b/src/com/android/phone/CallFeaturesSetting.java
index 1d054a6..c516dda 100644
--- a/src/com/android/phone/CallFeaturesSetting.java
+++ b/src/com/android/phone/CallFeaturesSetting.java
@@ -1124,7 +1124,7 @@
         mSetupVoicemail = mShowVoicemailPreference &&
                 getIntent().getBooleanExtra(SETUP_VOICEMAIL_EXTRA, false);
 
-        mSubscriptionInfoHelper = new SubscriptionInfoHelper(getIntent());
+        mSubscriptionInfoHelper = new SubscriptionInfoHelper(this, getIntent());
         mSubscriptionInfoHelper.setActionBarTitle(
                 getActionBar(), getResources(), R.string.call_settings_with_label);
         mPhone = mSubscriptionInfoHelper.getPhone();
@@ -1257,19 +1257,19 @@
                         addPreferencesFromResource(R.xml.cdma_call_privacy);
                     }
                 } else if (phoneType == PhoneConstants.PHONE_TYPE_GSM) {
-                    fdnButton.setIntent(mSubscriptionInfoHelper.getIntent(this, FdnSetting.class));
+                    fdnButton.setIntent(mSubscriptionInfoHelper.getIntent(FdnSetting.class));
 
                     if (getResources().getBoolean(R.bool.config_additional_call_setting)) {
                         addPreferencesFromResource(R.xml.gsm_umts_call_options);
 
                         Preference callForwardingPref = prefSet.findPreference(CALL_FORWARDING_KEY);
                         callForwardingPref.setIntent(mSubscriptionInfoHelper.getIntent(
-                                this, GsmUmtsCallForwardOptions.class));
+                                GsmUmtsCallForwardOptions.class));
 
                         Preference additionalGsmSettingsPref =
                                 prefSet.findPreference(ADDITIONAL_GSM_SETTINGS_KEY);
                         additionalGsmSettingsPref.setIntent(mSubscriptionInfoHelper.getIntent(
-                                this, GsmUmtsAdditionalCallOptions.class));
+                                GsmUmtsAdditionalCallOptions.class));
                     }
                 } else {
                     throw new IllegalStateException("Unexpected phone type: " + phoneType);
@@ -1432,8 +1432,8 @@
      * This is useful for implementing "HomeAsUp" capability for second-level Settings.
      */
     public static void goUpToTopLevelSetting(
-                Activity activity, SubscriptionInfoHelper subscriptionInfoHelper) {
-        Intent intent = subscriptionInfoHelper.getIntent(activity, CallFeaturesSetting.class);
+            Activity activity, SubscriptionInfoHelper subscriptionInfoHelper) {
+        Intent intent = subscriptionInfoHelper.getIntent(CallFeaturesSetting.class);
         intent.setAction(Intent.ACTION_MAIN);
         intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
         activity.startActivity(intent);
diff --git a/src/com/android/phone/GsmUmtsAdditionalCallOptions.java b/src/com/android/phone/GsmUmtsAdditionalCallOptions.java
index 30ce1fa..88d32fb 100644
--- a/src/com/android/phone/GsmUmtsAdditionalCallOptions.java
+++ b/src/com/android/phone/GsmUmtsAdditionalCallOptions.java
@@ -33,7 +33,7 @@
 
         addPreferencesFromResource(R.xml.gsm_umts_additional_options);
 
-        mSubscriptionInfoHelper = new SubscriptionInfoHelper(getIntent());
+        mSubscriptionInfoHelper = new SubscriptionInfoHelper(this, getIntent());
         mSubscriptionInfoHelper.setActionBarTitle(
                 getActionBar(), getResources(), R.string.additional_gsm_call_settings_with_label);
         mPhone = mSubscriptionInfoHelper.getPhone();
diff --git a/src/com/android/phone/GsmUmtsCallForwardOptions.java b/src/com/android/phone/GsmUmtsCallForwardOptions.java
index fe27850..5a16edc 100644
--- a/src/com/android/phone/GsmUmtsCallForwardOptions.java
+++ b/src/com/android/phone/GsmUmtsCallForwardOptions.java
@@ -53,7 +53,7 @@
 
         addPreferencesFromResource(R.xml.callforward_options);
 
-        mSubscriptionInfoHelper = new SubscriptionInfoHelper(getIntent());
+        mSubscriptionInfoHelper = new SubscriptionInfoHelper(this, getIntent());
         mSubscriptionInfoHelper.setActionBarTitle(
                 getActionBar(), getResources(), R.string.call_forwarding_settings_with_label);
         mPhone = mSubscriptionInfoHelper.getPhone();
diff --git a/src/com/android/phone/SubscriptionInfoHelper.java b/src/com/android/phone/SubscriptionInfoHelper.java
index f325b1a..9f0ebd0 100644
--- a/src/com/android/phone/SubscriptionInfoHelper.java
+++ b/src/com/android/phone/SubscriptionInfoHelper.java
@@ -22,6 +22,7 @@
 import android.content.res.Resources;
 import android.telephony.SubscriptionInfo;
 import android.telephony.SubscriptionManager;
+import android.telephony.TelephonyManager;
 import android.text.TextUtils;
 
 import com.android.phone.PhoneGlobals;
@@ -45,24 +46,26 @@
     private static final String SUB_LABEL_EXTRA =
             "com.android.phone.settings.SubscriptionInfoHelper.SubscriptionLabel";
 
+    private static Context mContext;
+
     private static int mSubId = NO_SUB_ID;
     private static String mSubLabel;
 
     /**
      * Instantiates the helper, by extracting the subscription id and label from the intent.
      */
-    public SubscriptionInfoHelper(Intent intent) {
+    public SubscriptionInfoHelper(Context context, Intent intent) {
+        mContext = context;
         mSubId = intent.getIntExtra(SUB_ID_EXTRA, NO_SUB_ID);
         mSubLabel = intent.getStringExtra(SUB_LABEL_EXTRA);
     }
 
     /**
-     * @param context The context.
      * @param newActivityClass The class of the activity for the intent to start.
      * @return Intent containing extras for the subscription id and label if they exist.
      */
-    public Intent getIntent(Context context, Class newActivityClass) {
-        Intent intent = new Intent(context, newActivityClass);
+    public Intent getIntent(Class newActivityClass) {
+        Intent intent = new Intent(mContext, newActivityClass);
 
         if (hasSubId()) {
             intent.putExtra(SUB_ID_EXTRA, mSubId);
@@ -106,6 +109,10 @@
             return;
         }
 
+        if (!TelephonyManager.from(mContext).isMultiSimEnabled()) {
+            return;
+        }
+
         String title = String.format(res.getString(resId), mSubLabel);
         actionBar.setTitle(title);
     }
diff --git a/src/com/android/phone/settings/fdn/DeleteFdnContactScreen.java b/src/com/android/phone/settings/fdn/DeleteFdnContactScreen.java
index d54de43..fa32a25 100644
--- a/src/com/android/phone/settings/fdn/DeleteFdnContactScreen.java
+++ b/src/com/android/phone/settings/fdn/DeleteFdnContactScreen.java
@@ -95,7 +95,7 @@
     private void resolveIntent() {
         Intent intent = getIntent();
 
-        mSubscriptionInfoHelper = new SubscriptionInfoHelper(intent);
+        mSubscriptionInfoHelper = new SubscriptionInfoHelper(this, intent);
 
         mName =  intent.getStringExtra(INTENT_EXTRA_NAME);
         mNumber =  intent.getStringExtra(INTENT_EXTRA_NUMBER);
diff --git a/src/com/android/phone/settings/fdn/EditFdnContactScreen.java b/src/com/android/phone/settings/fdn/EditFdnContactScreen.java
index 944eaad..00bd9fc 100644
--- a/src/com/android/phone/settings/fdn/EditFdnContactScreen.java
+++ b/src/com/android/phone/settings/fdn/EditFdnContactScreen.java
@@ -216,7 +216,7 @@
     private void resolveIntent() {
         Intent intent = getIntent();
 
-        mSubscriptionInfoHelper = new SubscriptionInfoHelper(intent);
+        mSubscriptionInfoHelper = new SubscriptionInfoHelper(this, intent);
 
         mName =  intent.getStringExtra(INTENT_EXTRA_NAME);
         mNumber =  intent.getStringExtra(INTENT_EXTRA_NUMBER);
@@ -335,7 +335,7 @@
     private void deleteSelected() {
         // delete ONLY if this is NOT a new contact.
         if (!mAddContact) {
-            Intent intent = mSubscriptionInfoHelper.getIntent(this, DeleteFdnContactScreen.class);
+            Intent intent = mSubscriptionInfoHelper.getIntent(DeleteFdnContactScreen.class);
             intent.putExtra(INTENT_EXTRA_NAME, mName);
             intent.putExtra(INTENT_EXTRA_NUMBER, mNumber);
             startActivity(intent);
diff --git a/src/com/android/phone/settings/fdn/FdnList.java b/src/com/android/phone/settings/fdn/FdnList.java
index d7bfde2..0174a82 100644
--- a/src/com/android/phone/settings/fdn/FdnList.java
+++ b/src/com/android/phone/settings/fdn/FdnList.java
@@ -57,7 +57,7 @@
             actionBar.setDisplayHomeAsUpEnabled(true);
         }
 
-        mSubscriptionInfoHelper = new SubscriptionInfoHelper(getIntent());
+        mSubscriptionInfoHelper = new SubscriptionInfoHelper(this, getIntent());
         mSubscriptionInfoHelper.setActionBarTitle(
                 getActionBar(), getResources(), R.string.fdn_list_with_label);
     }
@@ -101,7 +101,7 @@
     public boolean onOptionsItemSelected(MenuItem item) {
         switch (item.getItemId()) {
             case android.R.id.home:  // See ActionBar#setDisplayHomeAsUpEnabled()
-                Intent intent = mSubscriptionInfoHelper.getIntent(this, FdnSetting.class);
+                Intent intent = mSubscriptionInfoHelper.getIntent(FdnSetting.class);
                 intent.setAction(Intent.ACTION_MAIN);
                 intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
                 startActivity(intent);
@@ -132,7 +132,7 @@
 
     private void addContact() {
         //If there is no INTENT_EXTRA_NAME provided, EditFdnContactScreen treats it as an "add".
-        Intent intent = mSubscriptionInfoHelper.getIntent(this, EditFdnContactScreen.class);
+        Intent intent = mSubscriptionInfoHelper.getIntent(EditFdnContactScreen.class);
         startActivity(intent);
     }
 
@@ -154,7 +154,7 @@
             String name = mCursor.getString(NAME_COLUMN);
             String number = mCursor.getString(NUMBER_COLUMN);
 
-            Intent intent = mSubscriptionInfoHelper.getIntent(this, EditFdnContactScreen.class);
+            Intent intent = mSubscriptionInfoHelper.getIntent(EditFdnContactScreen.class);
             intent.putExtra(INTENT_EXTRA_NAME, name);
             intent.putExtra(INTENT_EXTRA_NUMBER, number);
             startActivity(intent);
@@ -166,7 +166,7 @@
             String name = mCursor.getString(NAME_COLUMN);
             String number = mCursor.getString(NUMBER_COLUMN);
 
-            Intent intent = mSubscriptionInfoHelper.getIntent(this, DeleteFdnContactScreen.class);
+            Intent intent = mSubscriptionInfoHelper.getIntent(DeleteFdnContactScreen.class);
             intent.putExtra(INTENT_EXTRA_NAME, name);
             intent.putExtra(INTENT_EXTRA_NUMBER, number);
             startActivity(intent);
diff --git a/src/com/android/phone/settings/fdn/FdnSetting.java b/src/com/android/phone/settings/fdn/FdnSetting.java
index acbe0b8..b825f7a 100644
--- a/src/com/android/phone/settings/fdn/FdnSetting.java
+++ b/src/com/android/phone/settings/fdn/FdnSetting.java
@@ -455,7 +455,7 @@
     protected void onCreate(Bundle icicle) {
         super.onCreate(icicle);
 
-        mSubscriptionInfoHelper = new SubscriptionInfoHelper(getIntent());
+        mSubscriptionInfoHelper = new SubscriptionInfoHelper(this, getIntent());
         mPhone = mSubscriptionInfoHelper.getPhone();
 
         addPreferencesFromResource(R.xml.fdn_setting);
@@ -473,7 +473,7 @@
 
         PreferenceScreen fdnListPref =
                 (PreferenceScreen) prefSet.findPreference(FDN_LIST_PREF_SCREEN_KEY);
-        fdnListPref.setIntent(mSubscriptionInfoHelper.getIntent(this, FdnList.class));
+        fdnListPref.setIntent(mSubscriptionInfoHelper.getIntent(FdnList.class));
 
         // Only reset the pin change dialog if we're not in the middle of changing it.
         if (icicle == null) {
