diff options
author | Andrew Lee <anwlee@google.com> | 2014-05-09 18:17:47 -0700 |
---|---|---|
committer | Andrew Lee <anwlee@google.com> | 2014-05-09 18:40:04 -0700 |
commit | 5a0df35b85a3d561f60e0663a45b4f6712d1a17f (patch) | |
tree | e94bded47aa6091babff7a7d604cd348095edab3 /InCallUI/src/com/android/incallui/CallButtonFragment.java | |
parent | 215a0b09d59ef4384c4aef7b53cf70f8fff6fd80 (diff) |
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
Diffstat (limited to 'InCallUI/src/com/android/incallui/CallButtonFragment.java')
-rw-r--r-- | InCallUI/src/com/android/incallui/CallButtonFragment.java | 6 |
1 files changed, 5 insertions, 1 deletions
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(); |