Search in sources :

Example 1 with CallList

use of com.android.incallui.call.CallList in project android_packages_apps_Dialer by LineageOS.

the class NotificationBroadcastReceiver method declineIncomingCall.

private void declineIncomingCall(Context context) {
    CallList callList = InCallPresenter.getInstance().getCallList();
    if (callList == null) {
        StatusBarNotifier.clearAllCallNotifications(context);
        LogUtil.e("NotificationBroadcastReceiver.declineIncomingCall", "call list is empty");
    } else {
        DialerCall call = callList.getIncomingCall();
        if (call != null) {
            call.reject(false, /* rejectWithMessage */
            null);
        }
    }
}
Also used : CallList(com.android.incallui.call.CallList) DialerCall(com.android.incallui.call.DialerCall)

Example 2 with CallList

use of com.android.incallui.call.CallList in project android_packages_apps_Dialer by LineageOS.

the class NotificationBroadcastReceiver method answerIncomingCall.

private void answerIncomingCall(Context context, int videoState) {
    CallList callList = InCallPresenter.getInstance().getCallList();
    if (callList == null) {
        StatusBarNotifier.clearAllCallNotifications(context);
        LogUtil.e("NotificationBroadcastReceiver.answerIncomingCall", "call list is empty");
    } else {
        DialerCall call = callList.getIncomingCall();
        if (call != null) {
            call.answer(videoState);
            InCallPresenter.getInstance().showInCall(false, /* showDialpad */
            false);
        }
    }
}
Also used : CallList(com.android.incallui.call.CallList) DialerCall(com.android.incallui.call.DialerCall)

Example 3 with CallList

use of com.android.incallui.call.CallList in project android_packages_apps_Dialer by LineageOS.

the class NotificationBroadcastReceiver method declineUpgradeRequest.

private void declineUpgradeRequest(Context context) {
    CallList callList = InCallPresenter.getInstance().getCallList();
    if (callList == null) {
        StatusBarNotifier.clearAllCallNotifications(context);
        LogUtil.e("NotificationBroadcastReceiver.declineUpgradeRequest", "call list is empty");
    } else {
        DialerCall call = callList.getVideoUpgradeRequestCall();
        if (call != null) {
            call.getVideoTech().declineVideoRequest();
        }
    }
}
Also used : CallList(com.android.incallui.call.CallList) DialerCall(com.android.incallui.call.DialerCall)

Example 4 with CallList

use of com.android.incallui.call.CallList in project android_packages_apps_Dialer by LineageOS.

the class NotificationBroadcastReceiver method hangUpOngoingCall.

private void hangUpOngoingCall(Context context) {
    CallList callList = InCallPresenter.getInstance().getCallList();
    if (callList == null) {
        StatusBarNotifier.clearAllCallNotifications(context);
        LogUtil.e("NotificationBroadcastReceiver.hangUpOngoingCall", "call list is empty");
    } else {
        DialerCall call = callList.getOutgoingCall();
        if (call == null) {
            call = callList.getActiveOrBackgroundCall();
        }
        LogUtil.i("NotificationBroadcastReceiver.hangUpOngoingCall", "disconnecting call, call: " + call);
        if (call != null) {
            call.disconnect();
        }
    }
}
Also used : CallList(com.android.incallui.call.CallList) DialerCall(com.android.incallui.call.DialerCall)

Example 5 with CallList

use of com.android.incallui.call.CallList in project android_packages_apps_Dialer by LineageOS.

the class NotificationBroadcastReceiver method acceptUpgradeRequest.

private void acceptUpgradeRequest(Context context) {
    CallList callList = InCallPresenter.getInstance().getCallList();
    if (callList == null) {
        StatusBarNotifier.clearAllCallNotifications(context);
        LogUtil.e("NotificationBroadcastReceiver.acceptUpgradeRequest", "call list is empty");
    } else {
        DialerCall call = callList.getVideoUpgradeRequestCall();
        if (call != null) {
            call.getVideoTech().acceptVideoRequest();
        }
    }
}
Also used : CallList(com.android.incallui.call.CallList) DialerCall(com.android.incallui.call.DialerCall)

Aggregations

CallList (com.android.incallui.call.CallList)7 DialerCall (com.android.incallui.call.DialerCall)6 ExternalCallList (com.android.incallui.call.ExternalCallList)1