summaryrefslogtreecommitdiff
path: root/InCallUI
diff options
context:
space:
mode:
authorTyler Gunn <tgunn@google.com>2015-04-22 14:04:21 -0700
committerTyler Gunn <tgunn@google.com>2015-04-22 14:04:21 -0700
commit0155327bda129ddf72ead3a5da86a6d2ffe459ce (patch)
treeb6bd0b3f94e3fd6da64becaf9a25f4c095bb15aa /InCallUI
parent0af2982cc8235971113429941525de96b12bc9b8 (diff)
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
Diffstat (limited to 'InCallUI')
-rw-r--r--InCallUI/src/com/android/incallui/AnswerPresenter.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/InCallUI/src/com/android/incallui/AnswerPresenter.java b/InCallUI/src/com/android/incallui/AnswerPresenter.java
index 208532572..597975a69 100644
--- a/InCallUI/src/com/android/incallui/AnswerPresenter.java
+++ b/InCallUI/src/com/android/incallui/AnswerPresenter.java
@@ -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);