Merge "EmergencyDialer should work on secondary users." into mnc-dev
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index cddbc1a..df3ba90 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -122,6 +122,7 @@
<uses-permission android:name="com.android.voicemail.permission.WRITE_VOICEMAIL" />
<uses-permission android:name="com.android.voicemail.permission.READ_VOICEMAIL" />
<uses-permission android:name="android.permission.LOCAL_MAC_ADDRESS" />
+ <uses-permission android:name="android.permission.CHANGE_COMPONENT_ENABLED_STATE" />
<!-- This tells the activity manager to not delay any of our activity
diff --git a/res/layout/sim_ndp.xml b/res/layout/sim_ndp.xml
index 5e98cff..5e3c472 100644
--- a/res/layout/sim_ndp.xml
+++ b/res/layout/sim_ndp.xml
@@ -51,7 +51,7 @@
android:paddingEnd="20dip" />
<!-- Dismiss button. (Not present in some products; see
- sim_network_unlock_allow_dismiss in config.xml.) -->
+ CarrierConfigManager#KEY_SIM_NETWORK_UNLOCK_ALLOW_DISMISS_BOOL) -->
<Button android:id="@+id/ndp_dismiss"
android:layout_gravity="center_horizontal"
android:text="@string/sim_ndp_dismiss_text"
diff --git a/res/values-mcc001-mnc01/config.xml b/res/values-mcc001-mnc01/config.xml
deleted file mode 100644
index 3e6a69b..0000000
--- a/res/values-mcc001-mnc01/config.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2014 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<!-- Phone app resources that may need to be customized
- for different hardware or product builds. -->
-<resources>
- <!-- Show APN Settings for some CDMA carriers -->
- <bool name="config_show_apn_setting_cdma">true</bool>
-</resources>
diff --git a/res/values-mcc001-mnc010/config.xml b/res/values-mcc001-mnc010/config.xml
deleted file mode 100644
index 3e6a69b..0000000
--- a/res/values-mcc001-mnc010/config.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2014 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<!-- Phone app resources that may need to be customized
- for different hardware or product builds. -->
-<resources>
- <!-- Show APN Settings for some CDMA carriers -->
- <bool name="config_show_apn_setting_cdma">true</bool>
-</resources>
diff --git a/res/values-mcc234-mnc02/config.xml b/res/values-mcc234-mnc02/config.xml
deleted file mode 100644
index 7eccfdc..0000000
--- a/res/values-mcc234-mnc02/config.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<!-- Telephony service resources that may need to be customized
- for different hardware or product builds. -->
-<resources>
- <!-- Configure certain GsmUmtsOptions to be available or not. The
- default values are in services/Telephony/res/values/config.xml
- and maybe overridden in operator specific resource directories
- or device specific overlays. -->
- <bool name="config_prefer_2g" translatable="false">false</bool>
-</resources>
diff --git a/res/values-mcc234-mnc10/config.xml b/res/values-mcc234-mnc10/config.xml
deleted file mode 100644
index 7eccfdc..0000000
--- a/res/values-mcc234-mnc10/config.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<!-- Telephony service resources that may need to be customized
- for different hardware or product builds. -->
-<resources>
- <!-- Configure certain GsmUmtsOptions to be available or not. The
- default values are in services/Telephony/res/values/config.xml
- and maybe overridden in operator specific resource directories
- or device specific overlays. -->
- <bool name="config_prefer_2g" translatable="false">false</bool>
-</resources>
diff --git a/res/values-mcc234-mnc11/config.xml b/res/values-mcc234-mnc11/config.xml
deleted file mode 100644
index 7eccfdc..0000000
--- a/res/values-mcc234-mnc11/config.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2013 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<!-- Telephony service resources that may need to be customized
- for different hardware or product builds. -->
-<resources>
- <!-- Configure certain GsmUmtsOptions to be available or not. The
- default values are in services/Telephony/res/values/config.xml
- and maybe overridden in operator specific resource directories
- or device specific overlays. -->
- <bool name="config_prefer_2g" translatable="false">false</bool>
-</resources>
diff --git a/res/values-mcc246-mnc081/config.xml b/res/values-mcc246-mnc081/config.xml
deleted file mode 100644
index 3e6a69b..0000000
--- a/res/values-mcc246-mnc081/config.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2014 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<!-- Phone app resources that may need to be customized
- for different hardware or product builds. -->
-<resources>
- <!-- Show APN Settings for some CDMA carriers -->
- <bool name="config_show_apn_setting_cdma">true</bool>
-</resources>
diff --git a/res/values-mcc310-mnc004/config.xml b/res/values-mcc310-mnc004/config.xml
deleted file mode 100755
index 198e65f..0000000
--- a/res/values-mcc310-mnc004/config.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2014 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<!-- Phone app resources that may need to be customized
- for different hardware or product builds. -->
-<resources>
- <!-- Flag indicating if dtmf tone type is enabled -->
- <bool name="support_swap_after_merge" translatable="false">false</bool>
- <!-- Determine whether the voicemail notification is persistent in the notification bar.
- If true, the voicemail notifications cannot be dismissed from the notification bar. -->
- <bool name="voicemail_notification_persistent">true</bool>
-</resources>
diff --git a/res/values-mcc310-mnc028/config.xml b/res/values-mcc310-mnc028/config.xml
deleted file mode 100644
index 3e6a69b..0000000
--- a/res/values-mcc310-mnc028/config.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2014 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<!-- Phone app resources that may need to be customized
- for different hardware or product builds. -->
-<resources>
- <!-- Show APN Settings for some CDMA carriers -->
- <bool name="config_show_apn_setting_cdma">true</bool>
-</resources>
diff --git a/res/values-mcc310-mnc120/config.xml b/res/values-mcc310-mnc120/config.xml
deleted file mode 100644
index 93a8079..0000000
--- a/res/values-mcc310-mnc120/config.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2014 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<!-- Phone app resources that may need to be customized
- for different hardware or product builds. -->
-<resources>
- <!-- Flag indicating if dtmf tone type is enabled -->
- <bool name="dtmf_type_enabled">true</bool>
- <!-- Determine whether the voicemail notification is persistent in the notification bar.
- If true, the voicemail notifications cannot be dismissed from the notification bar. -->
- <bool name="voicemail_notification_persistent">true</bool>
-</resources>
diff --git a/res/values-mcc310-mnc410/config.xml b/res/values-mcc310-mnc410/config.xml
deleted file mode 100644
index bf89c34..0000000
--- a/res/values-mcc310-mnc410/config.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2015 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License
- -->
-
-<resources>
- <bool name="support_pause_ims_video_calls" translatable="false">false</bool>
-</resources>
\ No newline at end of file
diff --git a/res/values-mcc311-mnc220/config.xml b/res/values-mcc311-mnc220/config.xml
deleted file mode 100644
index 22701f0..0000000
--- a/res/values-mcc311-mnc220/config.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2014 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<!-- Phone app resources that may need to be customized
- for different hardware or product builds. -->
-<resources>
- <!-- Flag indicating if dtmf tone type is enabled -->
- <bool name="dtmf_type_enabled">true</bool>
- <!-- CDMA activation goes through OTASP. -->
- <bool name="config_use_otasp_for_provisioning">true</bool>
-</resources>
diff --git a/res/values-mcc311-mnc390/config.xml b/res/values-mcc311-mnc390/config.xml
deleted file mode 100644
index 4656904..0000000
--- a/res/values-mcc311-mnc390/config.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2014 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<!-- Phone app resources that may need to be customized
- for different hardware or product builds. -->
-<resources>
- <!-- Show APN Settings for some CDMA carriers -->
- <bool name="config_show_apn_setting_cdma">true</bool>
- <!-- Flag indicating if dtmf tone type is enabled -->
- <bool name="dtmf_type_enabled">true</bool>
-</resources>
diff --git a/res/values-mcc311-mnc480/config.xml b/res/values-mcc311-mnc480/config.xml
deleted file mode 100755
index b7d0d6e..0000000
--- a/res/values-mcc311-mnc480/config.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2014 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<!-- Phone app resources that may need to be customized
- for different hardware or product builds. -->
-<resources>
- <!-- Flag indicating if dtmf tone type is enabled -->
- <bool name="dtmf_type_enabled">true</bool>
- <bool name="support_swap_after_merge" translatable="false">false</bool>
- <!-- Determine whether the voicemail notification is persistent in the notification bar.
- If true, the voicemail notifications cannot be dismissed from the notification bar. -->
- <bool name="voicemail_notification_persistent">true</bool>
- <bool name="support_pause_ims_video_calls" translatable="false">true</bool>
-</resources>
diff --git a/res/values-mcc311-mnc490/config.xml b/res/values-mcc311-mnc490/config.xml
deleted file mode 100644
index 93a8079..0000000
--- a/res/values-mcc311-mnc490/config.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2014 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<!-- Phone app resources that may need to be customized
- for different hardware or product builds. -->
-<resources>
- <!-- Flag indicating if dtmf tone type is enabled -->
- <bool name="dtmf_type_enabled">true</bool>
- <!-- Determine whether the voicemail notification is persistent in the notification bar.
- If true, the voicemail notifications cannot be dismissed from the notification bar. -->
- <bool name="voicemail_notification_persistent">true</bool>
-</resources>
diff --git a/res/values-mcc311-mnc580/config.xml b/res/values-mcc311-mnc580/config.xml
deleted file mode 100644
index 22701f0..0000000
--- a/res/values-mcc311-mnc580/config.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2014 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<!-- Phone app resources that may need to be customized
- for different hardware or product builds. -->
-<resources>
- <!-- Flag indicating if dtmf tone type is enabled -->
- <bool name="dtmf_type_enabled">true</bool>
- <!-- CDMA activation goes through OTASP. -->
- <bool name="config_use_otasp_for_provisioning">true</bool>
-</resources>
diff --git a/res/values/config.xml b/res/values/config.xml
index 61af525..c0e808d 100755
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -14,6 +14,11 @@
limitations under the License.
-->
+<!-- NOTE: Many variables that used to be in this file have been migrated to
+ CarrierConfigManager.java. Please consider whether new variables belong
+ there before adding to this file. Variables here should be more closely
+ related to devices than to networks. -->
+
<!-- Phone app resources that may need to be customized
for different hardware or product builds. -->
<resources>
@@ -21,6 +26,7 @@
EVENT_SIM_NETWORK_LOCKED events from the Sim. If true, this will
prevent the IccNetworkDepersonalizationPanel from being shown,
and effectively disable the "Sim network lock" feature. -->
+ <!-- DEPRECATED: Use CarrierConfigManager#KEY_IGNORE_SIM_NETWORK_LOCKED_EVENTS_BOOL -->
<bool name="ignore_sim_network_locked_events">false</bool>
<!-- Flag indicating whether the Phone app should provide
@@ -31,6 +37,7 @@
(One important consequence: there will be no way to make an
Emergency Call if your SIM is network-locked and you don't know
the PIN.) -->
+ <!-- DEPRECATED: Use CarrierConfigManager#KEY_SIM_NETWORK_UNLOCK_ALLOW_DISMISS_BOOL -->
<bool name="sim_network_unlock_allow_dismiss">true</bool>
<!-- OTA configuration values, used when provisioning CDMA devices.
@@ -51,6 +58,7 @@
<integer name="OtaPlaySuccessFailureTone">0</integer>
<!-- Flag indicating if the phone is a world phone -->
+ <!-- DEPRECATED: Use CarrierConfigManager#KEY_WORLD_PHONE_BOOL -->
<bool name="world_phone">false</bool>
<!-- If true, enable vibration (haptic feedback) for key presses
@@ -59,25 +67,30 @@
consistent with the regular Dialer, this value should agree
with the corresponding values from config.xml under
apps/Contacts. -->
+ <!-- DEPRECATED: Use CarrierConfigManager#KEY_ENABLE_DIALER_KEY_VIBRATION_BOOL -->
<bool name="config_enable_dialer_key_vibration">true</bool>
<!-- Flag indicating if hac is enabled -->
<bool name="hac_enabled">false</bool>
<!-- Flag indicating if dtmf tone type is enabled -->
+ <!-- DEPRECATED: Use CarrierConfigManager#KEY_DTMF_TYPE_ENABLED_BOOL -->
<bool name="dtmf_type_enabled">false</bool>
<!-- Flag indicating if auto retry is enabled -->
+ <!-- DEPRECATED: Use CarrierConfigManager#KEY_AUTO_RETRY_ENABLED_BOOL -->
<bool name="auto_retry_enabled">false</bool>
<!-- Determine whether we want to play local DTMF tones in a call, or
just let the radio/BP handle playing of the tones. -->
+ <!-- DEPRECATED: Use CarrierConfigManager#KEY_ALLOW_LOCAL_DTMF_TONES_BOOL -->
<bool name="allow_local_dtmf_tones">true</bool>
<!-- If true, show an onscreen "Dial" button in the dialer.
In practice this is used on all platforms, even the ones with hard SEND/END
keys, but for maximum flexibility it's controlled by a flag here
(which can be overridden on a per-product basis.) -->
+ <!-- DEPRECATED: Use CarrierConfigManager#KEY_SHOW_ONSCREEN_DIAL_BUTTON_BOOL -->
<bool name="config_show_onscreen_dial_button">true</bool>
<!-- Determine whether calls to mute the microphone in PhoneUtils
@@ -86,6 +99,7 @@
<bool name="send_mic_mute_to_AudioManager">false</bool>
<!-- Determines if device implements a noise suppression device for in call audio-->
+ <!-- DEPRECATED: Use CarrierConfigManager#KEY_HAS_IN_CALL_NOISE_SUPPRESSION_BOOL -->
<bool name="has_in_call_noise_suppression">false</bool>
<!-- Determines if the current device should allow emergency numbers
@@ -99,26 +113,33 @@
up the exact date/time of an emergency call. So perhaps we
*should* log those calls, but instead fix the call log to disable
the "call" button for emergency numbers. -->
+ <!-- DEPRECATED: Use CarrierConfigManager#KEY_ALLOW_EMERGENCY_NUMBERS_IN_CALL_LOG_BOOL -->
<bool name="allow_emergency_numbers_in_call_log">false</bool>
<!-- If this is true, the SIM card (through Customer Service Profile EF file) will be
able to prevent manual operator selection. If false, this SIM setting will be
ignored and manual operator selection will always be available. See
CPHS4_2.WW6, CPHS B.4.7.1 for more information -->
+ <!-- DEPRECATED: Use CarrierConfigManager#KEY_CSP_ENABLED_BOOL -->
<bool name="csp_enabled">false</bool>
<!-- If true, removes the Voice Privacy option from Call Settings -->
+ <!-- DEPRECATED: Use CarrierConfigManager#KEY_VOICE_PRIVACY_DISABLE_UI_BOOL -->
<bool name="config_voice_privacy_disable">false</bool>
<!-- Configure certain GsmUmtsOptions to be available or not. The
default values are in Phone/res/values/config.xml and maybe overridden
in operator specific resource directories or device specific overlays. -->
+ <!-- DEPRECATED: Use CarrierConfigManager#KEY_APN_EXPAND_BOOL -->
<bool name="config_apn_expand" translatable="false">true</bool>
+ <!-- DEPRECATED: Use CarrierConfigManager#KEY_OPERATOR_SELECTION_EXPAND_BOOL -->
<bool name="config_operator_selection_expand" translatable="false">true</bool>
+ <!-- DEPRECATED: Use CarrierConfigManager#KEY_PREFER_2G_BOOL -->
<bool name="config_prefer_2g" translatable="false">true</bool>
<!-- Show enabled lte option for lte device -->
<bool name="config_enabled_lte" translatable="false">false</bool>
<!-- Show cdma auto network mode in (glabal) roaming -->
+ <!-- DEPRECATED: Use CarrierConfigManager#KEY_SHOW_CDMA_CHOICES_BOOL -->
<bool name="config_show_cdma" translatable="false">false</bool>
<!-- Package name for the default in-call UI and dialer [DO NOT TRANSLATE] -->
@@ -128,23 +149,28 @@
<string name="dialer_default_class" translatable="false">com.android.dialer.DialtactsActivity</string>
<!-- CDMA activation goes through HFA -->
+ <!-- DEPRECATED: Use CarrierConfigManager#KEY_USE_HFA_FOR_PROVISIONING_BOOL -->
<bool name="config_use_hfa_for_provisioning">false</bool>
<!-- CDMA activation goes through OTASP.
TODO: This should be combined with config_use_hfa_for_provisioning and implemented
as an enum (NONE, HFA, OTASP). -->
+ <!-- DEPRECATED: Use CarrierConfigManager#KEY_USE_OTASP_FOR_PROVISIONING_BOOL -->
<bool name="config_use_otasp_for_provisioning">false</bool>
<!-- Display carrier settings menu if true -->
+ <!-- DEPRECATED: Use CarrierConfigManager#KEY_CARRIER_SETTINGS_ENABLE_BOOL -->
<bool name="config_carrier_settings_enable">false</bool>
<!-- carrier settings menu -->
<string name="carrier_settings" translatable="false"></string>
<string name="carrier_settings_menu" translatable="false"></string>
<!-- Does not display additional call seting for IMS phone based on GSM Phone -->
+ <!-- DEPRECATED: Use CarrierConfigManager#KEY_ADDITIONAL_CALL_SETTING_BOOL -->
<bool name="config_additional_call_setting">true</bool>
<!-- Show APN Settings for some CDMA carriers -->
+ <!-- DEPRECATED: Use CarrierConfigManager#KEY_SHOW_APN_SETTING_CDMA_BOOL -->
<bool name="config_show_apn_setting_cdma">false</bool>
<!-- Allows the telephony HFA logic to run even if we're not in setup wizard. -->
@@ -157,9 +183,6 @@
If true, the voicemail notifications cannot be dismissed from the notification bar. -->
<bool name="voicemail_notification_persistent">false</bool>
- <!-- For IMS video over LTE calls, determines whether video pause signalling is supported. -->
- <bool name="support_pause_ims_video_calls" translatable="false">true</bool>
-
<!-- Disables dialing "*228" (OTASP provisioning) on CDMA carriers where it is not supported or
is potentially harmful by locking the SIM to 3G. -->
<string name="config_disable_cdma_activation_code" translatable="false">false</string>
diff --git a/src/com/android/phone/CarrierConfigLoader.java b/src/com/android/phone/CarrierConfigLoader.java
index d5db212..5130a83 100644
--- a/src/com/android/phone/CarrierConfigLoader.java
+++ b/src/com/android/phone/CarrierConfigLoader.java
@@ -358,7 +358,7 @@
/** Binds to the default or carrier config app. */
private boolean bindToConfigPackage(String pkgName, int phoneId, int eventId) {
log("Binding to " + pkgName + " for phone " + phoneId);
- Intent carrierService = new Intent(CarrierService.CONFIG_SERVICE_INTERFACE);
+ Intent carrierService = new Intent(CarrierService.CARRIER_SERVICE_INTERFACE);
carrierService.setPackage(pkgName);
mServiceConnection[phoneId] = new CarrierServiceConnection(phoneId, eventId);
try {
@@ -396,7 +396,7 @@
private String getCarrierPackageForPhoneId(int phoneId) {
List<String> carrierPackageNames = TelephonyManager.from(mContext)
.getCarrierPackageNamesForIntentAndPhone(
- new Intent(CarrierService.CONFIG_SERVICE_INTERFACE), phoneId);
+ new Intent(CarrierService.CARRIER_SERVICE_INTERFACE), phoneId);
if (carrierPackageNames != null && carrierPackageNames.size() > 0) {
return carrierPackageNames.get(0);
} else {
diff --git a/src/com/android/phone/IccNetworkDepersonalizationPanel.java b/src/com/android/phone/IccNetworkDepersonalizationPanel.java
index 34153c8..4831423 100644
--- a/src/com/android/phone/IccNetworkDepersonalizationPanel.java
+++ b/src/com/android/phone/IccNetworkDepersonalizationPanel.java
@@ -135,7 +135,7 @@
mUnlockButton.setOnClickListener(mUnlockListener);
// The "Dismiss" button is present in some (but not all) products,
- // based on the "sim_network_unlock_allow_dismiss" resource.
+ // based on the "KEY_SIM_NETWORK_UNLOCK_ALLOW_DISMISS_BOOL" variable.
mDismissButton = (Button) findViewById(R.id.ndp_dismiss);
PersistableBundle carrierConfig = PhoneGlobals.getInstance().getCarrierConfig();
if (carrierConfig.getBoolean(
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/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index 882a898..e8b6e05 100644
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -57,11 +57,13 @@
import com.android.ims.ImsManager;
import com.android.internal.telephony.CallManager;
+import com.android.internal.telephony.CellNetworkScanResult;
import com.android.internal.telephony.CommandException;
import com.android.internal.telephony.DefaultPhoneNotifier;
import com.android.internal.telephony.ITelephony;
import com.android.internal.telephony.IccCard;
import com.android.internal.telephony.MccTable;
+import com.android.internal.telephony.OperatorInfo;
import com.android.internal.telephony.Phone;
import com.android.internal.telephony.PhoneFactory;
import com.android.internal.telephony.ProxyController;
@@ -132,7 +134,10 @@
private static final int EVENT_SET_NETWORK_SELECTION_MODE_AUTOMATIC_DONE = 36;
private static final int CMD_GET_MODEM_ACTIVITY_INFO = 37;
private static final int EVENT_GET_MODEM_ACTIVITY_INFO_DONE = 38;
-
+ private static final int CMD_PERFORM_NETWORK_SCAN = 39;
+ private static final int EVENT_PERFORM_NETWORK_SCAN_DONE = 40;
+ private static final int CMD_SET_NETWORK_SELECTION_MODE_MANUAL = 41;
+ private static final int EVENT_SET_NETWORK_SELECTION_MODE_MANUAL_DONE = 42;
/** The singleton instance. */
private static PhoneInterfaceManager sInstance;
@@ -650,6 +655,57 @@
handleNullReturnEvent(msg, "setNetworkSelectionModeAutomatic");
break;
+ case CMD_PERFORM_NETWORK_SCAN:
+ request = (MainThreadRequest) msg.obj;
+ onCompleted = obtainMessage(EVENT_PERFORM_NETWORK_SCAN_DONE, request);
+ getPhoneFromRequest(request).getAvailableNetworks(onCompleted);
+ break;
+
+ case EVENT_PERFORM_NETWORK_SCAN_DONE:
+ ar = (AsyncResult) msg.obj;
+ request = (MainThreadRequest) ar.userObj;
+ CellNetworkScanResult cellScanResult;
+ if (ar.exception == null && ar.result != null) {
+ cellScanResult = new CellNetworkScanResult(
+ CellNetworkScanResult.STATUS_SUCCESS,
+ (List<OperatorInfo>) ar.result);
+ } else {
+ if (ar.result == null) {
+ loge("getCellNetworkScanResults: Empty response");
+ }
+ if (ar.exception != null) {
+ loge("getCellNetworkScanResults: Exception: " + ar.exception);
+ }
+ int errorCode = CellNetworkScanResult.STATUS_UNKNOWN_ERROR;
+ if (ar.exception instanceof CommandException) {
+ CommandException.Error error =
+ ((CommandException) (ar.exception)).getCommandError();
+ if (error == CommandException.Error.RADIO_NOT_AVAILABLE) {
+ errorCode = CellNetworkScanResult.STATUS_RADIO_NOT_AVAILABLE;
+ } else if (error == CommandException.Error.GENERIC_FAILURE) {
+ errorCode = CellNetworkScanResult.STATUS_RADIO_GENERIC_FAILURE;
+ }
+ }
+ cellScanResult = new CellNetworkScanResult(errorCode, null);
+ }
+ request.result = cellScanResult;
+ synchronized (request) {
+ request.notifyAll();
+ }
+ break;
+
+ case CMD_SET_NETWORK_SELECTION_MODE_MANUAL:
+ request = (MainThreadRequest) msg.obj;
+ OperatorInfo operator = (OperatorInfo) request.argument;
+ onCompleted = obtainMessage(EVENT_SET_NETWORK_SELECTION_MODE_MANUAL_DONE,
+ request);
+ getPhoneFromRequest(request).selectNetworkManually(operator, onCompleted);
+ break;
+
+ case EVENT_SET_NETWORK_SELECTION_MODE_MANUAL_DONE:
+ handleNullReturnEvent(msg, "setNetworkSelectionModeManual");
+ break;
+
case CMD_GET_MODEM_ACTIVITY_INFO:
request = (MainThreadRequest) msg.obj;
onCompleted = obtainMessage(EVENT_GET_MODEM_ACTIVITY_INFO_DONE, request);
@@ -951,7 +1007,12 @@
}
public boolean isOffhookForSubscriber(int subId) {
- return (getPhone(subId).getState() == PhoneConstants.State.OFFHOOK);
+ final Phone phone = getPhone(subId);
+ if (phone != null) {
+ return (phone.getState() == PhoneConstants.State.OFFHOOK);
+ } else {
+ return false;
+ }
}
public boolean isRinging() {
@@ -959,7 +1020,12 @@
}
public boolean isRingingForSubscriber(int subId) {
- return (getPhone(subId).getState() == PhoneConstants.State.RINGING);
+ final Phone phone = getPhone(subId);
+ if (phone != null) {
+ return (phone.getState() == PhoneConstants.State.RINGING);
+ } else {
+ return false;
+ }
}
public boolean isIdle() {
@@ -967,7 +1033,12 @@
}
public boolean isIdleForSubscriber(int subId) {
- return (getPhone(subId).getState() == PhoneConstants.State.IDLE);
+ final Phone phone = getPhone(subId);
+ if (phone != null) {
+ return (phone.getState() == PhoneConstants.State.IDLE);
+ } else {
+ return false;
+ }
}
public boolean isSimPinEnabled(String callingPackage) {
@@ -1128,7 +1199,10 @@
// No permission check needed here: this call is harmless, and it's
// needed for the ServiceState.requestStateUpdate() call (which is
// already intentionally exposed to 3rd parties.)
- getPhone(subId).updateServiceLocation();
+ final Phone phone = getPhone(subId);
+ if (phone != null) {
+ phone.updateServiceLocation();
+ }
}
public boolean isRadioOn() {
@@ -1136,7 +1210,12 @@
}
public boolean isRadioOnForSubscriber(int subId) {
- return getPhone(subId).getServiceState().getState() != ServiceState.STATE_POWER_OFF;
+ final Phone phone = getPhone(subId);
+ if (phone != null) {
+ return phone.getServiceState().getState() != ServiceState.STATE_POWER_OFF;
+ } else {
+ return false;
+ }
}
public void toggleRadioOnOff() {
@@ -1146,7 +1225,10 @@
public void toggleRadioOnOffForSubscriber(int subId) {
enforceModifyPermission();
- getPhone(subId).setRadioPower(!isRadioOnForSubscriber(subId));
+ final Phone phone = getPhone(subId);
+ if (phone != null) {
+ phone.setRadioPower(!isRadioOnForSubscriber(subId));
+ }
}
public boolean setRadio(boolean turnOn) {
@@ -1155,7 +1237,11 @@
public boolean setRadioForSubscriber(int subId, boolean turnOn) {
enforceModifyPermission();
- if ((getPhone(subId).getServiceState().getState() !=
+ final Phone phone = getPhone(subId);
+ if (phone == null) {
+ return false;
+ }
+ if ((phone.getServiceState().getState() !=
ServiceState.STATE_POWER_OFF) != turnOn) {
toggleRadioOnOffForSubscriber(subId);
}
@@ -1196,30 +1282,53 @@
public boolean setRadioPowerForSubscriber(int subId, boolean turnOn) {
enforceModifyPermission();
- getPhone(subId).setRadioPower(turnOn);
- return true;
+ final Phone phone = getPhone(subId);
+ if (phone != null) {
+ phone.setRadioPower(turnOn);
+ return true;
+ } else {
+ return false;
+ }
}
// FIXME: subId version needed
+ @Override
public boolean enableDataConnectivity() {
enforceModifyPermission();
int subId = mSubscriptionController.getDefaultDataSubId();
- getPhone(subId).setDataEnabled(true);
- return true;
+ final Phone phone = getPhone(subId);
+ if (phone != null) {
+ phone.setDataEnabled(true);
+ return true;
+ } else {
+ return false;
+ }
}
// FIXME: subId version needed
+ @Override
public boolean disableDataConnectivity() {
enforceModifyPermission();
int subId = mSubscriptionController.getDefaultDataSubId();
- getPhone(subId).setDataEnabled(false);
- return true;
+ final Phone phone = getPhone(subId);
+ if (phone != null) {
+ phone.setDataEnabled(false);
+ return true;
+ } else {
+ return false;
+ }
}
// FIXME: subId version needed
+ @Override
public boolean isDataConnectivityPossible() {
int subId = mSubscriptionController.getDefaultDataSubId();
- return getPhone(subId).isDataConnectivityPossible();
+ final Phone phone = getPhone(subId);
+ if (phone != null) {
+ return phone.isDataConnectivityPossible();
+ } else {
+ return false;
+ }
}
public boolean handlePinMmi(String dialString) {
@@ -1228,6 +1337,9 @@
public boolean handlePinMmiForSubscriber(int subId, String dialString) {
enforceModifyPermission();
+ if (!SubscriptionManager.isValidSubscriptionId(subId)) {
+ return false;
+ }
return (Boolean) sendRequest(CMD_HANDLE_PIN_MMI, dialString, subId);
}
@@ -1239,14 +1351,24 @@
return DefaultPhoneNotifier.convertCallState(getPhone(subId).getState());
}
+ @Override
public int getDataState() {
Phone phone = getPhone(mSubscriptionController.getDefaultDataSubId());
- return DefaultPhoneNotifier.convertDataState(phone.getDataConnectionState());
+ if (phone != null) {
+ return DefaultPhoneNotifier.convertDataState(phone.getDataConnectionState());
+ } else {
+ return DefaultPhoneNotifier.convertDataState(PhoneConstants.DataState.DISCONNECTED);
+ }
}
+ @Override
public int getDataActivity() {
Phone phone = getPhone(mSubscriptionController.getDefaultDataSubId());
- return DefaultPhoneNotifier.convertDataActivityState(phone.getDataActivityState());
+ if (phone != null) {
+ return DefaultPhoneNotifier.convertDataActivityState(phone.getDataActivityState());
+ } else {
+ return TelephonyManager.DATA_ACTIVITY_NONE;
+ }
}
@Override
@@ -1264,6 +1386,9 @@
if (DBG_LOC) log("getCellLocation: is active user");
Bundle data = new Bundle();
Phone phone = getPhone(mSubscriptionController.getDefaultDataSubId());
+ if (phone == null) {
+ return null;
+ }
phone.getCellLocation().fillInNotifierBundle(data);
return data;
} else {
@@ -1291,10 +1416,14 @@
enableLocationUpdatesForSubscriber(getDefaultSubscription());
}
+ @Override
public void enableLocationUpdatesForSubscriber(int subId) {
mApp.enforceCallingOrSelfPermission(
android.Manifest.permission.CONTROL_LOCATION_UPDATES, null);
- getPhone(subId).enableLocationUpdates();
+ final Phone phone = getPhone(subId);
+ if (phone != null) {
+ phone.enableLocationUpdates();
+ }
}
@Override
@@ -1302,10 +1431,14 @@
disableLocationUpdatesForSubscriber(getDefaultSubscription());
}
+ @Override
public void disableLocationUpdatesForSubscriber(int subId) {
mApp.enforceCallingOrSelfPermission(
android.Manifest.permission.CONTROL_LOCATION_UPDATES, null);
- getPhone(subId).disableLocationUpdates();
+ final Phone phone = getPhone(subId);
+ if (phone != null) {
+ phone.disableLocationUpdates();
+ }
}
@Override
@@ -1496,8 +1629,14 @@
return getActivePhoneTypeForSubscriber(getDefaultSubscription());
}
+ @Override
public int getActivePhoneTypeForSubscriber(int subId) {
- return getPhone(subId).getPhoneType();
+ final Phone phone = getPhone(subId);
+ if (phone == null) {
+ return PhoneConstants.PHONE_TYPE_NONE;
+ } else {
+ return getPhone(subId).getPhoneType();
+ }
}
/**
@@ -1505,11 +1644,16 @@
*/
public int getCdmaEriIconIndex() {
return getCdmaEriIconIndexForSubscriber(getDefaultSubscription());
-
}
+ @Override
public int getCdmaEriIconIndexForSubscriber(int subId) {
- return getPhone(subId).getCdmaEriIconIndex();
+ final Phone phone = getPhone(subId);
+ if (phone != null) {
+ return phone.getCdmaEriIconIndex();
+ } else {
+ return -1;
+ }
}
/**
@@ -1521,8 +1665,14 @@
return getCdmaEriIconModeForSubscriber(getDefaultSubscription());
}
+ @Override
public int getCdmaEriIconModeForSubscriber(int subId) {
- return getPhone(subId).getCdmaEriIconMode();
+ final Phone phone = getPhone(subId);
+ if (phone != null) {
+ return phone.getCdmaEriIconMode();
+ } else {
+ return -1;
+ }
}
/**
@@ -1532,17 +1682,25 @@
return getCdmaEriTextForSubscriber(getDefaultSubscription());
}
+ @Override
public String getCdmaEriTextForSubscriber(int subId) {
- return getPhone(subId).getCdmaEriText();
+ final Phone phone = getPhone(subId);
+ if (phone != null) {
+ return phone.getCdmaEriText();
+ } else {
+ return null;
+ }
}
/**
* Returns the CDMA MDN.
*/
+ @Override
public String getCdmaMdn(int subId) {
enforceModifyPermissionOrCarrierPrivilege();
- if (mPhone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) {
- return getPhone(subId).getLine1Number();
+ final Phone phone = getPhone(subId);
+ if (mPhone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA && phone != null) {
+ return phone.getLine1Number();
} else {
return null;
}
@@ -1551,10 +1709,12 @@
/**
* Returns the CDMA MIN.
*/
+ @Override
public String getCdmaMin(int subId) {
enforceModifyPermissionOrCarrierPrivilege();
- if (mPhone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) {
- return getPhone(subId).getCdmaMin();
+ final Phone phone = getPhone(subId);
+ if (phone != null && phone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) {
+ return phone.getCdmaMin();
} else {
return null;
}
@@ -1588,8 +1748,14 @@
/**
* Returns the unread count of voicemails for a subId
*/
+ @Override
public int getVoiceMessageCountForSubscriber( int subId) {
- return getPhone(subId).getVoiceMessageCount();
+ final Phone phone = getPhone(subId);
+ if (phone != null) {
+ return phone.getVoiceMessageCount();
+ } else {
+ return 0;
+ }
}
/**
@@ -1607,7 +1773,12 @@
*/
@Override
public int getNetworkTypeForSubscriber(int subId) {
- return getPhone(subId).getServiceState().getDataNetworkType();
+ final Phone phone = getPhone(subId);
+ if (phone != null) {
+ return phone.getServiceState().getDataNetworkType();
+ } else {
+ return TelephonyManager.NETWORK_TYPE_UNKNOWN;
+ }
}
/**
@@ -1623,7 +1794,12 @@
*/
@Override
public int getDataNetworkTypeForSubscriber(int subId) {
- return getPhone(subId).getServiceState().getDataNetworkType();
+ final Phone phone = getPhone(subId);
+ if (phone != null) {
+ return phone.getServiceState().getDataNetworkType();
+ } else {
+ return TelephonyManager.NETWORK_TYPE_UNKNOWN;
+ }
}
/**
@@ -1639,7 +1815,12 @@
*/
@Override
public int getVoiceNetworkTypeForSubscriber(int subId) {
- return getPhone(subId).getServiceState().getVoiceNetworkType();
+ final Phone phone = getPhone(subId);
+ if (phone != null) {
+ return phone.getServiceState().getVoiceNetworkType();
+ } else {
+ return TelephonyManager.NETWORK_TYPE_UNKNOWN;
+ }
}
/**
@@ -1653,10 +1834,12 @@
/**
* @return true if a ICC card is present for a slotId
*/
+ @Override
public boolean hasIccCardUsingSlotId(int slotId) {
int subId[] = mSubscriptionController.getSubIdUsingSlotId(slotId);
- if (subId != null) {
- return getPhone(subId[0]).getIccCard().hasIccCard();
+ final Phone phone = getPhone(subId[0]);
+ if (subId != null && phone != null) {
+ return phone.getIccCard().hasIccCard();
} else {
return false;
}
@@ -1674,8 +1857,14 @@
return getLteOnCdmaModeForSubscriber(getDefaultSubscription());
}
+ @Override
public int getLteOnCdmaModeForSubscriber(int subId) {
- return getPhone(subId).getLteOnCdmaMode();
+ final Phone phone = getPhone(subId);
+ if (phone == null) {
+ return PhoneConstants.LTE_ON_CDMA_UNKNOWN;
+ } else {
+ return phone.getLteOnCdmaMode();
+ }
}
public void setPhone(Phone phone) {
@@ -1941,6 +2130,28 @@
}
/**
+ * Set the network selection mode to manual with the selected carrier.
+ */
+ @Override
+ public boolean setNetworkSelectionModeManual(int subId, OperatorInfo operator) {
+ enforceModifyPermissionOrCarrierPrivilege();
+ if (DBG) log("setNetworkSelectionModeManual: subId:" + subId + " operator:" + operator);
+ return (Boolean) sendRequest(CMD_SET_NETWORK_SELECTION_MODE_MANUAL, operator, subId);
+ }
+
+ /**
+ * Scans for available networks.
+ */
+ @Override
+ public CellNetworkScanResult getCellNetworkScanResults(int subId) {
+ enforceModifyPermissionOrCarrierPrivilege();
+ if (DBG) log("getCellNetworkScanResults: subId " + subId);
+ CellNetworkScanResult result = (CellNetworkScanResult) sendRequest(
+ CMD_PERFORM_NETWORK_SCAN, null, subId);
+ return result;
+ }
+
+ /**
* Get the calculated preferred network type.
* Used for debugging incorrect network type.
*
@@ -2120,7 +2331,8 @@
}
private String getIccId(int subId) {
- UiccCard card = getPhone(subId).getUiccCard();
+ final Phone phone = getPhone(subId);
+ UiccCard card = phone == null ? null : phone.getUiccCard();
if (card == null) {
loge("getIccId: No UICC");
return null;
@@ -2139,7 +2351,11 @@
enforceCarrierPrivilege();
final String iccId = getIccId(subId);
- final String subscriberId = getPhone(subId).getSubscriberId();
+ final Phone phone = getPhone(subId);
+ if (phone == null) {
+ return false;
+ }
+ final String subscriberId = phone.getSubscriberId();
if (DBG_MERGE) {
Slog.d(LOG_TAG, "Setting line number for ICC=" + iccId + ", subscriberId="
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);
}
/**