From e91cacacb3dd7ddab7ee31f83d357a6cf14d3e1f Mon Sep 17 00:00:00 2001 From: Christine Chen Date: Fri, 13 Sep 2013 16:29:28 -0700 Subject: Takes new Call states to enable/disable buttons. Bug: 10733320 Change-Id: Ic8e58cad46610a1fcaef2b55af458ca7661c4f8b --- .../com/android/incallui/CallButtonFragment.java | 15 +++++++++++++ .../com/android/incallui/CallButtonPresenter.java | 25 ++++++++++++++++++---- 2 files changed, 36 insertions(+), 4 deletions(-) diff --git a/InCallUI/src/com/android/incallui/CallButtonFragment.java b/InCallUI/src/com/android/incallui/CallButtonFragment.java index f6640aac0..e53a34726 100644 --- a/InCallUI/src/com/android/incallui/CallButtonFragment.java +++ b/InCallUI/src/com/android/incallui/CallButtonFragment.java @@ -185,6 +185,11 @@ public class CallButtonFragment mMuteButton.setChecked(value); } + @Override + public void enableMute(boolean enabled) { + mMuteButton.setEnabled(enabled); + } + @Override public void setHold(boolean value) { mHoldButton.setChecked(value); @@ -195,6 +200,11 @@ public class CallButtonFragment mHoldButton.setVisibility(show ? View.VISIBLE : View.GONE); } + @Override + public void enableHold(boolean enabled) { + mHoldButton.setEnabled(enabled); + } + @Override public void showMerge(boolean show) { mMergeButton.setVisibility(show ? View.VISIBLE : View.GONE); @@ -210,6 +220,11 @@ public class CallButtonFragment mAddCallButton.setVisibility(show ? View.VISIBLE : View.GONE); } + @Override + public void enableAddCall(boolean enabled) { + mAddCallButton.setEnabled(enabled); + } + @Override public void setAudio(int mode) { updateAudioButtons(getPresenter().getSupportedAudio()); diff --git a/InCallUI/src/com/android/incallui/CallButtonPresenter.java b/InCallUI/src/com/android/incallui/CallButtonPresenter.java index 7dae73a7a..3171816ff 100644 --- a/InCallUI/src/com/android/incallui/CallButtonPresenter.java +++ b/InCallUI/src/com/android/incallui/CallButtonPresenter.java @@ -202,17 +202,30 @@ public class CallButtonPresenter extends Presenter