summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2015-04-16 21:17:46 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-04-16 21:17:47 +0000
commitb74a5ebcc0fcc8a70a7e1af855f93ae6f158f0bb (patch)
tree9adf0f0d96bc8cfdcd452c0c892a4343a71256bc
parent7418811be271669b5af68bbb96996f81d6798355 (diff)
parentc7cc395a7b526b9a5beda8a200b6932926442a60 (diff)
Merge "Show video call button only for video calls or upgrade to video"
-rw-r--r--InCallUI/src/com/android/incallui/CallButtonPresenter.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/InCallUI/src/com/android/incallui/CallButtonPresenter.java b/InCallUI/src/com/android/incallui/CallButtonPresenter.java
index 43431c73c..718dd52c7 100644
--- a/InCallUI/src/com/android/incallui/CallButtonPresenter.java
+++ b/InCallUI/src/com/android/incallui/CallButtonPresenter.java
@@ -374,9 +374,11 @@ public class CallButtonPresenter extends Presenter<CallButtonPresenter.CallButto
final boolean showAddCall = TelecomAdapter.getInstance().canAddCall();
final boolean showMerge = call.can(
android.telecom.Call.Details.CAPABILITY_MERGE_CONFERENCE);
- final boolean showUpgradeToVideo = !isVideo
- && call.can(android.telecom.Call.Details.CAPABILITY_SUPPORTS_VT_LOCAL_TX)
- && call.can(android.telecom.Call.Details.CAPABILITY_SUPPORTS_VT_REMOTE_RX);
+ // TODO: This button is currently being used for both upgrade and downgrade scenarios.
+ // It should be split into BUTTON_DOWNGRADE_TO_VOICE AND BUTTON_UPGRADE_TO_VIDEO
+ final boolean showUpgradeToVideo = isVideo ||
+ (call.can(android.telecom.Call.Details.CAPABILITY_SUPPORTS_VT_LOCAL_TX)
+ && call.can(android.telecom.Call.Details.CAPABILITY_SUPPORTS_VT_REMOTE_RX));
final boolean showMute = call.can(android.telecom.Call.Details.CAPABILITY_MUTE);
@@ -386,9 +388,7 @@ public class CallButtonPresenter extends Presenter<CallButtonPresenter.CallButto
ui.setHold(isCallOnHold);
ui.showButton(BUTTON_MUTE, showMute);
ui.showButton(BUTTON_ADD_CALL, showAddCall);
- // TODO: This button is currently being used for both upgrade and downgrade scenarios.
- // It should be split into BUTTON_DOWNGRADE_TO_VOICE AND BUTTON_UPGRADE_TO_VIDEO
- ui.showButton(BUTTON_UPGRADE_TO_VIDEO, true);
+ ui.showButton(BUTTON_UPGRADE_TO_VIDEO, showUpgradeToVideo);
ui.showButton(BUTTON_DOWNGRADE_TO_VOICE, false);
ui.showButton(BUTTON_SWITCH_CAMERA, isVideo);
ui.showButton(BUTTON_PAUSE_VIDEO, isVideo);