summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Yunfan Chen <yunfanc@google.com> 2023-01-18 15:07:50 +0900
committer Yunfan Chen <yunfanc@google.com> 2023-01-18 15:07:50 +0900
commitea243019f4cd3ff967ca8427aaaacd99eec749d2 (patch)
tree1d7b39447e2d12f43a4a97e8f4e8e9fe4ea1e960
parent859bea286121df067b8857820854a65dc7b3a2b8 (diff)
Update Nav Bar Attrs in onViewAttached
This is necessary because the EdgeBackGestureHandler will only be enabled after the view is attached. If there's no other configuration updates, the view may hold the wrong attrs due to disabled edge back gesture handler. This only causes bug when the system config updated a little but caused nav bar recreation, e.g., dark mode settings change. Bug: 262194023 Test: See the reproduce steps in the bug. Change-Id: I8d47e161bf32bb6b5cc8ed560650ce05c396165e
-rw-r--r--packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java
index e0aa6a854822..86232ea841d1 100644
--- a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java
+++ b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java
@@ -745,6 +745,7 @@ public class NavigationBar extends ViewController<NavigationBarView> implements
setWindowVisible(isNavBarWindowVisible());
mView.setBehavior(mBehavior);
setNavBarMode(mNavBarMode);
+ repositionNavigationBar(mCurrentRotation);
mView.setUpdateActiveTouchRegionsCallback(
() -> mOverviewProxyService.onActiveNavBarRegionChanges(
getButtonLocations(