Loading services/tests/wmtests/src/com/android/server/wm/DisplayPolicyInsetsTests.java +32 −8 Original line number Diff line number Diff line Loading @@ -66,8 +66,14 @@ public class DisplayPolicyInsetsTests extends DisplayPolicyTestsBase { public void landscape() { final DisplayInfo di = displayInfoForRotation(ROTATION_90, false /* withCutout */); if (mDisplayPolicy.navigationBarCanMove()) { verifyStableInsets(di, 0, STATUS_BAR_HEIGHT, NAV_BAR_HEIGHT, 0); verifyNonDecorInsets(di, 0, 0, NAV_BAR_HEIGHT, 0); } else { // if the navigation bar cannot move then it is always on the bottom verifyStableInsets(di, 0, STATUS_BAR_HEIGHT, 0, NAV_BAR_HEIGHT); verifyNonDecorInsets(di, 0, 0, 0, NAV_BAR_HEIGHT); } verifyConsistency(di); } Loading @@ -75,8 +81,14 @@ public class DisplayPolicyInsetsTests extends DisplayPolicyTestsBase { public void landscape_withCutout() { final DisplayInfo di = displayInfoForRotation(ROTATION_90, true /* withCutout */); if (mDisplayPolicy.navigationBarCanMove()) { verifyStableInsets(di, DISPLAY_CUTOUT_HEIGHT, STATUS_BAR_HEIGHT, NAV_BAR_HEIGHT, 0); verifyNonDecorInsets(di, DISPLAY_CUTOUT_HEIGHT, 0, NAV_BAR_HEIGHT, 0); } else { // if the navigation bar cannot move then it is always on the bottom verifyStableInsets(di, DISPLAY_CUTOUT_HEIGHT, STATUS_BAR_HEIGHT, 0, NAV_BAR_HEIGHT); verifyNonDecorInsets(di, DISPLAY_CUTOUT_HEIGHT, 0, 0, NAV_BAR_HEIGHT); } verifyConsistency(di); } Loading @@ -84,8 +96,14 @@ public class DisplayPolicyInsetsTests extends DisplayPolicyTestsBase { public void seascape() { final DisplayInfo di = displayInfoForRotation(ROTATION_270, false /* withCutout */); if (mDisplayPolicy.navigationBarCanMove()) { verifyStableInsets(di, NAV_BAR_HEIGHT, STATUS_BAR_HEIGHT, 0, 0); verifyNonDecorInsets(di, NAV_BAR_HEIGHT, 0, 0, 0); } else { // if the navigation bar cannot move then it is always on the bottom verifyStableInsets(di, 0, STATUS_BAR_HEIGHT, 0, NAV_BAR_HEIGHT); verifyNonDecorInsets(di, 0, 0, 0, NAV_BAR_HEIGHT); } verifyConsistency(di); } Loading @@ -93,8 +111,14 @@ public class DisplayPolicyInsetsTests extends DisplayPolicyTestsBase { public void seascape_withCutout() { final DisplayInfo di = displayInfoForRotation(ROTATION_270, true /* withCutout */); if (mDisplayPolicy.navigationBarCanMove()) { verifyStableInsets(di, NAV_BAR_HEIGHT, STATUS_BAR_HEIGHT, DISPLAY_CUTOUT_HEIGHT, 0); verifyNonDecorInsets(di, NAV_BAR_HEIGHT, 0, DISPLAY_CUTOUT_HEIGHT, 0); } else { // if the navigation bar cannot move then it is always on the bottom verifyStableInsets(di, 0, STATUS_BAR_HEIGHT, DISPLAY_CUTOUT_HEIGHT, NAV_BAR_HEIGHT); verifyNonDecorInsets(di, 0, 0, DISPLAY_CUTOUT_HEIGHT, NAV_BAR_HEIGHT); } verifyConsistency(di); } Loading Loading
services/tests/wmtests/src/com/android/server/wm/DisplayPolicyInsetsTests.java +32 −8 Original line number Diff line number Diff line Loading @@ -66,8 +66,14 @@ public class DisplayPolicyInsetsTests extends DisplayPolicyTestsBase { public void landscape() { final DisplayInfo di = displayInfoForRotation(ROTATION_90, false /* withCutout */); if (mDisplayPolicy.navigationBarCanMove()) { verifyStableInsets(di, 0, STATUS_BAR_HEIGHT, NAV_BAR_HEIGHT, 0); verifyNonDecorInsets(di, 0, 0, NAV_BAR_HEIGHT, 0); } else { // if the navigation bar cannot move then it is always on the bottom verifyStableInsets(di, 0, STATUS_BAR_HEIGHT, 0, NAV_BAR_HEIGHT); verifyNonDecorInsets(di, 0, 0, 0, NAV_BAR_HEIGHT); } verifyConsistency(di); } Loading @@ -75,8 +81,14 @@ public class DisplayPolicyInsetsTests extends DisplayPolicyTestsBase { public void landscape_withCutout() { final DisplayInfo di = displayInfoForRotation(ROTATION_90, true /* withCutout */); if (mDisplayPolicy.navigationBarCanMove()) { verifyStableInsets(di, DISPLAY_CUTOUT_HEIGHT, STATUS_BAR_HEIGHT, NAV_BAR_HEIGHT, 0); verifyNonDecorInsets(di, DISPLAY_CUTOUT_HEIGHT, 0, NAV_BAR_HEIGHT, 0); } else { // if the navigation bar cannot move then it is always on the bottom verifyStableInsets(di, DISPLAY_CUTOUT_HEIGHT, STATUS_BAR_HEIGHT, 0, NAV_BAR_HEIGHT); verifyNonDecorInsets(di, DISPLAY_CUTOUT_HEIGHT, 0, 0, NAV_BAR_HEIGHT); } verifyConsistency(di); } Loading @@ -84,8 +96,14 @@ public class DisplayPolicyInsetsTests extends DisplayPolicyTestsBase { public void seascape() { final DisplayInfo di = displayInfoForRotation(ROTATION_270, false /* withCutout */); if (mDisplayPolicy.navigationBarCanMove()) { verifyStableInsets(di, NAV_BAR_HEIGHT, STATUS_BAR_HEIGHT, 0, 0); verifyNonDecorInsets(di, NAV_BAR_HEIGHT, 0, 0, 0); } else { // if the navigation bar cannot move then it is always on the bottom verifyStableInsets(di, 0, STATUS_BAR_HEIGHT, 0, NAV_BAR_HEIGHT); verifyNonDecorInsets(di, 0, 0, 0, NAV_BAR_HEIGHT); } verifyConsistency(di); } Loading @@ -93,8 +111,14 @@ public class DisplayPolicyInsetsTests extends DisplayPolicyTestsBase { public void seascape_withCutout() { final DisplayInfo di = displayInfoForRotation(ROTATION_270, true /* withCutout */); if (mDisplayPolicy.navigationBarCanMove()) { verifyStableInsets(di, NAV_BAR_HEIGHT, STATUS_BAR_HEIGHT, DISPLAY_CUTOUT_HEIGHT, 0); verifyNonDecorInsets(di, NAV_BAR_HEIGHT, 0, DISPLAY_CUTOUT_HEIGHT, 0); } else { // if the navigation bar cannot move then it is always on the bottom verifyStableInsets(di, 0, STATUS_BAR_HEIGHT, DISPLAY_CUTOUT_HEIGHT, NAV_BAR_HEIGHT); verifyNonDecorInsets(di, 0, 0, DISPLAY_CUTOUT_HEIGHT, NAV_BAR_HEIGHT); } verifyConsistency(di); } Loading