From 24c2c8536642b726f171afb258ee96374ab9ab00 Mon Sep 17 00:00:00 2001 From: Dave Mankoff Date: Thu, 21 Apr 2022 20:46:39 +0000 Subject: [PATCH] Tell NavigationBarView when mode changes. We were telling the NavigationBarView what mode it was in when it first connected to the OverviewProxyService, but not alerting it to any updates to the mode thereafter. Fixes: 229413744 Test: manual Change-Id: Iddced03b38032a27790bcf3bbfb710813d6ef139 --- .../com/android/systemui/navigationbar/NavigationBar.java | 4 +++- .../android/systemui/navigationbar/NavigationBarView.java | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java index 740ecff6b06e5..357ff3834fcb2 100644 --- a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java +++ b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java @@ -330,7 +330,8 @@ public class NavigationBar extends ViewController implements @Override public void onConnectionChanged(boolean isConnected) { mView.onOverviewProxyConnectionChange( - mOverviewProxyService.isEnabled(), mOverviewProxyService.shouldShowSwipeUpUI()); + mOverviewProxyService.isEnabled()); + mView.setShouldShowSwipeUpUi(mOverviewProxyService.shouldShowSwipeUpUI()); updateScreenPinningGestures(); } @@ -1657,6 +1658,7 @@ public class NavigationBar extends ViewController implements } if (mView != null) { mView.setNavBarMode(mode); + mView.setShouldShowSwipeUpUi(mOverviewProxyService.shouldShowSwipeUpUI()); } } }; diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java index 8878c2decb877..f3a3f1018a9fe 100644 --- a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java +++ b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java @@ -886,8 +886,11 @@ public class NavigationBarView extends FrameLayout { } } - void onOverviewProxyConnectionChange(boolean enabled, boolean showSwipeUpUi) { + void onOverviewProxyConnectionChange(boolean enabled) { mOverviewProxyEnabled = enabled; + } + + void setShouldShowSwipeUpUi(boolean showSwipeUpUi) { mShowSwipeUpUi = showSwipeUpUi; updateStates(); }