MSIM: Add MSIM support to ECBM implementation
Make use of phoneid details in ECBM intent to display ECBM dialog
properly for appropriate phone object.
Change-Id: I7af9f4821b3590dbb080d5ab5e591c3a38e5a389
diff --git a/src/com/android/phone/EmergencyCallbackModeExitDialog.java b/src/com/android/phone/EmergencyCallbackModeExitDialog.java
index 7f4bd1b..b423e14 100644
--- a/src/com/android/phone/EmergencyCallbackModeExitDialog.java
+++ b/src/com/android/phone/EmergencyCallbackModeExitDialog.java
@@ -78,11 +78,12 @@
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
+ mPhone = PhoneGlobals.getInstance().getPhoneInEcm();
// Check if phone is in Emergency Callback Mode. If not, exit.
final boolean isInEcm = Boolean.parseBoolean(
SystemProperties.get(TelephonyProperties.PROPERTY_INECM_MODE));
- Log.i(TAG, "ECMModeExitDialog launched - isInEcm: " + isInEcm);
- if (!isInEcm) {
+ Log.i(TAG, "ECMModeExitDialog launched - isInEcm: " + isInEcm + " phone:" + mPhone);
+ if (mPhone == null || !isInEcm) {
finish();
return;
}
@@ -96,7 +97,6 @@
waitForConnectionCompleteThread.start();
// Register ECM timer reset notfication
- mPhone = PhoneGlobals.getPhone();
mPhone.registerForEcmTimerReset(mTimerResetHandler, ECM_TIMER_RESET, null);
// Register receiver for intent closing the dialog