Search in sources :

Example 6 with EnrichedCallManager

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();
}
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)6 EnrichedCallCapabilities (com.android.dialer.enrichedcall.EnrichedCallCapabilities)2 Activity (android.app.Activity)1 Context (android.content.Context)1 Intent (android.content.Intent)1 SharedPreferences (android.content.SharedPreferences)1 Nullable (android.support.annotation.Nullable)1 VisibleForTesting (android.support.annotation.VisibleForTesting)1 BaseCallback (android.support.design.widget.BaseTransientBottomBar.BaseCallback)1 Snackbar (android.support.design.widget.Snackbar)1 TelephonyManager (android.telephony.TelephonyManager)1 View (android.view.View)1 OnClickListener (android.view.View.OnClickListener)1 CallToAction (com.android.contacts.common.list.ContactListItemView.CallToAction)1 Listener (com.android.contacts.common.list.PhoneNumberListAdapter.Listener)1 FilteredNumberAsyncQueryHandler (com.android.dialer.blocking.FilteredNumberAsyncQueryHandler)1 Assert (com.android.dialer.common.Assert)1 LogUtil (com.android.dialer.common.LogUtil)1 ConfigProvider (com.android.dialer.configprovider.ConfigProvider)1 ConfigProviderBindings (com.android.dialer.configprovider.ConfigProviderBindings)1