diff options
author | Andrew Lee <anwlee@google.com> | 2014-10-17 18:24:15 -0700 |
---|---|---|
committer | Andrew Lee <anwlee@google.com> | 2014-10-20 10:25:20 -0700 |
commit | 5532000faea55ee01145ec7535c5e0b68c0f7286 (patch) | |
tree | b97a03b97d71d88610435eac5badf197e6bfb115 /src | |
parent | 158eab1b189b530fbd452ba3e506f75c0b776b82 (diff) | |
download | packages_apps_InCallUI-5532000faea55ee01145ec7535c5e0b68c0f7286.tar.gz packages_apps_InCallUI-5532000faea55ee01145ec7535c5e0b68c0f7286.tar.bz2 packages_apps_InCallUI-5532000faea55ee01145ec7535c5e0b68c0f7286.zip |
Add hold button for video calling.
This is somewhat conceptual, but handles the UI portion depending on
how the PhoneCapabilities are updated in teh video call scenario.
Bug: 16712271
Change-Id: I4cc6a69efc40aee9e29c33bf150906203bc85d63
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/incallui/CallButtonPresenter.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/com/android/incallui/CallButtonPresenter.java b/src/com/android/incallui/CallButtonPresenter.java index ca4eb883..1b44f071 100644 --- a/src/com/android/incallui/CallButtonPresenter.java +++ b/src/com/android/incallui/CallButtonPresenter.java @@ -333,13 +333,13 @@ public class CallButtonPresenter extends Presenter<CallButtonPresenter.CallButto */ private void updateCallButtons(Call call, Context context) { if (call.isVideoCall(context)) { - updateVideoCallButtons(); + updateVideoCallButtons(call); } else { updateVoiceCallButtons(call); } } - private void updateVideoCallButtons() { + private void updateVideoCallButtons(Call call) { Log.v(this, "Showing buttons for video call."); final CallButtonUi ui = getUi(); @@ -357,6 +357,12 @@ public class CallButtonPresenter extends Presenter<CallButtonPresenter.CallButto ui.showChangeToVoiceButton(true); ui.showSwitchCameraButton(true); ui.showPauseVideoButton(true); + + final boolean supportHold = call.can(PhoneCapabilities.SUPPORT_HOLD); + final boolean enableHoldOption = call.can(PhoneCapabilities.HOLD); + ui.showHoldButton(supportHold); + ui.enableHold(enableHoldOption); + ui.setHold(call.getState() == Call.State.ONHOLD); } private void updateVoiceCallButtons(Call call) { |