Merge "Controls a11y - Fix status change update" into rvc-dev am: 6a3f241eb7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11863862 Change-Id: Ia65bcf4e9f785e1a851e4c83e91f35f59a828d9e
This commit is contained in:
@@ -218,13 +218,11 @@ class ControlViewHolder(
|
|||||||
cancelUpdate = uiExecutor.executeDelayed({
|
cancelUpdate = uiExecutor.executeDelayed({
|
||||||
animateStatusChange(/* animated */ true, {
|
animateStatusChange(/* animated */ true, {
|
||||||
setStatusText(previousText, /* immediately */ true)
|
setStatusText(previousText, /* immediately */ true)
|
||||||
updateContentDescription()
|
|
||||||
})
|
})
|
||||||
}, UPDATE_DELAY_IN_MILLIS)
|
}, UPDATE_DELAY_IN_MILLIS)
|
||||||
|
|
||||||
animateStatusChange(/* animated */ true, {
|
animateStatusChange(/* animated */ true, {
|
||||||
setStatusText(tempStatus, /* immediately */ true)
|
setStatusText(tempStatus, /* immediately */ true)
|
||||||
updateContentDescription()
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -296,6 +294,7 @@ class ControlViewHolder(
|
|||||||
if (immediately) {
|
if (immediately) {
|
||||||
status.alpha = STATUS_ALPHA_ENABLED
|
status.alpha = STATUS_ALPHA_ENABLED
|
||||||
status.text = text
|
status.text = text
|
||||||
|
updateContentDescription()
|
||||||
}
|
}
|
||||||
nextStatusText = text
|
nextStatusText = text
|
||||||
}
|
}
|
||||||
@@ -412,6 +411,8 @@ class ControlViewHolder(
|
|||||||
setEnabled(enabled)
|
setEnabled(enabled)
|
||||||
|
|
||||||
status.text = text
|
status.text = text
|
||||||
|
updateContentDescription()
|
||||||
|
|
||||||
status.setTextColor(color)
|
status.setTextColor(color)
|
||||||
|
|
||||||
control?.getCustomIcon()?.let {
|
control?.getCustomIcon()?.let {
|
||||||
|
|||||||
@@ -163,8 +163,10 @@ class ToggleRangeBehavior : Behavior {
|
|||||||
AccessibilityNodeInfo.RangeInfo.RANGE_TYPE_FLOAT
|
AccessibilityNodeInfo.RangeInfo.RANGE_TYPE_FLOAT
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isChecked) {
|
||||||
val rangeInfo = AccessibilityNodeInfo.RangeInfo.obtain(type, min, max, current)
|
val rangeInfo = AccessibilityNodeInfo.RangeInfo.obtain(type, min, max, current)
|
||||||
info.setRangeInfo(rangeInfo)
|
info.setRangeInfo(rangeInfo)
|
||||||
|
}
|
||||||
info.addAction(AccessibilityNodeInfo.AccessibilityAction.ACTION_SET_PROGRESS)
|
info.addAction(AccessibilityNodeInfo.AccessibilityAction.ACTION_SET_PROGRESS)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user