Telephony: Handle RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE
Anshul Jain [Tue, 22 Nov 2011 20:23:14 +0000 (12:23 -0800)]
Handle RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE as a way to exit from
Emergency Callback Mode

Bug: 10749583
Change-Id: Ia572ac5a4d5ab38166453dcdf26fb0a667bba74e

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

index 73ca673..d50fba6 100644 (file)
@@ -205,6 +205,8 @@ public class CDMAPhone extends PhoneBase {
         mCi.setOnSuppServiceNotification(this, EVENT_SSN, null);
         mSST.registerForNetworkAttached(this, EVENT_REGISTERED_TO_NETWORK, null);
         mCi.setEmergencyCallbackMode(this, EVENT_EMERGENCY_CALLBACK_MODE_ENTER, null);
+        mCi.registerForExitEmergencyCallbackMode(this, EVENT_EXIT_EMERGENCY_CALLBACK_RESPONSE,
+                null);
 
         PowerManager pm
             = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
@@ -259,6 +261,7 @@ public class CDMAPhone extends PhoneBase {
             mCi.unregisterForOn(this); //EVENT_RADIO_ON
             mSST.unregisterForNetworkAttached(this); //EVENT_REGISTERED_TO_NETWORK
             mCi.unSetOnSuppServiceNotification(this);
+            mCi.unregisterForExitEmergencyCallbackMode(this);
             removeCallbacks(mExitEcmRunnable);
 
             mPendingMmis.clear();