Merge "Style disabled Preferences text to grey." into lmp-mr1-dev
diff --git a/src/com/android/phone/CdmaOptions.java b/src/com/android/phone/CdmaOptions.java
index 50a6def..897c797 100644
--- a/src/com/android/phone/CdmaOptions.java
+++ b/src/com/android/phone/CdmaOptions.java
@@ -81,6 +81,7 @@
                             final Intent intent = new Intent(Settings.ACTION_APN_SETTINGS);
                             // This will setup the Home and Search affordance
                             intent.putExtra(":settings:show_fragment_as_subsetting", true);
+                            intent.putExtra("sub_id", mPhone.getSubId());
                             mPrefActivity.startActivity(intent);
                             return true;
                         }
diff --git a/src/com/android/phone/MobileNetworkSettings.java b/src/com/android/phone/MobileNetworkSettings.java
index 02632de..58aa511 100644
--- a/src/com/android/phone/MobileNetworkSettings.java
+++ b/src/com/android/phone/MobileNetworkSettings.java
@@ -266,6 +266,7 @@
             final int slotId = Integer.parseInt(tabId);
             final SubscriptionInfo sir = findRecordBySlotId(slotId);
             mPhone = PhoneFactory.getPhone(SubscriptionManager.getPhoneId(sir.getSubscriptionId()));
+            if (DBG) log("onTabChanged: slotId=" + slotId + " sir=" + sir);
 
             // The User has changed tab; update the body.
             updateBody();
@@ -290,13 +291,16 @@
         super.onCreate(icicle);
         final Context context = getApplicationContext();
 
-        mPhone = PhoneGlobals.getPhone();
         mHandler = new MyHandler();
         mUm = (UserManager) getSystemService(Context.USER_SERVICE);
         final TelephonyManager tm =
                 (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
         mSubscriptionManager = SubscriptionManager.from(this);
 
+        // Initialize Phone to the phone associated with slotId 0
+        final SubscriptionInfo si = findRecordBySlotId(0);
+        mPhone = PhoneFactory.getPhone(SubscriptionManager.getPhoneId(si.getSubscriptionId()));
+
         for (int i = 0; i < tm.getSimCount(); i++) {
             SubscriptionInfo sir = findRecordBySlotId(i);
             if (sir != null) {
@@ -402,6 +406,10 @@
         boolean isLteOnCdma = mPhone.getLteOnCdmaMode() == PhoneConstants.LTE_ON_CDMA_TRUE;
         final int phoneSubId = mPhone.getSubId();
 
+        if (DBG) {
+            log("updateBody: isLteOnCdma=" + isLteOnCdma + " phoneSubId=" + phoneSubId);
+        }
+
         if (prefSet != null) {
             prefSet.removeAll();
             prefSet.addPreference(mButtonDataRoam);
diff --git a/src/com/android/services/telephony/ImsConference.java b/src/com/android/services/telephony/ImsConference.java
index 528b65d..5a15a47 100644
--- a/src/com/android/services/telephony/ImsConference.java
+++ b/src/com/android/services/telephony/ImsConference.java
@@ -179,6 +179,13 @@
         super(null);
         mTelephonyConnectionService = telephonyConnectionService;
         setConferenceHost(conferenceHost);
+        if (conferenceHost != null && conferenceHost.getCall() != null
+                && conferenceHost.getCall().getPhone() != null) {
+            mPhoneAccount = PhoneUtils.makePstnPhoneAccountHandle(
+                    conferenceHost.getCall().getPhone());
+            Log.v(this, "set phacc to " + mPhoneAccount);
+        }
+
         setConnectionCapabilities(
                 Connection.CAPABILITY_SUPPORT_HOLD |
                 Connection.CAPABILITY_HOLD |