Correctly update rtl state in navbar once language changes
NavigationBarView failed to update the rtl state that is passed to the
fragment, navbar helper and quick step controller when changing from a
ltr to rtl language because layout direction in view has not been
resolved yet. Fixed by resolving layout direction in reorient if needed.
Change-Id: I28b5dd8b678723020e549a04735ca1932b825dac
Fixes: 73337601
Test: change language and try to quick scrub
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
index 53dc814..880a9d7 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
@@ -881,6 +881,11 @@
Log.d(TAG, "reorient(): rot=" + mCurrentRotation);
}
+ // Resolve layout direction if not resolved since components changing layout direction such
+ // as changing languages will recreate this view and the direction will be resolved later
+ if (!isLayoutDirectionResolved()) {
+ resolveLayoutDirection();
+ }
updateTaskSwitchHelper();
setNavigationIconHints(mNavigationIconHints, true);