Merge change 20627
* changes: Add ro.telephony.disable-call check in dialing.
This commit is contained in:
@@ -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";
|
||||
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user