Loading src/java/com/android/internal/telephony/GsmCdmaPhone.java +17 −3 Original line number Diff line number Diff line Loading @@ -167,6 +167,9 @@ public class GsmCdmaPhone extends Phone { // string to define how the carrier specifies its own ota sp number private String mCarrierOtaSpNumSchema; private Boolean mUiccApplicationsEnabled = null; // keeps track of when we have triggered an emergency call due to the ril.test.emergencynumber // param being set and we should generate a simulated exit from the modem upon exit of ECbM. private boolean mIsTestingEmergencyCallbackMode = false; @VisibleForTesting public static int ENABLE_UICC_APPS_MAX_RETRIES = 3; private static final int REAPPLY_UICC_APPS_SETTING_RETRY_TIME_GAP_IN_MS = 5000; Loading Loading @@ -1408,6 +1411,7 @@ public class GsmCdmaPhone extends Phone { if (isDialedNumberSwapped && isEmergency) { // Triggers ECM when CS call ends only for test emergency calls using // ril.test.emergencynumber. mIsTestingEmergencyCallbackMode = true; mCi.testingEmergencyCall(); } if (isPhoneTypeGsm()) { Loading Loading @@ -3469,7 +3473,15 @@ public class GsmCdmaPhone extends Phone { if (mWakeLock.isHeld()) { mWakeLock.release(); } mCi.exitEmergencyCallbackMode(null); Message msg = null; if (mIsTestingEmergencyCallbackMode) { // prevent duplicate exit messages from happening due to this message being handled // as well as an UNSOL when the modem exits ECbM. Instead, only register for this // message callback when this is a test and we will not be receiving the UNSOL from // the modem. msg = obtainMessage(EVENT_EXIT_EMERGENCY_CALLBACK_RESPONSE); } mCi.exitEmergencyCallbackMode(msg); } } Loading Loading @@ -3509,8 +3521,9 @@ public class GsmCdmaPhone extends Phone { if (mEcmExitRespRegistrant != null) { mEcmExitRespRegistrant.notifyRegistrant(ar); } // if exiting ecm success if (ar.exception == null) { // if exiting is successful or we are testing and the modem responded with an error upon // exit, which may occur in some IRadio implementations. if (ar.exception == null || mIsTestingEmergencyCallbackMode) { if (isInEcm()) { setIsInEcm(false); } Loading @@ -3526,6 +3539,7 @@ public class GsmCdmaPhone extends Phone { mDataEnabledSettings.setInternalDataEnabled(true); notifyEmergencyCallRegistrants(false); } mIsTestingEmergencyCallbackMode = false; } //CDMA Loading src/java/com/android/internal/telephony/RIL.java +2 −1 Original line number Diff line number Diff line Loading @@ -230,7 +230,8 @@ public class RIL extends BaseCommands implements CommandsInterface { Object[] mLastNITZTimeInfo; // When we are testing emergency calls // When we are testing emergency calls using ril.test.emergencynumber, this will trigger test // ECbM when the call is ended. @UnsupportedAppUsage AtomicBoolean mTestingEmergencyCall = new AtomicBoolean(false); Loading Loading
src/java/com/android/internal/telephony/GsmCdmaPhone.java +17 −3 Original line number Diff line number Diff line Loading @@ -167,6 +167,9 @@ public class GsmCdmaPhone extends Phone { // string to define how the carrier specifies its own ota sp number private String mCarrierOtaSpNumSchema; private Boolean mUiccApplicationsEnabled = null; // keeps track of when we have triggered an emergency call due to the ril.test.emergencynumber // param being set and we should generate a simulated exit from the modem upon exit of ECbM. private boolean mIsTestingEmergencyCallbackMode = false; @VisibleForTesting public static int ENABLE_UICC_APPS_MAX_RETRIES = 3; private static final int REAPPLY_UICC_APPS_SETTING_RETRY_TIME_GAP_IN_MS = 5000; Loading Loading @@ -1408,6 +1411,7 @@ public class GsmCdmaPhone extends Phone { if (isDialedNumberSwapped && isEmergency) { // Triggers ECM when CS call ends only for test emergency calls using // ril.test.emergencynumber. mIsTestingEmergencyCallbackMode = true; mCi.testingEmergencyCall(); } if (isPhoneTypeGsm()) { Loading Loading @@ -3469,7 +3473,15 @@ public class GsmCdmaPhone extends Phone { if (mWakeLock.isHeld()) { mWakeLock.release(); } mCi.exitEmergencyCallbackMode(null); Message msg = null; if (mIsTestingEmergencyCallbackMode) { // prevent duplicate exit messages from happening due to this message being handled // as well as an UNSOL when the modem exits ECbM. Instead, only register for this // message callback when this is a test and we will not be receiving the UNSOL from // the modem. msg = obtainMessage(EVENT_EXIT_EMERGENCY_CALLBACK_RESPONSE); } mCi.exitEmergencyCallbackMode(msg); } } Loading Loading @@ -3509,8 +3521,9 @@ public class GsmCdmaPhone extends Phone { if (mEcmExitRespRegistrant != null) { mEcmExitRespRegistrant.notifyRegistrant(ar); } // if exiting ecm success if (ar.exception == null) { // if exiting is successful or we are testing and the modem responded with an error upon // exit, which may occur in some IRadio implementations. if (ar.exception == null || mIsTestingEmergencyCallbackMode) { if (isInEcm()) { setIsInEcm(false); } Loading @@ -3526,6 +3539,7 @@ public class GsmCdmaPhone extends Phone { mDataEnabledSettings.setInternalDataEnabled(true); notifyEmergencyCallRegistrants(false); } mIsTestingEmergencyCallbackMode = false; } //CDMA Loading
src/java/com/android/internal/telephony/RIL.java +2 −1 Original line number Diff line number Diff line Loading @@ -230,7 +230,8 @@ public class RIL extends BaseCommands implements CommandsInterface { Object[] mLastNITZTimeInfo; // When we are testing emergency calls // When we are testing emergency calls using ril.test.emergencynumber, this will trigger test // ECbM when the call is ended. @UnsupportedAppUsage AtomicBoolean mTestingEmergencyCall = new AtomicBoolean(false); Loading