Loading packages/SystemUI/multivalentTests/src/com/android/systemui/scene/ui/viewmodel/SceneContainerHapticsViewModelTest.kt +2 −2 Original line number Diff line number Diff line Loading @@ -228,7 +228,7 @@ class SceneContainerHapticsViewModelTest : SysuiTestCase() { // WHEN the transition occurs sceneInteractor.setTransitionState(MutableStateFlow(validTransition)) runCurrent() assertThat(isUserInteracting).isFalse() assertThat(isUserInteracting).isTrue() // THEN the expected token plays without interaction properties assertThat(msdlPlayer.latestTokenPlayed).isEqualTo(MSDLToken.SWIPE_THRESHOLD_INDICATOR) Loading @@ -254,7 +254,7 @@ class SceneContainerHapticsViewModelTest : SysuiTestCase() { // WHEN the transition occurs sceneInteractor.setTransitionState(MutableStateFlow(validTransition)) runCurrent() assertThat(isUserInteracting).isFalse() assertThat(isUserInteracting).isTrue() // THEN the expected token plays without interaction properties assertThat(msdlPlayer.latestTokenPlayed).isEqualTo(MSDLToken.SWIPE_THRESHOLD_INDICATOR) Loading packages/SystemUI/multivalentTests/src/com/android/systemui/shade/NotificationPanelViewControllerBaseTest.java +2 −1 Original line number Diff line number Diff line Loading @@ -360,7 +360,8 @@ public class NotificationPanelViewControllerBaseTest extends SysuiTestCase { mTestScope.getBackgroundScope(), mFakeKeyguardRepository, mShadeRepository )); ), mKosmos.getSceneInteractor()); SystemClock systemClock = new FakeSystemClock(); mStatusBarStateController = new StatusBarStateControllerImpl( mUiEventLogger, Loading packages/SystemUI/multivalentTests/src/com/android/systemui/shade/QuickSettingsControllerImplBaseTest.java +2 −1 Original line number Diff line number Diff line Loading @@ -198,7 +198,8 @@ public class QuickSettingsControllerImplBaseTest extends SysuiTestCase { mTestScope.getBackgroundScope(), mKeyguardRepository, mShadeRepository )); ), mKosmos.getSceneInteractor()); when(mResources.getDimensionPixelSize( R.dimen.lockscreen_shade_qs_transition_distance)).thenReturn(DEFAULT_HEIGHT); Loading packages/SystemUI/src/com/android/systemui/scene/ui/viewmodel/SceneContainerHapticsViewModel.kt +4 −7 Original line number Diff line number Diff line Loading @@ -57,13 +57,10 @@ constructor( /** Should haptics be played by pulling down the shade */ private val isShadePullHapticsRequired: Flow<Boolean> = combine( shadeInteractor.isUserInteracting, sceneInteractor.transitionState, sceneInteractor.isRemoteUserInteractionOngoing, ) { interacting, transitionState, remoteInteractionGoing -> val validInteraction = interacting || remoteInteractionGoing validInteraction && transitionState.isValidForShadePullHaptics() combine(shadeInteractor.isUserInteracting, sceneInteractor.transitionState) { interacting, transitionState -> interacting && transitionState.isValidForShadePullHaptics() } .distinctUntilChanged() Loading packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractor.kt +2 −1 Original line number Diff line number Diff line Loading @@ -47,7 +47,8 @@ interface ShadeInteractor : BaseShadeInteractor { /** * Whether the user is expanding or collapsing either the shade or quick settings with user * input (i.e. dragging a pointer). This will be true even if the user's input gesture had ended * but a transition they initiated is still animating. * but a transition they initiated is still animating. It will also be true if the gesture was * originated by the user but outside of System UI. */ val isUserInteracting: StateFlow<Boolean> Loading Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/scene/ui/viewmodel/SceneContainerHapticsViewModelTest.kt +2 −2 Original line number Diff line number Diff line Loading @@ -228,7 +228,7 @@ class SceneContainerHapticsViewModelTest : SysuiTestCase() { // WHEN the transition occurs sceneInteractor.setTransitionState(MutableStateFlow(validTransition)) runCurrent() assertThat(isUserInteracting).isFalse() assertThat(isUserInteracting).isTrue() // THEN the expected token plays without interaction properties assertThat(msdlPlayer.latestTokenPlayed).isEqualTo(MSDLToken.SWIPE_THRESHOLD_INDICATOR) Loading @@ -254,7 +254,7 @@ class SceneContainerHapticsViewModelTest : SysuiTestCase() { // WHEN the transition occurs sceneInteractor.setTransitionState(MutableStateFlow(validTransition)) runCurrent() assertThat(isUserInteracting).isFalse() assertThat(isUserInteracting).isTrue() // THEN the expected token plays without interaction properties assertThat(msdlPlayer.latestTokenPlayed).isEqualTo(MSDLToken.SWIPE_THRESHOLD_INDICATOR) Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/shade/NotificationPanelViewControllerBaseTest.java +2 −1 Original line number Diff line number Diff line Loading @@ -360,7 +360,8 @@ public class NotificationPanelViewControllerBaseTest extends SysuiTestCase { mTestScope.getBackgroundScope(), mFakeKeyguardRepository, mShadeRepository )); ), mKosmos.getSceneInteractor()); SystemClock systemClock = new FakeSystemClock(); mStatusBarStateController = new StatusBarStateControllerImpl( mUiEventLogger, Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/shade/QuickSettingsControllerImplBaseTest.java +2 −1 Original line number Diff line number Diff line Loading @@ -198,7 +198,8 @@ public class QuickSettingsControllerImplBaseTest extends SysuiTestCase { mTestScope.getBackgroundScope(), mKeyguardRepository, mShadeRepository )); ), mKosmos.getSceneInteractor()); when(mResources.getDimensionPixelSize( R.dimen.lockscreen_shade_qs_transition_distance)).thenReturn(DEFAULT_HEIGHT); Loading
packages/SystemUI/src/com/android/systemui/scene/ui/viewmodel/SceneContainerHapticsViewModel.kt +4 −7 Original line number Diff line number Diff line Loading @@ -57,13 +57,10 @@ constructor( /** Should haptics be played by pulling down the shade */ private val isShadePullHapticsRequired: Flow<Boolean> = combine( shadeInteractor.isUserInteracting, sceneInteractor.transitionState, sceneInteractor.isRemoteUserInteractionOngoing, ) { interacting, transitionState, remoteInteractionGoing -> val validInteraction = interacting || remoteInteractionGoing validInteraction && transitionState.isValidForShadePullHaptics() combine(shadeInteractor.isUserInteracting, sceneInteractor.transitionState) { interacting, transitionState -> interacting && transitionState.isValidForShadePullHaptics() } .distinctUntilChanged() Loading
packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractor.kt +2 −1 Original line number Diff line number Diff line Loading @@ -47,7 +47,8 @@ interface ShadeInteractor : BaseShadeInteractor { /** * Whether the user is expanding or collapsing either the shade or quick settings with user * input (i.e. dragging a pointer). This will be true even if the user's input gesture had ended * but a transition they initiated is still animating. * but a transition they initiated is still animating. It will also be true if the gesture was * originated by the user but outside of System UI. */ val isUserInteracting: StateFlow<Boolean> Loading