Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 597f2b70 authored by johnwang's avatar johnwang
Browse files

Add ro.telephony.disable-call check in dialing.

When ro.telephony.disable-call is set to true the phone disable actual calls. It provides a way to test in user-debug builds for stability runs. See bug 2031157.

	modified:   java/com/android/internal/telephony/TelephonyProperties.java
	modified:   java/com/android/internal/telephony/cdma/CdmaCallTracker.java
	modified:   java/com/android/internal/telephony/gsm/GsmCallTracker.java

	modified:   java/com/android/internal/telephony/TelephonyProperties.java
	modified:   java/com/android/internal/telephony/cdma/CdmaCallTracker.java
	modified:   java/com/android/internal/telephony/gsm/GsmCallTracker.java
parent 614cf0b7
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -115,4 +115,9 @@ public interface TelephonyProperties
     */
    static final String PROPERTY_OTASP_NUM_SCHEMA = "ro.cdma.otaspnumschema";

    /**
     * Disable all calls including Emergency call when it set to true.
     */
    static final String PROPERTY_DISABLE_CALL = "ro.telephony.disable-call";

}
+7 −4
Original line number Diff line number Diff line
@@ -321,10 +321,13 @@ public final class CdmaCallTracker extends CallTracker {
    canDial() {
        boolean ret;
        int serviceState = phone.getServiceState().getState();
        String disableCall = SystemProperties.get(
                TelephonyProperties.PROPERTY_DISABLE_CALL, "false");

        ret = (serviceState != ServiceState.STATE_POWER_OFF) &&
                pendingMO == null
        ret = (serviceState != ServiceState.STATE_POWER_OFF)
                && pendingMO == null
                && !ringingCall.isRinging()
                && !disableCall.equals("true")
                && (!foregroundCall.getState().isAlive()
                    || (foregroundCall.getState() == CdmaCall.State.ACTIVE)
                    || !backgroundCall.getState().isAlive());
+6 −3
Original line number Diff line number Diff line
@@ -294,10 +294,13 @@ public final class GsmCallTracker extends CallTracker {
    canDial() {
        boolean ret;
        int serviceState = phone.getServiceState().getState();
        String disableCall = SystemProperties.get(
                TelephonyProperties.PROPERTY_DISABLE_CALL, "false");

        ret = (serviceState != ServiceState.STATE_POWER_OFF) &&
                pendingMO == null
        ret = (serviceState != ServiceState.STATE_POWER_OFF)
                && pendingMO == null
                && !ringingCall.isRinging()
                && !disableCall.equals("true")
                && (!foregroundCall.getState().isAlive()
                    || !backgroundCall.getState().isAlive());