Fix NPE in edge back gesture handler

- TaskBarDelegate creates an EdgeBackGestureHandler, but does not set
  a stage change callback (not needed currently)

Fixes: 197831135
Test: atest SystemUITests

Signed-off-by: Winson Chung <winsonc@google.com>
Change-Id: I35841c077506d7dad35b0c53a72d9907c205cb52
This commit is contained in:
Winson Chung
2021-09-01 21:07:01 -07:00
parent a07f72ca00
commit 8ad79ffd15

View File

@@ -384,7 +384,7 @@ public class EdgeBackGestureHandler extends CurrentUserTracker
private void onNavigationSettingsChanged() {
boolean wasBackAllowed = isHandlingGestures();
updateCurrentUserResources();
if (wasBackAllowed != isHandlingGestures()) {
if (mStateChangeCallback != null && wasBackAllowed != isHandlingGestures()) {
mStateChangeCallback.run();
}
}