am a83c2f37: Merge "Use correct checked value when animating Switch" into lmp-dev

* commit 'a83c2f3758abcc242c2e9686a8bee883f5815b33':
  Use correct checked value when animating Switch
This commit is contained in:
Alan Viverette
2014-08-12 22:36:47 +00:00
committed by Android Git Automerger

View File

@@ -833,6 +833,10 @@ public class Switch extends CompoundButton {
public void setChecked(boolean checked) {
super.setChecked(checked);
// Calling the super method may result in setChecked() getting called
// recursively with a different value, so load the REAL value...
checked = isChecked();
if (isAttachedToWindow() && isLaidOut()) {
animateThumbToCheckedState(checked);
} else {