Prevent 3 button taskbar from showing on startup

Previously we were only hiding sysui navbar on
nav mode or config change, but the old navbar would
still show over taskbar if user was in three button mode
on device startup.

Bug: 180046394
Test: Restart device on gesture and 3 button nav.
Change-Id: I21169cb324f2a3e867424a3a494513f11ec96a0b
This commit is contained in:
Vinit Nayak
2021-05-10 19:36:27 -07:00
parent 661c982576
commit 2e8f00fca9

View File

@@ -184,6 +184,7 @@ public class NavigationBarController implements Callbacks,
mNavMode = mNavigationModeController.addListener(this);
mNavigationModeController.addListener(this);
mTaskbarDelegate = new TaskbarDelegate(mOverviewProxyService);
mIsTablet = isTablet(mContext.getResources().getConfiguration());
}
@Override
@@ -297,6 +298,10 @@ public class NavigationBarController implements Callbacks,
*/
public void createNavigationBars(final boolean includeDefaultDisplay,
RegisterStatusBarResult result) {
if (updateNavbarForTaskbar()) {
return;
}
Display[] displays = mDisplayManager.getDisplays();
for (Display display : displays) {
if (includeDefaultDisplay || display.getDisplayId() != DEFAULT_DISPLAY) {