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
This commit is contained in:
Winson Chung
2020-06-22 10:48:13 -07:00
parent 6a75f1332f
commit 8e31e30c59

View File

@@ -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;