Merge change 20627

* changes:
  Add ro.telephony.disable-call check in dialing.
This commit is contained in:
Android (Google) Code Review
2009-08-10 17:13:06 -07:00
3 changed files with 18 additions and 7 deletions

View File

@@ -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";
}

View File

@@ -321,13 +321,16 @@ 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());
|| (foregroundCall.getState() == CdmaCall.State.ACTIVE)
|| !backgroundCall.getState().isAlive());
return ret;
}

View File

@@ -294,12 +294,15 @@ 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());
|| !backgroundCall.getState().isAlive());
return ret;
}