Merge "DO NOT MERGE Double-check SIP state before issuing a swap-calls command." into mnc-dr-dev
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 6eaf051..d71025d 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -260,7 +260,7 @@
<!-- Toast in Call settings when asked to launch settings for a secondary user -->
<string name="call_settings_primary_user_only">Call settings can only be changed by the primary user.</string>
<!-- Title of the "Call settings" settings screen, with a text label identifying which SIM the settings are for. -->
- <string name="call_settings_with_label">Call settings (<xliff:g id="subscriptionlabel" example="Verizon">%s</xliff:g>)</string>
+ <string name="call_settings_with_label">Settings (<xliff:g id="subscriptionlabel" example="Mock Carrier">%s</xliff:g>)</string>
<!-- Title of the alert dialog displayed if an error occurs while updating Call settings -->
<string name="error_updating_title">Call settings error</string>
<!-- Toast in Call settings dialog while settings are being read -->
diff --git a/sip/src/com/android/services/telephony/sip/SipBroadcastReceiver.java b/sip/src/com/android/services/telephony/sip/SipBroadcastReceiver.java
index 0b701ce..545854d 100644
--- a/sip/src/com/android/services/telephony/sip/SipBroadcastReceiver.java
+++ b/sip/src/com/android/services/telephony/sip/SipBroadcastReceiver.java
@@ -58,7 +58,13 @@
private void takeCall(Context context, Intent intent) {
if (VERBOSE) log("takeCall, intent: " + intent);
- PhoneAccountHandle accountHandle = intent.getParcelableExtra(SipUtil.EXTRA_PHONE_ACCOUNT);
+ PhoneAccountHandle accountHandle = null;
+ try {
+ accountHandle = intent.getParcelableExtra(SipUtil.EXTRA_PHONE_ACCOUNT);
+ } catch (ClassCastException e) {
+ log("takeCall, Bad account handle detected. Bailing!");
+ return;
+ }
if (accountHandle != null) {
Bundle extras = new Bundle();
extras.putParcelable(SipUtil.EXTRA_INCOMING_CALL_INTENT, intent);