diff options
author | Yorke Lee <yorkelee@google.com> | 2015-04-16 11:32:36 -0700 |
---|---|---|
committer | Yorke Lee <yorkelee@google.com> | 2015-04-16 11:32:36 -0700 |
commit | c7cc395a7b526b9a5beda8a200b6932926442a60 (patch) | |
tree | 3f925e28c2d70b945255adb8135ec70215954b42 | |
parent | 3c73ccff117f4481a7e7a09464e0e9993c73c6c8 (diff) |
Show video call button only for video calls or upgrade to video
Bug: 20297465
Change-Id: Ied98faeece5079a6c000726b82244057b0422c92
-rw-r--r-- | InCallUI/src/com/android/incallui/CallButtonPresenter.java | 12 |
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); |