来电流程梳理
纠结很久,要不要写来电上报的流程。因为拿不到芯片厂商的ImsService的实现,纸上谈兵太空旷了
大致的思路:
协议侧调用HAL的主动上报接口,上报来电给到ImsService.经过一系列的处理后。通过ImsCallSession.Listener回调到
MmTelFeature的notifyIncomingCallSession
frameworks\base\telephony\java\android\telephony\ims\feature\MmTelFeature.java
public final void notifyIncomingCallSession(IImsCallSession c, Bundle extras) {
synchronized (mLock) {
if (mListener == null) {
throw new IllegalStateException("Session is not available.");
}
try {
mListener.onIncomingCall(c, extras);
} catch (RemoteException e) {
throw new RuntimeException(e);
}
}
}
frameworks\base\telephony\java\android\telephony\ims\feature\MmTelFeature.java
public void callSessionUpdated(ImsCallSession session, ImsCallProfile profile) {
logi("callSessionUpdated :: session=" + session + " profile=" + profile);
if (isTransientConferenceSession(session)) {
logi("callSessionUpdated :: not supported for transient conference session=" +
session);
return;
}
ImsCall.Listener listener;
synchronized(ImsCall.this