Search in sources :

Example 1 with State

use of com.android.dialer.enrichedcall.Session.State in project android_packages_apps_Dialer by LineageOS.

the class CallComposerActivity method refreshUiForCallComposerState.

private void refreshUiForCallComposerState() {
    Session session = getEnrichedCallManager().getSession(sessionId);
    if (session == null) {
        return;
    }
    @State int state = session.getState();
    LogUtil.i("CallComposerActivity.refreshUiForCallComposerState", "state: %s", StateExtension.toString(state));
    switch(state) {
        case Session.STATE_STARTING:
            timeoutHandler.postDelayed(sessionStartedTimedOut, getSessionStartedTimeoutMillis());
            if (sendAndCallReady) {
                showLoadingUi();
            }
            break;
        case Session.STATE_STARTED:
            timeoutHandler.removeCallbacks(sessionStartedTimedOut);
            if (sendAndCallReady) {
                sendAndCall();
            }
            break;
        case Session.STATE_START_FAILED:
        case Session.STATE_CLOSED:
            setFailedResultAndFinish();
            break;
        case Session.STATE_MESSAGE_FAILED:
        case Session.STATE_MESSAGE_SENT:
        case Session.STATE_NONE:
        default:
            break;
    }
}
Also used : State(com.android.dialer.enrichedcall.Session.State) Session(com.android.dialer.enrichedcall.Session)

Aggregations

Session (com.android.dialer.enrichedcall.Session)1 State (com.android.dialer.enrichedcall.Session.State)1