From 622d2e97314fe3fc96485ada78001f2924e397f9 Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Thu, 15 Dec 2022 23:01:45 +0000 Subject: [PATCH] Ensure that the gesture handler always gets configuration change - In cases where the nav bar view is already in the new configuration the usual path of notifying the gesture handler will not get triggered Bug: 260220098 Test: Repro steps in bug Change-Id: I98ecb1f0ab8ca29f3fd84d7a84ea74a8fc22bb70 --- .../com/android/systemui/navigationbar/NavigationBar.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java index d762b39fa1af8..48c66d1945db0 100644 --- a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java +++ b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java @@ -832,6 +832,11 @@ public class NavigationBar extends ViewController implements } repositionNavigationBar(rotation); + // NOTE(b/260220098): In some cases, the recreated nav bar will already have the right + // configuration, which means that NavBarView will not receive a configuration change to + // propagate to EdgeBackGestureHandler (which is injected into this and NBV). As such, we + // should also force-update the gesture handler to ensure it updates to the right bounds + mEdgeBackGestureHandler.onConfigurationChanged(newConfig); if (canShowSecondaryHandle()) { if (rotation != mCurrentRotation) { mCurrentRotation = rotation;