diff options
author | Yorke Lee <yorkelee@google.com> | 2015-04-16 11:32:36 -0700 |
---|---|---|
committer | Yorke Lee <yorkelee@google.com> | 2015-04-16 14:23:50 -0700 |
commit | 0f83642786a67dcb4bb96bcbb473fd6008511bc3 (patch) | |
tree | 3cb63fd19c978563e7c3e81486cbee0970339df0 /InCallUI | |
parent | 8a1fddf79060f033d7fdc399128870547dba6cfe (diff) |
DO NOT MERGE Show video call button only for video calls or upgrade to video
Bug: 20297465
Change-Id: Ied98faeece5079a6c000726b82244057b0422c92
Diffstat (limited to 'InCallUI')
-rw-r--r-- | InCallUI/src/com/android/incallui/CallButtonPresenter.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/InCallUI/src/com/android/incallui/CallButtonPresenter.java b/InCallUI/src/com/android/incallui/CallButtonPresenter.java index bce86042a..b89afbe06 100644 --- a/InCallUI/src/com/android/incallui/CallButtonPresenter.java +++ b/InCallUI/src/com/android/incallui/CallButtonPresenter.java @@ -374,10 +374,12 @@ 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_BIDIRECTIONAL) - && call.can( - android.telecom.Call.Details.CAPABILITY_SUPPORTS_VT_REMOTE_BIDIRECTIONAL); + + // 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); @@ -387,9 +389,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); |