OSDN Git Service

Exit Emergency Callback Mode if phone process crashes/restarts
authorLibin Tang <Libin.Tang@motorola.com>
Tue, 1 Sep 2009 16:40:16 +0000 (11:40 -0500)
committerWink Saville <wink@google.com>
Thu, 3 Sep 2009 16:29:16 +0000 (09:29 -0700)
If the phone process crashes while the phone is in ECM, there
is currently no way to get out of ECM without rebooting the
phone.  This change forces the phone out of ECM if the phone
process restarts.

Change-Id: Ie4eb103fdc151ca20aa0b29dec43e60ad819e5b7

telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java

index 958e96d..647b991 100755 (executable)
@@ -179,6 +179,10 @@ public class CDMAPhone extends PhoneBase {
         // This is needed to handle phone process crashes
         String inEcm=SystemProperties.get(TelephonyProperties.PROPERTY_INECM_MODE, "false");
         mIsPhoneInEcmState = inEcm.equals("true");
+        if (mIsPhoneInEcmState) {
+            // Send a message which will invoke handleExitEmergencyCallbackMode
+            mCM.exitEmergencyCallbackMode(obtainMessage(EVENT_EXIT_EMERGENCY_CALLBACK_RESPONSE));
+        }
 
         // get the string that specifies the carrier OTA Sp number
         mCarrierOtaSpNumSchema = SystemProperties.get(
@@ -1011,7 +1015,6 @@ public class CDMAPhone extends PhoneBase {
                     Log.d(LOG_TAG, "ERI read, notify registrants");
                     mEriFileLoadedRegistrants.notifyRegistrants();
                 }
-                setSystemProperty(TelephonyProperties.PROPERTY_INECM_MODE,"false");
             }
             break;