Allow for PSTN accounts to be marked as not emergency call capable.

Bug: 25230605
Change-Id: I2615ae72ab8b485ea22d4ec18ea92d26e534dac1
diff --git a/res/values/config.xml b/res/values/config.xml
index fbbbcd6..0b1f93c 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -215,4 +215,7 @@
 
     <!-- Flag indicating whether the the emergency phone account should be emergency calls only -->
     <bool name="config_emergency_account_emergency_calls_only">false</bool>
+
+    <!-- Whether the emergency only account can make emergency calls -->
+    <bool name="config_pstnCanPlaceEmergencyCalls">true</bool>
 </resources>
diff --git a/src/com/android/services/telephony/TelecomAccountRegistry.java b/src/com/android/services/telephony/TelecomAccountRegistry.java
index d43a4a0..a07e2e6 100644
--- a/src/com/android/services/telephony/TelecomAccountRegistry.java
+++ b/src/com/android/services/telephony/TelecomAccountRegistry.java
@@ -161,9 +161,12 @@
             // By default all SIM phone accounts can place emergency calls.
             int capabilities = PhoneAccount.CAPABILITY_SIM_SUBSCRIPTION |
                     PhoneAccount.CAPABILITY_CALL_PROVIDER |
-                    PhoneAccount.CAPABILITY_PLACE_EMERGENCY_CALLS |
                     PhoneAccount.CAPABILITY_MULTI_USER;
 
+            if (mContext.getResources().getBoolean(R.bool.config_pstnCanPlaceEmergencyCalls)) {
+                capabilities |= PhoneAccount.CAPABILITY_PLACE_EMERGENCY_CALLS;
+            }
+
             mIsVideoCapable = mPhone.isVideoEnabled();
             if (mIsVideoCapable) {
                 capabilities |= PhoneAccount.CAPABILITY_VIDEO_CALLING;