ps call
- ps call 从 GsmCdmaPhone 开始 判断是否注册ims 才开始进行imsphone 实例的获取
所以从GsmCdmaPhone开始跟踪流程 如果不清楚可以查看 结构图 明确标出
com.android.internal.telephony.GsmCdmaPhone#dial
@Override
public Connection dial(String dialString, UUSInfo uusInfo, int videoState, Bundle intentExtras)
throws CallStateException {
//...
Phone imsPhone = mImsPhone;
//...
if ((imsUseEnabled && (!isUt || useImsForUt)) || useImsForEmergency) {
try {
if (DBG) logd("Trying IMS PS call");
return imsPhone.dial(dialString, uusInfo, videoState, intentExtras); //--->dial
} catch (CallStateException e) {
//...
}
}
//...
}
- com.android.internal.telephony.imsphone.ImsPhone#dialInternal
private Connection dialInternal(String dialString, int videoState, Bundle intentExtras)
throws CallStateException {
//...
if (mmi == null) {
return mCT.dial(dialString, videoState, intentExtras);//--- dial
} else if (mmi.isTemporaryModeCLIR()) {
return mCT.dial(mmi.getDialingNumber(), mmi.getCLIRMode(), videoState, intentExtras);
} else if (!mmi.isSupportedOverImsPhone()) {
// If the mmi is not supported by IMS service,
// try to initiate dialing with default phone
throw new CallStateException(CS_FALLBACK);
} else {
//...
}
}
- com.android.internal.telephony.imsphone.ImsPhoneCallTracker#dialInternal
private void dialInternal(ImsPhoneConnection conn, int clirMode, int videoState,
Bundle intentExtras) {
//...
try {
//...
ImsCall imsCall = mImsManager.makeCall(mServiceId, profile,
callees, mImsCallListener); //---dial
conn.setImsCall(imsCall);
//...
} catch (ImsException e) {
loge("dialInternal : " + e);
conn.setDisconnectCause(DisconnectCause.ERROR_UNSPECIFIED);
sendEmptyMessageDelayed(EVENT_HANGUP_PENDINGMO, TIMEOUT_HANGUP_PENDINGMO);
} catch (RemoteException e) {
}
}
- com.android.ims.ImsManager#makeCall
public ImsCall makeCall(int serviceId, ImsCallProfile profile, String[] callees,
ImsCall.Listener listener) throws ImsException {
if (DBG) {
log("makeCall :: serviceId=" + serviceId
+ ", profile=" + profile);
}
ImsCall call = new ImsCall(mContext, profile);
call.setListener(listener);
ImsCallSession session = createCallSession(serviceId, profile);
if ((callees != null) && (callees.length == 1)) {
call.start(session, callees[0]); //---dial
} else {
call.start(session, callees);
}
return call;
}
- com.android.ims.internal.ImsCallSession#start
public void start(String callee, ImsCallProfile profile) {
if (mClosed) {
return;
}
try {
miSession.start(callee, profile); //---dial
} catch (RemoteException e) {
}
}
miSession 是调用 IImsCallSession 进程间通讯的 实例 是谷歌提供给厂商的接口
举例高通是ImsCallSessionImpl 路径在vendor目录下面 由于这部分非公开 自己参考 各平台厂商的代码
作者:贱贱的杨
从此你们的路上不会孤单,还有贱贱的我