summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2013-09-13 14:45:58 -0700
committerYorke Lee <yorkelee@google.com>2013-09-13 14:45:58 -0700
commit307c8cfa3cc3cd58c3193b72252f5dd3bd26502f (patch)
tree568eb553ad1e9acfd2276cdb60d16d1ea39f4ddd
parentae7610fc14a767dc4f69aa39ee3fc464341037d7 (diff)
Fix mute state infinite loop when quickly clicking speaker and mute buttons
Bug: 10648433 Change-Id: Id45d374fb0741ad87c9afe609e0f9f04c7cdb02e
-rw-r--r--InCallUI/src/com/android/incallui/CallButtonFragment.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/InCallUI/src/com/android/incallui/CallButtonFragment.java b/InCallUI/src/com/android/incallui/CallButtonFragment.java
index 4c42a7845..f6640aac0 100644
--- a/InCallUI/src/com/android/incallui/CallButtonFragment.java
+++ b/InCallUI/src/com/android/incallui/CallButtonFragment.java
@@ -22,6 +22,7 @@ import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
+import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.view.ViewStub;
import android.widget.CompoundButton;
@@ -98,10 +99,11 @@ public class CallButtonFragment
});
mMuteButton = (ToggleButton) parent.findViewById(R.id.muteButton);
- mMuteButton.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
+ mMuteButton.setOnClickListener(new OnClickListener() {
@Override
- public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
- getPresenter().muteClicked(isChecked);
+ public void onClick(View v) {
+ final CompoundButton button = (CompoundButton) v;
+ getPresenter().muteClicked(button.isChecked());
}
});