diff options
Diffstat (limited to 'core/java/android/widget/CompoundButton.java')
| -rw-r--r-- | core/java/android/widget/CompoundButton.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/core/java/android/widget/CompoundButton.java b/core/java/android/widget/CompoundButton.java index d2464052e68f..ae58e2ae50e5 100644 --- a/core/java/android/widget/CompoundButton.java +++ b/core/java/android/widget/CompoundButton.java @@ -28,6 +28,7 @@ import android.graphics.drawable.Drawable; import android.os.Parcel; import android.os.Parcelable; import android.util.AttributeSet; +import android.util.Log; import android.view.Gravity; import android.view.SoundEffectConstants; import android.view.ViewDebug; @@ -55,6 +56,7 @@ import com.android.internal.R; * </p> */ public abstract class CompoundButton extends Button implements Checkable { + private static final String LOG_TAG = CompoundButton.class.getSimpleName(); private boolean mChecked; private boolean mBroadcasting; @@ -585,7 +587,11 @@ public abstract class CompoundButton extends Button implements Checkable { public void autofill(AutofillValue value) { if (!isEnabled()) return; - setChecked(value.getToggleValue()); + if (value.isToggle()) { + setChecked(value.getToggleValue()); + } else { + Log.w(LOG_TAG, value + " could not be autofilled into " + this); + } } @Override |
