From 5a0df35b85a3d561f60e0663a45b4f6712d1a17f Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Fri, 9 May 2014 18:17:47 -0700 Subject: Change tints, backgrounds on incoming call icons. - Also tweaked icon tints for the InCall buttons, to make them less prominent in the disabled state. - Strengthened the logic around setting the audio button's enabled state in the call button fragment. Before, updateAudioButtons() was setting the audio button to be enabled after setEnabled(false) was called on the fragment, causing it to be set to disabled notably later than the other buttons. Bug: 14658215 Change-Id: I68145fcc7420713e492e96b6c6a636fad9047ed1 --- InCallUI/src/com/android/incallui/CallButtonFragment.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (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 f2146a60e..d9fc68de3 100644 --- a/InCallUI/src/com/android/incallui/CallButtonFragment.java +++ b/InCallUI/src/com/android/incallui/CallButtonFragment.java @@ -61,6 +61,8 @@ public class CallButtonFragment private static final int HIDDEN = 0; private static final int VISIBLE = 255; + private boolean mIsEnabled; + @Override CallButtonPresenter createPresenter() { // TODO: find a cleaner way to include audio mode provider than @@ -189,6 +191,7 @@ public class CallButtonFragment @Override public void setEnabled(boolean isEnabled) { + mIsEnabled = isEnabled; View view = getView(); if (view.getVisibility() != View.VISIBLE) { view.setVisibility(View.VISIBLE); @@ -420,7 +423,8 @@ public class CallButtonFragment Log.v(this, "showSpeakerphoneOffIcon: " + showSpeakerphoneOffIcon); Log.v(this, "showHandsetIcon: " + showHandsetIcon); - mAudioButton.setEnabled(audioButtonEnabled); + // Only enable the audio button if the fragment is enabled. + mAudioButton.setEnabled(audioButtonEnabled && mIsEnabled); mAudioButton.setSelected(audioButtonChecked); final LayerDrawable layers = (LayerDrawable) mAudioButton.getBackground(); -- cgit v1.2.3