说明
在国内的某些地方,呼叫转移的时候不识别国家码。 去掉国家码则正常
所以在国内可以统一将国家码拿掉
修改
拿掉国家码+86的方法,在GSMPhone.java 或者GsmCdmaPhone.java中做如下修改
@Override
public void setCallForwardingOption(int commandInterfaceCFAction,
int commandInterfaceCFReason,String dialingNumber,int timerSeconds,Message onComplete) {
…
// remove “+86” from the phone number;
If(注册到的网络是在国内){ //只有在中国的时候才将”+86" 拿掉
if (dialingNumber.startsWith(“+86”)) {
Log.d(LOG_TAG, "dialingNumber before remove plus char , dialingNumber=+ dialingNumber);dialingNumber= dialingNumber.substring(3, dialingNumber.length());Log.d(LOG_TAG, "dialingNumberafter remove plus char , dialingNumber= "+ dialingNumber);
}
}
mCi.setCallForward(commandInterfaceCFAction,
commandInterfaceCFReason,CommandsInterface.SERVICE_CLASS_VOICE,dialingNumber,timerSeconds,resp);