Use carrier config API entrypoint

This was originally commit 52a93ff69cb87ee2ab7e75a2d3d64dcf502b4096

Bug: 21990447
Bug: 21878236
Change-Id: I98706af11b2a860892d2dc45d0426905ef0b6290
diff --git a/src/com/android/phone/PhoneGlobals.java b/src/com/android/phone/PhoneGlobals.java
index eb9ea15..4fca2ea 100644
--- a/src/com/android/phone/PhoneGlobals.java
+++ b/src/com/android/phone/PhoneGlobals.java
@@ -513,11 +513,11 @@
         return mCM;
     }
 
-    /* package */ PersistableBundle getCarrierConfig() {
+    public PersistableBundle getCarrierConfig() {
         return getCarrierConfigForSubId(SubscriptionManager.getDefaultSubId());
     }
 
-    /* package */ PersistableBundle getCarrierConfigForSubId(int subId) {
+    public PersistableBundle getCarrierConfigForSubId(int subId) {
         return configLoader.getConfigForSubId(subId);
     }
 
diff --git a/src/com/android/services/telephony/TelecomAccountRegistry.java b/src/com/android/services/telephony/TelecomAccountRegistry.java
index eab1ced..df458fd 100644
--- a/src/com/android/services/telephony/TelecomAccountRegistry.java
+++ b/src/com/android/services/telephony/TelecomAccountRegistry.java
@@ -27,9 +27,11 @@
 import android.graphics.drawable.Drawable;
 import android.graphics.drawable.Icon;
 import android.net.Uri;
+import android.os.PersistableBundle;
 import android.telecom.PhoneAccount;
 import android.telecom.PhoneAccountHandle;
 import android.telecom.TelecomManager;
+import android.telephony.CarrierConfigManager;
 import android.telephony.PhoneStateListener;
 import android.telephony.ServiceState;
 import android.telephony.SubscriptionInfo;
@@ -232,10 +234,11 @@
                 configuration.mnc = subscriptionInfo.getMnc();
             }
 
-            // Load the MNC/MCC specific configuration.
-            Context subContext = mContext.createConfigurationContext(configuration);
-            mIsVideoPauseSupported = subContext.getResources().getBoolean(
-                    R.bool.support_pause_ims_video_calls);
+            // Check if IMS video pause is supported.
+            PersistableBundle b =
+                    PhoneGlobals.getInstance().getCarrierConfigForSubId(mPhone.getSubId());
+            mIsVideoPauseSupported
+                    = b.getBoolean(CarrierConfigManager.KEY_SUPPORT_PAUSE_IMS_VIDEO_CALLS_BOOL);
         }
 
         /**