Loading packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java +9 −1 Original line number Diff line number Diff line Loading @@ -122,6 +122,7 @@ import com.android.systemui.dagger.SysUISingleton; import com.android.systemui.dagger.qualifiers.DisplayId; import com.android.systemui.dagger.qualifiers.Main; import com.android.systemui.deviceentry.domain.interactor.DeviceEntryFaceAuthInteractor; import com.android.systemui.deviceentry.shared.DeviceEntryUdfpsRefactor; import com.android.systemui.doze.DozeLog; import com.android.systemui.dump.DumpManager; import com.android.systemui.dump.DumpsysTableLogger; Loading Loading @@ -1825,7 +1826,14 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump /** Returns space between top of lock icon and bottom of NotificationStackScrollLayout. */ private float getLockIconPadding() { float lockIconPadding = 0f; if (mLockIconViewController.getTop() != 0f) { if (DeviceEntryUdfpsRefactor.isEnabled()) { View deviceEntryIconView = mKeyguardViewConfigurator.getKeyguardRootView() .findViewById(R.id.device_entry_icon_view); if (deviceEntryIconView != null) { lockIconPadding = mNotificationStackScrollLayoutController.getBottom() - deviceEntryIconView.getTop(); } } else if (mLockIconViewController.getTop() != 0f) { lockIconPadding = mNotificationStackScrollLayoutController.getBottom() - mLockIconViewController.getTop(); } Loading packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerBaseTest.java +8 −0 Original line number Diff line number Diff line Loading @@ -103,6 +103,7 @@ import com.android.systemui.keyguard.domain.interactor.KeyguardInteractor; import com.android.systemui.keyguard.domain.interactor.KeyguardInteractorFactory; import com.android.systemui.keyguard.domain.interactor.KeyguardTransitionInteractor; import com.android.systemui.keyguard.domain.interactor.NaturalScrollingSettingObserver; import com.android.systemui.keyguard.ui.view.KeyguardRootView; import com.android.systemui.keyguard.ui.viewmodel.DreamingToLockscreenTransitionViewModel; import com.android.systemui.keyguard.ui.viewmodel.GoneToDreamingLockscreenHostedTransitionViewModel; import com.android.systemui.keyguard.ui.viewmodel.GoneToDreamingTransitionViewModel; Loading Loading @@ -280,6 +281,8 @@ public class NotificationPanelViewControllerBaseTest extends SysuiTestCase { @Mock protected UiEventLogger mUiEventLogger; @Mock protected LockIconViewController mLockIconViewController; @Mock protected KeyguardViewConfigurator mKeyguardViewConfigurator; @Mock protected KeyguardRootView mKeyguardRootView; @Mock protected View mKeyguardRootViewChild; @Mock protected KeyguardMediaController mKeyguardMediaController; @Mock protected NavigationModeController mNavigationModeController; @Mock protected NavigationBarController mNavigationBarController; Loading Loading @@ -389,6 +392,7 @@ public class NotificationPanelViewControllerBaseTest extends SysuiTestCase { mSetFlagsRule.disableFlags(com.android.systemui.Flags.FLAG_KEYGUARD_BOTTOM_AREA_REFACTOR); mSetFlagsRule.disableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT); mSetFlagsRule.disableFlags(com.android.systemui.Flags.FLAG_DEVICE_ENTRY_UDFPS_REFACTOR); mMainDispatcher = getMainDispatcher(); KeyguardInteractorFactory.WithDependencies keyguardInteractorDeps = Loading Loading @@ -835,6 +839,10 @@ public class NotificationPanelViewControllerBaseTest extends SysuiTestCase { when(mNotificationStackScrollLayoutController.getBottom()).thenReturn(stackBottom); when(mLockIconViewController.getTop()).thenReturn((float) (stackBottom - lockIconPadding)); when(mKeyguardRootViewChild.getTop()).thenReturn((int) (stackBottom - lockIconPadding)); when(mKeyguardRootView.findViewById(anyInt())).thenReturn(mKeyguardRootViewChild); when(mKeyguardViewConfigurator.getKeyguardRootView()).thenReturn(mKeyguardRootView); when(mResources.getDimensionPixelSize(R.dimen.keyguard_indication_bottom_padding)) .thenReturn(indicationPadding); mNotificationPanelViewController.loadDimens(); Loading packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerTest.java +20 −0 Original line number Diff line number Diff line Loading @@ -203,6 +203,10 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo when(mNotificationStackScrollLayoutController.getShelfHeight()).thenReturn(5); assertThat(mNotificationPanelViewController.getVerticalSpaceForLockscreenShelf()) .isEqualTo(5); mSetFlagsRule.enableFlags(com.android.systemui.Flags.FLAG_DEVICE_ENTRY_UDFPS_REFACTOR); assertThat(mNotificationPanelViewController.getVerticalSpaceForLockscreenShelf()) .isEqualTo(5); } @Test Loading @@ -216,6 +220,10 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo when(mNotificationStackScrollLayoutController.getShelfHeight()).thenReturn(5); assertThat(mNotificationPanelViewController.getVerticalSpaceForLockscreenShelf()) .isEqualTo(0); mSetFlagsRule.enableFlags(com.android.systemui.Flags.FLAG_DEVICE_ENTRY_UDFPS_REFACTOR); assertThat(mNotificationPanelViewController.getVerticalSpaceForLockscreenShelf()) .isEqualTo(0); } @Test Loading @@ -229,6 +237,10 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo when(mNotificationStackScrollLayoutController.getShelfHeight()).thenReturn(5); assertThat(mNotificationPanelViewController.getVerticalSpaceForLockscreenShelf()) .isEqualTo(0); mSetFlagsRule.enableFlags(com.android.systemui.Flags.FLAG_DEVICE_ENTRY_UDFPS_REFACTOR); assertThat(mNotificationPanelViewController.getVerticalSpaceForLockscreenShelf()) .isEqualTo(0); } @Test Loading @@ -242,6 +254,10 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo when(mNotificationStackScrollLayoutController.getShelfHeight()).thenReturn(5); assertThat(mNotificationPanelViewController.getVerticalSpaceForLockscreenShelf()) .isEqualTo(2); mSetFlagsRule.enableFlags(com.android.systemui.Flags.FLAG_DEVICE_ENTRY_UDFPS_REFACTOR); assertThat(mNotificationPanelViewController.getVerticalSpaceForLockscreenShelf()) .isEqualTo(2); } @Test Loading @@ -255,6 +271,10 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo when(mNotificationStackScrollLayoutController.getShelfHeight()).thenReturn(5); assertThat(mNotificationPanelViewController.getVerticalSpaceForLockscreenShelf()) .isEqualTo(0); mSetFlagsRule.enableFlags(com.android.systemui.Flags.FLAG_DEVICE_ENTRY_UDFPS_REFACTOR); assertThat(mNotificationPanelViewController.getVerticalSpaceForLockscreenShelf()) .isEqualTo(0); } @Test Loading Loading
packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java +9 −1 Original line number Diff line number Diff line Loading @@ -122,6 +122,7 @@ import com.android.systemui.dagger.SysUISingleton; import com.android.systemui.dagger.qualifiers.DisplayId; import com.android.systemui.dagger.qualifiers.Main; import com.android.systemui.deviceentry.domain.interactor.DeviceEntryFaceAuthInteractor; import com.android.systemui.deviceentry.shared.DeviceEntryUdfpsRefactor; import com.android.systemui.doze.DozeLog; import com.android.systemui.dump.DumpManager; import com.android.systemui.dump.DumpsysTableLogger; Loading Loading @@ -1825,7 +1826,14 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump /** Returns space between top of lock icon and bottom of NotificationStackScrollLayout. */ private float getLockIconPadding() { float lockIconPadding = 0f; if (mLockIconViewController.getTop() != 0f) { if (DeviceEntryUdfpsRefactor.isEnabled()) { View deviceEntryIconView = mKeyguardViewConfigurator.getKeyguardRootView() .findViewById(R.id.device_entry_icon_view); if (deviceEntryIconView != null) { lockIconPadding = mNotificationStackScrollLayoutController.getBottom() - deviceEntryIconView.getTop(); } } else if (mLockIconViewController.getTop() != 0f) { lockIconPadding = mNotificationStackScrollLayoutController.getBottom() - mLockIconViewController.getTop(); } Loading
packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerBaseTest.java +8 −0 Original line number Diff line number Diff line Loading @@ -103,6 +103,7 @@ import com.android.systemui.keyguard.domain.interactor.KeyguardInteractor; import com.android.systemui.keyguard.domain.interactor.KeyguardInteractorFactory; import com.android.systemui.keyguard.domain.interactor.KeyguardTransitionInteractor; import com.android.systemui.keyguard.domain.interactor.NaturalScrollingSettingObserver; import com.android.systemui.keyguard.ui.view.KeyguardRootView; import com.android.systemui.keyguard.ui.viewmodel.DreamingToLockscreenTransitionViewModel; import com.android.systemui.keyguard.ui.viewmodel.GoneToDreamingLockscreenHostedTransitionViewModel; import com.android.systemui.keyguard.ui.viewmodel.GoneToDreamingTransitionViewModel; Loading Loading @@ -280,6 +281,8 @@ public class NotificationPanelViewControllerBaseTest extends SysuiTestCase { @Mock protected UiEventLogger mUiEventLogger; @Mock protected LockIconViewController mLockIconViewController; @Mock protected KeyguardViewConfigurator mKeyguardViewConfigurator; @Mock protected KeyguardRootView mKeyguardRootView; @Mock protected View mKeyguardRootViewChild; @Mock protected KeyguardMediaController mKeyguardMediaController; @Mock protected NavigationModeController mNavigationModeController; @Mock protected NavigationBarController mNavigationBarController; Loading Loading @@ -389,6 +392,7 @@ public class NotificationPanelViewControllerBaseTest extends SysuiTestCase { mSetFlagsRule.disableFlags(com.android.systemui.Flags.FLAG_KEYGUARD_BOTTOM_AREA_REFACTOR); mSetFlagsRule.disableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT); mSetFlagsRule.disableFlags(com.android.systemui.Flags.FLAG_DEVICE_ENTRY_UDFPS_REFACTOR); mMainDispatcher = getMainDispatcher(); KeyguardInteractorFactory.WithDependencies keyguardInteractorDeps = Loading Loading @@ -835,6 +839,10 @@ public class NotificationPanelViewControllerBaseTest extends SysuiTestCase { when(mNotificationStackScrollLayoutController.getBottom()).thenReturn(stackBottom); when(mLockIconViewController.getTop()).thenReturn((float) (stackBottom - lockIconPadding)); when(mKeyguardRootViewChild.getTop()).thenReturn((int) (stackBottom - lockIconPadding)); when(mKeyguardRootView.findViewById(anyInt())).thenReturn(mKeyguardRootViewChild); when(mKeyguardViewConfigurator.getKeyguardRootView()).thenReturn(mKeyguardRootView); when(mResources.getDimensionPixelSize(R.dimen.keyguard_indication_bottom_padding)) .thenReturn(indicationPadding); mNotificationPanelViewController.loadDimens(); Loading
packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerTest.java +20 −0 Original line number Diff line number Diff line Loading @@ -203,6 +203,10 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo when(mNotificationStackScrollLayoutController.getShelfHeight()).thenReturn(5); assertThat(mNotificationPanelViewController.getVerticalSpaceForLockscreenShelf()) .isEqualTo(5); mSetFlagsRule.enableFlags(com.android.systemui.Flags.FLAG_DEVICE_ENTRY_UDFPS_REFACTOR); assertThat(mNotificationPanelViewController.getVerticalSpaceForLockscreenShelf()) .isEqualTo(5); } @Test Loading @@ -216,6 +220,10 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo when(mNotificationStackScrollLayoutController.getShelfHeight()).thenReturn(5); assertThat(mNotificationPanelViewController.getVerticalSpaceForLockscreenShelf()) .isEqualTo(0); mSetFlagsRule.enableFlags(com.android.systemui.Flags.FLAG_DEVICE_ENTRY_UDFPS_REFACTOR); assertThat(mNotificationPanelViewController.getVerticalSpaceForLockscreenShelf()) .isEqualTo(0); } @Test Loading @@ -229,6 +237,10 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo when(mNotificationStackScrollLayoutController.getShelfHeight()).thenReturn(5); assertThat(mNotificationPanelViewController.getVerticalSpaceForLockscreenShelf()) .isEqualTo(0); mSetFlagsRule.enableFlags(com.android.systemui.Flags.FLAG_DEVICE_ENTRY_UDFPS_REFACTOR); assertThat(mNotificationPanelViewController.getVerticalSpaceForLockscreenShelf()) .isEqualTo(0); } @Test Loading @@ -242,6 +254,10 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo when(mNotificationStackScrollLayoutController.getShelfHeight()).thenReturn(5); assertThat(mNotificationPanelViewController.getVerticalSpaceForLockscreenShelf()) .isEqualTo(2); mSetFlagsRule.enableFlags(com.android.systemui.Flags.FLAG_DEVICE_ENTRY_UDFPS_REFACTOR); assertThat(mNotificationPanelViewController.getVerticalSpaceForLockscreenShelf()) .isEqualTo(2); } @Test Loading @@ -255,6 +271,10 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo when(mNotificationStackScrollLayoutController.getShelfHeight()).thenReturn(5); assertThat(mNotificationPanelViewController.getVerticalSpaceForLockscreenShelf()) .isEqualTo(0); mSetFlagsRule.enableFlags(com.android.systemui.Flags.FLAG_DEVICE_ENTRY_UDFPS_REFACTOR); assertThat(mNotificationPanelViewController.getVerticalSpaceForLockscreenShelf()) .isEqualTo(0); } @Test Loading