Merge change 6850 into donut

* changes:
  Extra parameters for sendBurstDtmf.
This commit is contained in:
Android (Google) Code Review
2009-07-10 17:11:01 -07:00
10 changed files with 26 additions and 11 deletions

View File

@@ -880,7 +880,7 @@ public interface CommandsInterface {
* ar.userObject contains the orignal value of result.obj
* ar.result is null on success and failure
*/
void sendBurstDtmf(String dtmfString, Message result);
void sendBurstDtmf(String dtmfString, int on, int off, Message result);
/**
* smscPDU is smsc address in PDU form GSM BCD format prefixed

View File

@@ -760,10 +760,12 @@ public interface Phone {
* back to caller.
*
* @param dtmfString is string representing the dialing digit(s) in the active call
* @param on the DTMF ON length in milliseconds, or 0 for default
* @param off the DTMF OFF length in milliseconds, or 0 for default
* @param onCompelte is the callback message when the action is processed by BP
*
*/
void sendBurstDtmf(String dtmfString, Message onComplete);
void sendBurstDtmf(String dtmfString, int on, int off, Message onComplete);
/**
* Sets the radio power on/off state (off is sometimes

View File

@@ -685,7 +685,7 @@ public abstract class PhoneBase implements Phone {
return null;
}
public void sendBurstDtmf(String dtmfString, Message onComplete) {
public void sendBurstDtmf(String dtmfString, int on, int off, Message onComplete) {
// This function should be overridden by the class CDMAPhone. Not implemented in GSMPhone.
Log.e(LOG_TAG, "Error! This function should never be executed, inactive CDMAPhone.");
}

View File

@@ -713,8 +713,8 @@ public class PhoneProxy extends Handler implements Phone {
return mActivePhone.getCdmaEriIconMode();
}
public void sendBurstDtmf(String dtmfString, Message onComplete){
mActivePhone.sendBurstDtmf(dtmfString,onComplete);
public void sendBurstDtmf(String dtmfString, int on, int off, Message onComplete){
mActivePhone.sendBurstDtmf(dtmfString, on, off, onComplete);
}
public void exitEmergencyCallbackMode(){

View File

@@ -1068,10 +1068,13 @@ public final class RIL extends BaseCommands implements CommandsInterface {
}
public void
sendBurstDtmf(String dtmfString, Message result) {
sendBurstDtmf(String dtmfString, int on, int off, Message result) {
RILRequest rr = RILRequest.obtain(RIL_REQUEST_CDMA_BURST_DTMF, result);
rr.mp.writeInt(3);
rr.mp.writeString(dtmfString);
rr.mp.writeString(Integer.toString(on));
rr.mp.writeString(Integer.toString(off));
if (RILJ_LOGD) riljLog(rr.serialString() + "> " + requestToString(rr.mRequest)
+ " : " + dtmfString);

View File

@@ -118,6 +118,12 @@ cat include/telephony/ril.h | \
*/
int RIL_RESTRICTED_STATE_PS_ALL = 0x10;
/** Data profile for RIL_REQUEST_SETUP_DATA_CALL */
static final int DATA_PROFILE_DEFAULT = 0;
static final int DATA_PROFILE_TETHERED = 1;
static final int DATA_PROFILE_OEM_BASE = 1000;
int RIL_REQUEST_GET_SIM_STATUS = 1;
int RIL_REQUEST_ENTER_SIM_PIN = 2;
int RIL_REQUEST_ENTER_SIM_PUK = 3;

View File

@@ -630,7 +630,7 @@ public class CDMAPhone extends PhoneBase {
mCM.stopDtmf(null);
}
public void sendBurstDtmf(String dtmfString, Message onComplete) {
public void sendBurstDtmf(String dtmfString, int on, int off, Message onComplete) {
boolean check = true;
for (int itr = 0;itr < dtmfString.length(); itr++) {
if (!PhoneNumberUtils.is12Key(dtmfString.charAt(itr))) {
@@ -641,7 +641,7 @@ public class CDMAPhone extends PhoneBase {
}
}
if ((mCT.state == Phone.State.OFFHOOK)&&(check)) {
mCM.sendBurstDtmf(dtmfString, onComplete);
mCM.sendBurstDtmf(dtmfString, on, off, onComplete);
}
}

View File

@@ -21,6 +21,7 @@ import android.util.EventLog;
import android.util.Log;
import com.android.internal.telephony.CommandException;
import com.android.internal.telephony.CommandsInterface;
import com.android.internal.telephony.DataConnection;
import com.android.internal.telephony.DataLink;
import com.android.internal.telephony.RILConstants;
@@ -142,7 +143,8 @@ public class CdmaDataConnection extends DataConnection {
lastFailTime = -1;
lastFailCause = FailCause.NONE;
receivedDisconnectReq = false;
phone.mCM.setupDataCall(Integer.toString(RILConstants.CDMA_PHONE), null, null, null,
phone.mCM.setupDataCall(Integer.toString(RILConstants.CDMA_PHONE),
Integer.toString(RILConstants.DATA_PROFILE_DEFAULT), null, null,
null, obtainMessage(EVENT_SETUP_DATA_CONNECTION_DONE));
}

View File

@@ -22,6 +22,7 @@ import android.util.EventLog;
import android.util.Log;
import com.android.internal.telephony.CommandException;
import com.android.internal.telephony.CommandsInterface;
import com.android.internal.telephony.DataConnection;
import com.android.internal.telephony.DataLink;
import com.android.internal.telephony.Phone;
@@ -83,7 +84,8 @@ public class PdpConnection extends DataConnection {
lastFailCause = FailCause.NONE;
receivedDisconnectReq = false;
phone.mCM.setupDataCall(Integer.toString(RILConstants.GSM_PHONE), null, apn.apn, apn.user,
phone.mCM.setupDataCall(Integer.toString(RILConstants.GSM_PHONE),
Integer.toString(RILConstants.DATA_PROFILE_DEFAULT), apn.apn, apn.user,
apn.password, obtainMessage(EVENT_SETUP_DATA_CONNECTION_DONE));
}

View File

@@ -937,7 +937,7 @@ public final class SimulatedCommands extends BaseCommands
* ar.userObject contains the orignal value of result.obj
* ar.result is null on success and failure
*/
public void sendBurstDtmf(String dtmfString, Message result) {
public void sendBurstDtmf(String dtmfString, int on, int off, Message result) {
resultSuccess(result, null);
}