Merge change 6850 into donut
* changes: Extra parameters for sendBurstDtmf.
This commit is contained in:
@@ -880,7 +880,7 @@ public interface CommandsInterface {
|
|||||||
* ar.userObject contains the orignal value of result.obj
|
* ar.userObject contains the orignal value of result.obj
|
||||||
* ar.result is null on success and failure
|
* 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
|
* smscPDU is smsc address in PDU form GSM BCD format prefixed
|
||||||
|
|||||||
@@ -760,10 +760,12 @@ public interface Phone {
|
|||||||
* back to caller.
|
* back to caller.
|
||||||
*
|
*
|
||||||
* @param dtmfString is string representing the dialing digit(s) in the active call
|
* @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
|
* @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
|
* Sets the radio power on/off state (off is sometimes
|
||||||
|
|||||||
@@ -685,7 +685,7 @@ public abstract class PhoneBase implements Phone {
|
|||||||
return null;
|
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.
|
// 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.");
|
Log.e(LOG_TAG, "Error! This function should never be executed, inactive CDMAPhone.");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -713,8 +713,8 @@ public class PhoneProxy extends Handler implements Phone {
|
|||||||
return mActivePhone.getCdmaEriIconMode();
|
return mActivePhone.getCdmaEriIconMode();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void sendBurstDtmf(String dtmfString, Message onComplete){
|
public void sendBurstDtmf(String dtmfString, int on, int off, Message onComplete){
|
||||||
mActivePhone.sendBurstDtmf(dtmfString,onComplete);
|
mActivePhone.sendBurstDtmf(dtmfString, on, off, onComplete);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void exitEmergencyCallbackMode(){
|
public void exitEmergencyCallbackMode(){
|
||||||
|
|||||||
@@ -1068,10 +1068,13 @@ public final class RIL extends BaseCommands implements CommandsInterface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void
|
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);
|
RILRequest rr = RILRequest.obtain(RIL_REQUEST_CDMA_BURST_DTMF, result);
|
||||||
|
|
||||||
|
rr.mp.writeInt(3);
|
||||||
rr.mp.writeString(dtmfString);
|
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)
|
if (RILJ_LOGD) riljLog(rr.serialString() + "> " + requestToString(rr.mRequest)
|
||||||
+ " : " + dtmfString);
|
+ " : " + dtmfString);
|
||||||
|
|||||||
@@ -118,6 +118,12 @@ cat include/telephony/ril.h | \
|
|||||||
*/
|
*/
|
||||||
int RIL_RESTRICTED_STATE_PS_ALL = 0x10;
|
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_GET_SIM_STATUS = 1;
|
||||||
int RIL_REQUEST_ENTER_SIM_PIN = 2;
|
int RIL_REQUEST_ENTER_SIM_PIN = 2;
|
||||||
int RIL_REQUEST_ENTER_SIM_PUK = 3;
|
int RIL_REQUEST_ENTER_SIM_PUK = 3;
|
||||||
|
|||||||
@@ -630,7 +630,7 @@ public class CDMAPhone extends PhoneBase {
|
|||||||
mCM.stopDtmf(null);
|
mCM.stopDtmf(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void sendBurstDtmf(String dtmfString, Message onComplete) {
|
public void sendBurstDtmf(String dtmfString, int on, int off, Message onComplete) {
|
||||||
boolean check = true;
|
boolean check = true;
|
||||||
for (int itr = 0;itr < dtmfString.length(); itr++) {
|
for (int itr = 0;itr < dtmfString.length(); itr++) {
|
||||||
if (!PhoneNumberUtils.is12Key(dtmfString.charAt(itr))) {
|
if (!PhoneNumberUtils.is12Key(dtmfString.charAt(itr))) {
|
||||||
@@ -641,7 +641,7 @@ public class CDMAPhone extends PhoneBase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((mCT.state == Phone.State.OFFHOOK)&&(check)) {
|
if ((mCT.state == Phone.State.OFFHOOK)&&(check)) {
|
||||||
mCM.sendBurstDtmf(dtmfString, onComplete);
|
mCM.sendBurstDtmf(dtmfString, on, off, onComplete);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import android.util.EventLog;
|
|||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.android.internal.telephony.CommandException;
|
import com.android.internal.telephony.CommandException;
|
||||||
|
import com.android.internal.telephony.CommandsInterface;
|
||||||
import com.android.internal.telephony.DataConnection;
|
import com.android.internal.telephony.DataConnection;
|
||||||
import com.android.internal.telephony.DataLink;
|
import com.android.internal.telephony.DataLink;
|
||||||
import com.android.internal.telephony.RILConstants;
|
import com.android.internal.telephony.RILConstants;
|
||||||
@@ -142,7 +143,8 @@ public class CdmaDataConnection extends DataConnection {
|
|||||||
lastFailTime = -1;
|
lastFailTime = -1;
|
||||||
lastFailCause = FailCause.NONE;
|
lastFailCause = FailCause.NONE;
|
||||||
receivedDisconnectReq = false;
|
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));
|
null, obtainMessage(EVENT_SETUP_DATA_CONNECTION_DONE));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import android.util.EventLog;
|
|||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.android.internal.telephony.CommandException;
|
import com.android.internal.telephony.CommandException;
|
||||||
|
import com.android.internal.telephony.CommandsInterface;
|
||||||
import com.android.internal.telephony.DataConnection;
|
import com.android.internal.telephony.DataConnection;
|
||||||
import com.android.internal.telephony.DataLink;
|
import com.android.internal.telephony.DataLink;
|
||||||
import com.android.internal.telephony.Phone;
|
import com.android.internal.telephony.Phone;
|
||||||
@@ -83,7 +84,8 @@ public class PdpConnection extends DataConnection {
|
|||||||
lastFailCause = FailCause.NONE;
|
lastFailCause = FailCause.NONE;
|
||||||
receivedDisconnectReq = false;
|
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));
|
apn.password, obtainMessage(EVENT_SETUP_DATA_CONNECTION_DONE));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -937,7 +937,7 @@ public final class SimulatedCommands extends BaseCommands
|
|||||||
* ar.userObject contains the orignal value of result.obj
|
* ar.userObject contains the orignal value of result.obj
|
||||||
* ar.result is null on success and failure
|
* 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);
|
resultSuccess(result, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user