From ab04f9e14ddcdf88ce2b3afc33a5de94a43ce348 Mon Sep 17 00:00:00 2001 From: Vinit Nayak Date: Mon, 4 Apr 2022 16:36:02 -0700 Subject: [PATCH] Check for nullable AutoHideController * Wasn't able to repro, but we are currently checking for null in other usages of mAutoHideController Fixes: 227638744 Change-Id: I1168dc3a0f6c7dd3cfca4e22d1155b65d3afe0c3 --- .../com/android/systemui/navigationbar/NavigationBarView.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java index f5abe28914c35..40265a367a06b 100644 --- a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java +++ b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java @@ -143,6 +143,7 @@ public class NavigationBarView extends FrameLayout { private boolean mDeadZoneConsuming = false; private final NavigationBarTransitions mBarTransitions; private final OverviewProxyService mOverviewProxyService; + @Nullable private AutoHideController mAutoHideController; // performs manual animation in sync with layout transitions @@ -316,7 +317,7 @@ public class NavigationBarView extends FrameLayout { }; private final Consumer mNavbarOverlayVisibilityChangeCallback = (visible) -> { - if (visible) { + if (visible && mAutoHideController != null) { mAutoHideController.touchAutoHide(); } notifyActiveTouchRegions();