Update SubscriptionInfo and mPhone for new intents.

+ Handle updates when there's a new intent, even if the activity
already exists.
+ Set FLAG_ACTIVITY_CLEAR_TOP so the intent is delivered to
onNewIntent().

Bug: 18724707
Change-Id: I78861a9acfa459cded01aa0ebf9c1fb3c5415bf6
diff --git a/src/com/android/phone/CallFeaturesSetting.java b/src/com/android/phone/CallFeaturesSetting.java
index a971373..fbaddbd 100644
--- a/src/com/android/phone/CallFeaturesSetting.java
+++ b/src/com/android/phone/CallFeaturesSetting.java
@@ -1302,6 +1302,16 @@
         }
     }
 
+    @Override
+    protected void onNewIntent(Intent newIntent) {
+        setIntent(newIntent);
+
+        mSubscriptionInfoHelper = new SubscriptionInfoHelper(this, getIntent());
+        mSubscriptionInfoHelper.setActionBarTitle(
+                getActionBar(), getResources(), R.string.call_settings_with_label);
+        mPhone = mSubscriptionInfoHelper.getPhone();
+    }
+
     private static void log(String msg) {
         Log.d(LOG_TAG, msg);
     }
diff --git a/src/com/android/phone/settings/PhoneAccountSettingsFragment.java b/src/com/android/phone/settings/PhoneAccountSettingsFragment.java
index 56cd0cb..6ca146c 100644
--- a/src/com/android/phone/settings/PhoneAccountSettingsFragment.java
+++ b/src/com/android/phone/settings/PhoneAccountSettingsFragment.java
@@ -318,7 +318,7 @@
         for (SubscriptionInfo subscription : sil) {
             CharSequence label = subscription.getDisplayName();
             Intent intent = new Intent(TelecomManager.ACTION_SHOW_CALL_SETTINGS);
-            intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+            intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
             SubscriptionInfoHelper.addExtrasToIntent(intent, subscription);
 
             Preference accountPreference = new Preference(getActivity());