Merge "Privacy dot doesn't been reset after rtl changed"

This commit is contained in:
TreeHugger Robot
2021-12-11 02:43:24 +00:00
committed by Android (Google) Code Review

View File

@@ -102,12 +102,17 @@ class PrivacyDotViewController @Inject constructor(
configurationController.addCallback(object : ConfigurationController.ConfigurationListener {
override fun onLayoutDirectionChanged(isRtl: Boolean) {
synchronized(this) {
val corner = selectDesignatedCorner(nextViewState.rotation, isRtl)
nextViewState = nextViewState.copy(
layoutRtl = isRtl,
designatedCorner = corner
)
uiExecutor?.execute {
// If rtl changed, hide all dotes until the next state resolves
setCornerVisibilities(View.INVISIBLE)
synchronized(this) {
val corner = selectDesignatedCorner(nextViewState.rotation, isRtl)
nextViewState = nextViewState.copy(
layoutRtl = isRtl,
designatedCorner = corner
)
}
}
}
})