Loading src/java/com/android/internal/telephony/GsmCdmaPhone.java +1 −5 Original line number Original line Diff line number Diff line Loading @@ -124,9 +124,6 @@ public class GsmCdmaPhone extends Phone { // mEriFileLoadedRegistrants are informed after the ERI text has been loaded // mEriFileLoadedRegistrants are informed after the ERI text has been loaded private final RegistrantList mEriFileLoadedRegistrants = new RegistrantList(); private final RegistrantList mEriFileLoadedRegistrants = new RegistrantList(); // mEcmExitRespRegistrant is informed after the phone has been exited // mEcmExitRespRegistrant is informed after the phone has been exited //the emergency callback mode //keep track of if phone is in emergency callback mode private boolean mIsPhoneInEcmState; private Registrant mEcmExitRespRegistrant; private Registrant mEcmExitRespRegistrant; private String mEsn; private String mEsn; private String mMeid; private String mMeid; Loading Loading @@ -281,8 +278,7 @@ public class GsmCdmaPhone extends Phone { } else { } else { mCdmaSubscriptionSource = CdmaSubscriptionSourceManager.SUBSCRIPTION_SOURCE_UNKNOWN; mCdmaSubscriptionSource = CdmaSubscriptionSourceManager.SUBSCRIPTION_SOURCE_UNKNOWN; // This is needed to handle phone process crashes // This is needed to handle phone process crashes String inEcm = SystemProperties.get(TelephonyProperties.PROPERTY_INECM_MODE, "false"); mIsPhoneInEcmState = getInEcmMode(); mIsPhoneInEcmState = inEcm.equals("true"); if (mIsPhoneInEcmState) { if (mIsPhoneInEcmState) { // Send a message which will invoke handleExitEmergencyCallbackMode // Send a message which will invoke handleExitEmergencyCallbackMode mCi.exitEmergencyCallbackMode( mCi.exitEmergencyCallbackMode( Loading src/java/com/android/internal/telephony/Phone.java +13 −1 Original line number Original line Diff line number Diff line Loading @@ -227,6 +227,10 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { private int mCallRingDelay; private int mCallRingDelay; private boolean mIsVoiceCapable = true; private boolean mIsVoiceCapable = true; // Keep track of whether or not the phone is in Emergency Callback Mode for Phone and // subclasses protected boolean mIsPhoneInEcmState = false; // Variable to cache the video capability. When RAT changes, we lose this info and are unable // Variable to cache the video capability. When RAT changes, we lose this info and are unable // to recover from the state. We cache it and notify listeners when they register. // to recover from the state. We cache it and notify listeners when they register. protected boolean mIsVideoCapable = false; protected boolean mIsVideoCapable = false; Loading Loading @@ -2040,13 +2044,21 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { return false; return false; } } // This property is used to handle phone process crashes, and is the same for CDMA and IMS // phones protected static boolean getInEcmMode() { return SystemProperties.getBoolean(TelephonyProperties.PROPERTY_INECM_MODE, false); } /** /** * @return {@code true} if we are in emergency call back mode. This is a period where the phone * @return {@code true} if we are in emergency call back mode. This is a period where the phone * should be using as little power as possible and be ready to receive an incoming call from the * should be using as little power as possible and be ready to receive an incoming call from the * emergency operator. * emergency operator. * * This method is overridden for GSM phones to return false always */ */ public boolean isInEcm() { public boolean isInEcm() { return false; return mIsPhoneInEcmState; } } private static int getVideoState(Call call) { private static int getVideoState(Call call) { Loading src/java/com/android/internal/telephony/imsphone/ImsPhone.java +1 −8 Original line number Original line Diff line number Diff line Loading @@ -136,7 +136,6 @@ public class ImsPhone extends ImsPhoneBase { private String mLastDialString; private String mLastDialString; private WakeLock mWakeLock; private WakeLock mWakeLock; private boolean mIsPhoneInEcmState; // mEcmExitRespRegistrant is informed after the phone has been exited the emergency // mEcmExitRespRegistrant is informed after the phone has been exited the emergency // callback mode keep track of if phone is in emergency callback mode // callback mode keep track of if phone is in emergency callback mode Loading Loading @@ -201,8 +200,7 @@ public class ImsPhone extends ImsPhoneBase { // This is needed to handle phone process crashes // This is needed to handle phone process crashes // Same property is used for both CDMA & IMS phone. // Same property is used for both CDMA & IMS phone. mIsPhoneInEcmState = SystemProperties.getBoolean( mIsPhoneInEcmState = getInEcmMode(); TelephonyProperties.PROPERTY_INECM_MODE, false); PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE); PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE); mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, LOG_TAG); mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, LOG_TAG); Loading Loading @@ -1255,11 +1253,6 @@ public class ImsPhone extends ImsPhoneBase { return mCT.isInEmergencyCall(); return mCT.isInEmergencyCall(); } } @Override public boolean isInEcm() { return mIsPhoneInEcmState; } private void sendEmergencyCallbackModeChange() { private void sendEmergencyCallbackModeChange() { // Send an Intent // Send an Intent Intent intent = new Intent(TelephonyIntents.ACTION_EMERGENCY_CALLBACK_MODE_CHANGED); Intent intent = new Intent(TelephonyIntents.ACTION_EMERGENCY_CALLBACK_MODE_CHANGED); Loading Loading
src/java/com/android/internal/telephony/GsmCdmaPhone.java +1 −5 Original line number Original line Diff line number Diff line Loading @@ -124,9 +124,6 @@ public class GsmCdmaPhone extends Phone { // mEriFileLoadedRegistrants are informed after the ERI text has been loaded // mEriFileLoadedRegistrants are informed after the ERI text has been loaded private final RegistrantList mEriFileLoadedRegistrants = new RegistrantList(); private final RegistrantList mEriFileLoadedRegistrants = new RegistrantList(); // mEcmExitRespRegistrant is informed after the phone has been exited // mEcmExitRespRegistrant is informed after the phone has been exited //the emergency callback mode //keep track of if phone is in emergency callback mode private boolean mIsPhoneInEcmState; private Registrant mEcmExitRespRegistrant; private Registrant mEcmExitRespRegistrant; private String mEsn; private String mEsn; private String mMeid; private String mMeid; Loading Loading @@ -281,8 +278,7 @@ public class GsmCdmaPhone extends Phone { } else { } else { mCdmaSubscriptionSource = CdmaSubscriptionSourceManager.SUBSCRIPTION_SOURCE_UNKNOWN; mCdmaSubscriptionSource = CdmaSubscriptionSourceManager.SUBSCRIPTION_SOURCE_UNKNOWN; // This is needed to handle phone process crashes // This is needed to handle phone process crashes String inEcm = SystemProperties.get(TelephonyProperties.PROPERTY_INECM_MODE, "false"); mIsPhoneInEcmState = getInEcmMode(); mIsPhoneInEcmState = inEcm.equals("true"); if (mIsPhoneInEcmState) { if (mIsPhoneInEcmState) { // Send a message which will invoke handleExitEmergencyCallbackMode // Send a message which will invoke handleExitEmergencyCallbackMode mCi.exitEmergencyCallbackMode( mCi.exitEmergencyCallbackMode( Loading
src/java/com/android/internal/telephony/Phone.java +13 −1 Original line number Original line Diff line number Diff line Loading @@ -227,6 +227,10 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { private int mCallRingDelay; private int mCallRingDelay; private boolean mIsVoiceCapable = true; private boolean mIsVoiceCapable = true; // Keep track of whether or not the phone is in Emergency Callback Mode for Phone and // subclasses protected boolean mIsPhoneInEcmState = false; // Variable to cache the video capability. When RAT changes, we lose this info and are unable // Variable to cache the video capability. When RAT changes, we lose this info and are unable // to recover from the state. We cache it and notify listeners when they register. // to recover from the state. We cache it and notify listeners when they register. protected boolean mIsVideoCapable = false; protected boolean mIsVideoCapable = false; Loading Loading @@ -2040,13 +2044,21 @@ public abstract class Phone extends Handler implements PhoneInternalInterface { return false; return false; } } // This property is used to handle phone process crashes, and is the same for CDMA and IMS // phones protected static boolean getInEcmMode() { return SystemProperties.getBoolean(TelephonyProperties.PROPERTY_INECM_MODE, false); } /** /** * @return {@code true} if we are in emergency call back mode. This is a period where the phone * @return {@code true} if we are in emergency call back mode. This is a period where the phone * should be using as little power as possible and be ready to receive an incoming call from the * should be using as little power as possible and be ready to receive an incoming call from the * emergency operator. * emergency operator. * * This method is overridden for GSM phones to return false always */ */ public boolean isInEcm() { public boolean isInEcm() { return false; return mIsPhoneInEcmState; } } private static int getVideoState(Call call) { private static int getVideoState(Call call) { Loading
src/java/com/android/internal/telephony/imsphone/ImsPhone.java +1 −8 Original line number Original line Diff line number Diff line Loading @@ -136,7 +136,6 @@ public class ImsPhone extends ImsPhoneBase { private String mLastDialString; private String mLastDialString; private WakeLock mWakeLock; private WakeLock mWakeLock; private boolean mIsPhoneInEcmState; // mEcmExitRespRegistrant is informed after the phone has been exited the emergency // mEcmExitRespRegistrant is informed after the phone has been exited the emergency // callback mode keep track of if phone is in emergency callback mode // callback mode keep track of if phone is in emergency callback mode Loading Loading @@ -201,8 +200,7 @@ public class ImsPhone extends ImsPhoneBase { // This is needed to handle phone process crashes // This is needed to handle phone process crashes // Same property is used for both CDMA & IMS phone. // Same property is used for both CDMA & IMS phone. mIsPhoneInEcmState = SystemProperties.getBoolean( mIsPhoneInEcmState = getInEcmMode(); TelephonyProperties.PROPERTY_INECM_MODE, false); PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE); PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE); mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, LOG_TAG); mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, LOG_TAG); Loading Loading @@ -1255,11 +1253,6 @@ public class ImsPhone extends ImsPhoneBase { return mCT.isInEmergencyCall(); return mCT.isInEmergencyCall(); } } @Override public boolean isInEcm() { return mIsPhoneInEcmState; } private void sendEmergencyCallbackModeChange() { private void sendEmergencyCallbackModeChange() { // Send an Intent // Send an Intent Intent intent = new Intent(TelephonyIntents.ACTION_EMERGENCY_CALLBACK_MODE_CHANGED); Intent intent = new Intent(TelephonyIntents.ACTION_EMERGENCY_CALLBACK_MODE_CHANGED); Loading