From 0e2cc4487c034998438a34f14d2d920aa6925422 Mon Sep 17 00:00:00 2001 From: Ben Gilad Date: Tue, 1 Oct 2013 16:34:14 -0700 Subject: Adding the (lost) buttons back upon disconnected calls, see b/11028671. Change-Id: If4f48879bb9601484e69cb66fa0eb980ece53909 --- .../com/android/incallui/CallButtonFragment.java | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'InCallUI/src/com/android/incallui/CallButtonFragment.java') diff --git a/InCallUI/src/com/android/incallui/CallButtonFragment.java b/InCallUI/src/com/android/incallui/CallButtonFragment.java index 209869458..b0fdda18c 100644 --- a/InCallUI/src/com/android/incallui/CallButtonFragment.java +++ b/InCallUI/src/com/android/incallui/CallButtonFragment.java @@ -189,12 +189,23 @@ public class CallButtonFragment } @Override - public void setVisible(boolean on) { - if (on) { - getView().setVisibility(View.VISIBLE); - } else { - getView().setVisibility(View.INVISIBLE); + public void setEnabled(boolean isEnabled) { + View view = getView(); + if (view.getVisibility() != View.VISIBLE) { + view.setVisibility(View.VISIBLE); } + + // The main end-call button spanning across the screen. + mEndCallButton.setEnabled(isEnabled); + + // The smaller buttons laid out horizontally just below the end-call button. + mMuteButton.setEnabled(isEnabled); + mAudioButton.setEnabled(isEnabled); + mHoldButton.setEnabled(isEnabled); + mShowDialpadButton.setEnabled(isEnabled); + mMergeButton.setEnabled(isEnabled); + mAddCallButton.setEnabled(isEnabled); + mSwapButton.setEnabled(isEnabled); } @Override -- cgit v1.2.3