Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0155327b authored by Tyler Gunn's avatar Tyler Gunn
Browse files

Incoming video calls - accept only 2-way calls.

- In AnswerPresenter, only show the video targets if the incoming call is
a bi-directional video call.

Bug: 20254835
Change-Id: I34f3fd79d126a2ae621afeb13ceb2b143bdca2ce
parent 0af2982c
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -261,13 +261,14 @@ public class AnswerPresenter extends Presenter<AnswerPresenter.AnswerUi>
    }

    private void configureAnswerTargetsForSms(Call call, List<String> textMsgs) {
        final Context context = getUi().getContext();

        mHasTextMessages = textMsgs != null;
        boolean withSms =
                call.can(android.telecom.Call.Details.CAPABILITY_RESPOND_VIA_TEXT)
                && mHasTextMessages;
        if (call.isVideoCall(context)) {

        // Only present the user with the option to answer as a video call if the incoming call is
        // a bi-directional video call.
        if (VideoProfile.VideoState.isBidirectional((call.getVideoState()))) {
            if (withSms) {
                getUi().showTargets(AnswerFragment.TARGET_SET_FOR_VIDEO_WITH_SMS);
                getUi().configureMessageDialog(textMsgs);