Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1e164d4a authored by Charles Chen's avatar Charles Chen
Browse files

Fix multi-display nav bar tests on large screen devices

Tests failed because #createnavigationBar skip create nav bar even on
the secondary display if there's a task bar initialized.
This CL changes to only check on the default display instead.

fixes: 241509471
Test: atest MultiDisplaySystemDecorationTests#testNavBarShowingOnDisplayWithDecor
Test: atest MultiDisplaySystemDecorationTests#testNavBarNotShowingOnDisplayWithoutDecor
Test: atest MultiDisplaySystemDecorationTests#testNavBarNotShowingOnPrivateDisplay
Change-Id: Ibdd5fb65a92915ac92e908c0091260573cec18c8
parent 7c093004
Loading
Loading
Loading
Loading
+1 −5
Original line number Original line Diff line number Diff line
@@ -302,10 +302,6 @@ public class NavigationBarController implements
     */
     */
    @VisibleForTesting
    @VisibleForTesting
    void createNavigationBar(Display display, Bundle savedState, RegisterStatusBarResult result) {
    void createNavigationBar(Display display, Bundle savedState, RegisterStatusBarResult result) {
        if (initializeTaskbarIfNecessary()) {
            return;
        }

        if (display == null) {
        if (display == null) {
            return;
            return;
        }
        }
@@ -315,7 +311,7 @@ public class NavigationBarController implements


        // We may show TaskBar on the default display for large screen device. Don't need to create
        // We may show TaskBar on the default display for large screen device. Don't need to create
        // navigation bar for this case.
        // navigation bar for this case.
        if (mIsTablet && isOnDefaultDisplay) {
        if (isOnDefaultDisplay && initializeTaskbarIfNecessary()) {
            return;
            return;
        }
        }