Loading core/java/android/widget/CheckedTextView.java +12 −1 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package android.widget; import static android.view.accessibility.Flags.triStateChecked; import android.annotation.DrawableRes; import android.annotation.NonNull; import android.annotation.Nullable; Loading Loading @@ -141,6 +143,10 @@ public class CheckedTextView extends TextView implements Checkable { if (mChecked != checked) { mChecked = checked; refreshDrawableState(); if (triStateChecked()) { notifyViewAccessibilityStateChangedIfNeeded( AccessibilityEvent.CONTENT_CHANGE_TYPE_CHECKED); } notifyViewAccessibilityStateChangedIfNeeded( AccessibilityEvent.CONTENT_CHANGE_TYPE_UNDEFINED); } Loading Loading @@ -570,8 +576,13 @@ public class CheckedTextView extends TextView implements Checkable { public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { super.onInitializeAccessibilityNodeInfoInternal(info); info.setCheckable(true); if (triStateChecked()) { info.setChecked(mChecked ? AccessibilityNodeInfo.CHECKED_STATE_TRUE : AccessibilityNodeInfo.CHECKED_STATE_FALSE); } else { info.setChecked(mChecked); } } /** @hide */ @Override Loading Loading
core/java/android/widget/CheckedTextView.java +12 −1 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package android.widget; import static android.view.accessibility.Flags.triStateChecked; import android.annotation.DrawableRes; import android.annotation.NonNull; import android.annotation.Nullable; Loading Loading @@ -141,6 +143,10 @@ public class CheckedTextView extends TextView implements Checkable { if (mChecked != checked) { mChecked = checked; refreshDrawableState(); if (triStateChecked()) { notifyViewAccessibilityStateChangedIfNeeded( AccessibilityEvent.CONTENT_CHANGE_TYPE_CHECKED); } notifyViewAccessibilityStateChangedIfNeeded( AccessibilityEvent.CONTENT_CHANGE_TYPE_UNDEFINED); } Loading Loading @@ -570,8 +576,13 @@ public class CheckedTextView extends TextView implements Checkable { public void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) { super.onInitializeAccessibilityNodeInfoInternal(info); info.setCheckable(true); if (triStateChecked()) { info.setChecked(mChecked ? AccessibilityNodeInfo.CHECKED_STATE_TRUE : AccessibilityNodeInfo.CHECKED_STATE_FALSE); } else { info.setChecked(mChecked); } } /** @hide */ @Override Loading