Privacy dot doesn't been reset after rtl changed

After RTL changed, privacy dot shall be reset just like orientation
changed.

Bug 207612200
Test: atest NotificationPanelViewControllerTest ScreenDecorationsTest
Test: Start voice recording, and change RTL to check statusbar behavior.

Change-Id: I6225278cb39dd7524965ef40c6b244a2cee98163
This commit is contained in:
Milton Wu
2021-12-01 17:12:10 +08:00
parent 78e4849f0b
commit 0306b54c0e

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
)
}
}
}
})