Loading src/java/com/android/internal/telephony/CallStateException.java +1 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ public class CallStateException extends Exception public static final int ERROR_INVALID = -1; public static final int ERROR_DISCONNECTED = 1; public static final int ERROR_POWER_OFF = 2; public CallStateException() Loading src/java/com/android/internal/telephony/GsmCdmaPhone.java +8 −0 Original line number Diff line number Diff line Loading @@ -1121,6 +1121,14 @@ public class GsmCdmaPhone extends Phone { && mSST.mSS.getDataRegState() != ServiceState.STATE_IN_SERVICE && !isEmergency) { throw new CallStateException("cannot dial in current state"); } // Check non-emergency voice CS call - shouldn't dial when POWER_OFF if (mSST != null && mSST.mSS.getState() == ServiceState.STATE_POWER_OFF /* CS POWER_OFF */ && !VideoProfile.isVideo(videoState) /* voice call */ && !isEmergency /* non-emergency call */) { throw new CallStateException( CallStateException.ERROR_POWER_OFF, "cannot dial voice call in airplane mode"); } if (DBG) logd("Trying (non-IMS) CS call"); if (isPhoneTypeGsm()) { Loading Loading
src/java/com/android/internal/telephony/CallStateException.java +1 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ public class CallStateException extends Exception public static final int ERROR_INVALID = -1; public static final int ERROR_DISCONNECTED = 1; public static final int ERROR_POWER_OFF = 2; public CallStateException() Loading
src/java/com/android/internal/telephony/GsmCdmaPhone.java +8 −0 Original line number Diff line number Diff line Loading @@ -1121,6 +1121,14 @@ public class GsmCdmaPhone extends Phone { && mSST.mSS.getDataRegState() != ServiceState.STATE_IN_SERVICE && !isEmergency) { throw new CallStateException("cannot dial in current state"); } // Check non-emergency voice CS call - shouldn't dial when POWER_OFF if (mSST != null && mSST.mSS.getState() == ServiceState.STATE_POWER_OFF /* CS POWER_OFF */ && !VideoProfile.isVideo(videoState) /* voice call */ && !isEmergency /* non-emergency call */) { throw new CallStateException( CallStateException.ERROR_POWER_OFF, "cannot dial voice call in airplane mode"); } if (DBG) logd("Trying (non-IMS) CS call"); if (isPhoneTypeGsm()) { Loading