use of com.android.dialer.enrichedcall.EnrichedCallManager in project android_packages_apps_Dialer by LineageOS.
the class DialerCall method updateEnrichedCallSession.
private void updateEnrichedCallSession() {
if (getNumber() == null) {
return;
}
if (getEnrichedCallSession() != null) {
// State changes to existing sessions are currently handled by the UI components (which have
// their own listeners). Someday instead we could remove those and just call update() here and
// have the usual onDialerCallUpdate update the UI.
dispatchOnEnrichedCallSessionUpdate();
return;
}
EnrichedCallManager manager = EnrichedCallComponent.get(mContext).getEnrichedCallManager();
Filter filter = isIncoming() ? manager.createIncomingCallComposerFilter() : manager.createOutgoingCallComposerFilter();
Session session = manager.getSession(getUniqueCallId(), getNumber(), filter);
if (session == null) {
return;
}
session.setUniqueDialerCallId(getUniqueCallId());
setEnrichedCallSession(session);
LogUtil.i("DialerCall.updateEnrichedCallSession", "setting session %d's dialer id to %s", session.getSessionId(), getUniqueCallId());
dispatchOnEnrichedCallSessionUpdate();
}
Aggregations