Merge "Show nav bar on secondary displays regardless of" into sc-v2-dev am: ee998ebc7c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16211956 Change-Id: Ic53b1e26ee32eda9940f878316ec0141edce92a2
This commit is contained in:
@@ -222,13 +222,12 @@ public class NavigationBarController implements
|
|||||||
*/
|
*/
|
||||||
public void createNavigationBars(final boolean includeDefaultDisplay,
|
public void createNavigationBars(final boolean includeDefaultDisplay,
|
||||||
RegisterStatusBarResult result) {
|
RegisterStatusBarResult result) {
|
||||||
if (initializeTaskbarIfNecessary()) {
|
// Don't need to create nav bar on the default display if we initialize TaskBar.
|
||||||
return;
|
final boolean shouldCreateDefaultNavbar = includeDefaultDisplay
|
||||||
}
|
&& !initializeTaskbarIfNecessary();
|
||||||
|
|
||||||
Display[] displays = mDisplayManager.getDisplays();
|
Display[] displays = mDisplayManager.getDisplays();
|
||||||
for (Display display : displays) {
|
for (Display display : displays) {
|
||||||
if (includeDefaultDisplay || display.getDisplayId() != DEFAULT_DISPLAY) {
|
if (shouldCreateDefaultNavbar || display.getDisplayId() != DEFAULT_DISPLAY) {
|
||||||
createNavigationBar(display, null /* savedState */, result);
|
createNavigationBar(display, null /* savedState */, result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -246,12 +245,15 @@ public class NavigationBarController implements
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mIsTablet) {
|
final int displayId = display.getDisplayId();
|
||||||
|
final boolean isOnDefaultDisplay = displayId == DEFAULT_DISPLAY;
|
||||||
|
|
||||||
|
// We may show TaskBar on the default display for large screen device. Don't need to create
|
||||||
|
// navigation bar for this case.
|
||||||
|
if (mIsTablet && isOnDefaultDisplay) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final int displayId = display.getDisplayId();
|
|
||||||
final boolean isOnDefaultDisplay = displayId == DEFAULT_DISPLAY;
|
|
||||||
final IWindowManager wms = WindowManagerGlobal.getWindowManagerService();
|
final IWindowManager wms = WindowManagerGlobal.getWindowManagerService();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user