Loading packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java +3 −0 Original line number Diff line number Diff line Loading @@ -1842,6 +1842,9 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump /** Returns extra space available to show the shelf on lockscreen */ @VisibleForTesting float getVerticalSpaceForLockscreenShelf() { if (mSplitShadeEnabled) { return 0f; } final float lockIconPadding = getLockIconPadding(); final float noShelfOverlapBottomPadding = Loading packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerTest.java +17 −0 Original line number Diff line number Diff line Loading @@ -197,6 +197,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo @Test public void getVerticalSpaceForLockscreenShelf_useLockIconBottomPadding_returnsShelfHeight() { enableSplitShade(/* enabled= */ false); setBottomPadding(/* stackScrollLayoutBottom= */ 100, /* lockIconPadding= */ 20, /* indicationPadding= */ 0, Loading @@ -209,6 +210,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo @Test public void getVerticalSpaceForLockscreenShelf_useIndicationBottomPadding_returnsZero() { enableSplitShade(/* enabled= */ false); setBottomPadding(/* stackScrollLayoutBottom= */ 100, /* lockIconPadding= */ 0, /* indicationPadding= */ 30, Loading @@ -221,6 +223,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo @Test public void getVerticalSpaceForLockscreenShelf_useAmbientBottomPadding_returnsZero() { enableSplitShade(/* enabled= */ false); setBottomPadding(/* stackScrollLayoutBottom= */ 100, /* lockIconPadding= */ 0, /* indicationPadding= */ 0, Loading @@ -233,6 +236,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo @Test public void getVerticalSpaceForLockscreenShelf_useLockIconPadding_returnsLessThanShelfHeight() { enableSplitShade(/* enabled= */ false); setBottomPadding(/* stackScrollLayoutBottom= */ 100, /* lockIconPadding= */ 10, /* indicationPadding= */ 8, Loading @@ -243,6 +247,19 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo .isEqualTo(2); } @Test public void getVerticalSpaceForLockscreenShelf_splitShade() { enableSplitShade(/* enabled= */ true); setBottomPadding(/* stackScrollLayoutBottom= */ 100, /* lockIconPadding= */ 10, /* indicationPadding= */ 8, /* ambientPadding= */ 0); when(mNotificationShelfController.getIntrinsicHeight()).thenReturn(5); assertThat(mNotificationPanelViewController.getVerticalSpaceForLockscreenShelf()) .isEqualTo(0); } @Test public void testSetPanelScrimMinFractionWhenHeadsUpIsDragged() { mNotificationPanelViewController.setHeadsUpDraggingStartingHeight( Loading Loading
packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java +3 −0 Original line number Diff line number Diff line Loading @@ -1842,6 +1842,9 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump /** Returns extra space available to show the shelf on lockscreen */ @VisibleForTesting float getVerticalSpaceForLockscreenShelf() { if (mSplitShadeEnabled) { return 0f; } final float lockIconPadding = getLockIconPadding(); final float noShelfOverlapBottomPadding = Loading
packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerTest.java +17 −0 Original line number Diff line number Diff line Loading @@ -197,6 +197,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo @Test public void getVerticalSpaceForLockscreenShelf_useLockIconBottomPadding_returnsShelfHeight() { enableSplitShade(/* enabled= */ false); setBottomPadding(/* stackScrollLayoutBottom= */ 100, /* lockIconPadding= */ 20, /* indicationPadding= */ 0, Loading @@ -209,6 +210,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo @Test public void getVerticalSpaceForLockscreenShelf_useIndicationBottomPadding_returnsZero() { enableSplitShade(/* enabled= */ false); setBottomPadding(/* stackScrollLayoutBottom= */ 100, /* lockIconPadding= */ 0, /* indicationPadding= */ 30, Loading @@ -221,6 +223,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo @Test public void getVerticalSpaceForLockscreenShelf_useAmbientBottomPadding_returnsZero() { enableSplitShade(/* enabled= */ false); setBottomPadding(/* stackScrollLayoutBottom= */ 100, /* lockIconPadding= */ 0, /* indicationPadding= */ 0, Loading @@ -233,6 +236,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo @Test public void getVerticalSpaceForLockscreenShelf_useLockIconPadding_returnsLessThanShelfHeight() { enableSplitShade(/* enabled= */ false); setBottomPadding(/* stackScrollLayoutBottom= */ 100, /* lockIconPadding= */ 10, /* indicationPadding= */ 8, Loading @@ -243,6 +247,19 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo .isEqualTo(2); } @Test public void getVerticalSpaceForLockscreenShelf_splitShade() { enableSplitShade(/* enabled= */ true); setBottomPadding(/* stackScrollLayoutBottom= */ 100, /* lockIconPadding= */ 10, /* indicationPadding= */ 8, /* ambientPadding= */ 0); when(mNotificationShelfController.getIntrinsicHeight()).thenReturn(5); assertThat(mNotificationPanelViewController.getVerticalSpaceForLockscreenShelf()) .isEqualTo(0); } @Test public void testSetPanelScrimMinFractionWhenHeadsUpIsDragged() { mNotificationPanelViewController.setHeadsUpDraggingStartingHeight( Loading