Search in sources :

Example 1 with Filter

use of com.android.dialer.enrichedcall.EnrichedCallManager.Filter 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();
}
Also used : Filter(com.android.dialer.enrichedcall.EnrichedCallManager.Filter) EnrichedCallManager(com.android.dialer.enrichedcall.EnrichedCallManager) Session(com.android.dialer.enrichedcall.Session)

Aggregations

EnrichedCallManager (com.android.dialer.enrichedcall.EnrichedCallManager)1 Filter (com.android.dialer.enrichedcall.EnrichedCallManager.Filter)1 Session (com.android.dialer.enrichedcall.Session)1