From 8e31e30c5967413e1c21aaea4ee3a3442f9d5714 Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Mon, 22 Jun 2020 10:48:13 -0700 Subject: [PATCH] Initialize quickswitch rotation state - The global listener checks mStartingQuickSwitchRotation before setting the override sampling region, but immediately after navigation mode switch, this is not set to -1 so we can end up setting this to the wrong region. Bug: 158663687 Test: atest android.systemui.cts.LightBarTests#testLightNavigationBar Change-Id: I332982b5401fa5d4d4af8cd4e4d71ab8beb6cd4d --- .../android/systemui/statusbar/phone/NavigationBarFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java index 90548ba7ba822..063305e0af90d 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java @@ -221,7 +221,7 @@ public class NavigationBarFragment extends LifecycleFragment implements Callback */ private VerticalNavigationHandle mOrientationHandle; private WindowManager.LayoutParams mOrientationParams; - private int mStartingQuickSwitchRotation; + private int mStartingQuickSwitchRotation = -1; private int mCurrentRotation; private ViewTreeObserver.OnGlobalLayoutListener mOrientationHandleGlobalLayoutListener; private UiEventLogger mUiEventLogger;