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
This commit is contained in:
Dave Mankoff
2022-04-21 20:46:39 +00:00
parent 9da14f77af
commit 24c2c85366
2 changed files with 7 additions and 2 deletions

View File

@@ -330,7 +330,8 @@ public class NavigationBar extends ViewController<NavigationBarView> 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<NavigationBarView> implements
}
if (mView != null) {
mView.setNavBarMode(mode);
mView.setShouldShowSwipeUpUi(mOverviewProxyService.shouldShowSwipeUpUI());
}
}
};

View File

@@ -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();
}