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);
}
}
}
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);
}
}
}
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();
}
}
}
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();
}
}
}
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();
}
}
}
Aggregations