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

Commit 8373aec1 authored by Yunfan Chen's avatar Yunfan Chen Committed by Android (Google) Code Review
Browse files

Merge "Make sure nav bar has height in test display"

parents 9ff04bdc 8aeff92e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2291,7 +2291,8 @@ public class DisplayPolicy {
        return width;
    }

    private int getNavigationBarHeight(int rotation, int uiMode) {
    @VisibleForTesting
    int getNavigationBarHeight(int rotation, int uiMode) {
        if (INSETS_LAYOUT_GENERALIZATION) {
            if (mNavigationBar == null) {
                return 0;
+2 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
import static android.view.DisplayAdjustments.DEFAULT_DISPLAY_ADJUSTMENTS;

import static com.android.dx.mockito.inline.extended.ExtendedMockito.anyBoolean;
import static com.android.dx.mockito.inline.extended.ExtendedMockito.anyInt;
import static com.android.dx.mockito.inline.extended.ExtendedMockito.doAnswer;
import static com.android.dx.mockito.inline.extended.ExtendedMockito.doNothing;
import static com.android.dx.mockito.inline.extended.ExtendedMockito.doReturn;
@@ -153,6 +154,7 @@ class TestDisplayContent extends DisplayContent {
            if (mSystemDecorations) {
                doReturn(true).when(newDisplay).supportsSystemDecorations();
                doReturn(true).when(displayPolicy).hasNavigationBar();
                doReturn(20).when(displayPolicy).getNavigationBarHeight(anyInt(), anyInt());
            } else {
                doReturn(false).when(displayPolicy).hasNavigationBar();
                doReturn(false).when(displayPolicy).hasStatusBar();