Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/view/NotificationScrollView.kt +3 −0 Original line number Diff line number Diff line Loading @@ -86,6 +86,9 @@ interface NotificationScrollView { /** Sets whether the view is displayed in doze mode. */ fun setDozing(dozing: Boolean) /** Sets whether the view is displayed in pulsing mode. */ fun setPulsing(pulsing: Boolean, animated: Boolean) /** Gets the inset for HUNs when they are not visible */ fun getHeadsUpInset(): Int Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewbinder/NotificationScrollViewBinder.kt +5 −0 Original line number Diff line number Diff line Loading @@ -88,6 +88,11 @@ constructor( launch { viewModel.qsExpandFraction.collect { view.setQsExpandFraction(it) } } launch { viewModel.isScrollable.collect { view.setScrollingEnabled(it) } } launch { viewModel.isDozing.collect { isDozing -> view.setDozing(isDozing) } } launch { viewModel.isPulsing.collect { isPulsing -> view.setPulsing(isPulsing, viewModel.shouldAnimatePulse.value) } } launch { viewModel.shouldResetStackTop .filter { it } Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/NotificationScrollViewModel.kt +19 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,8 @@ import dagger.Lazy import dagger.assisted.AssistedFactory import dagger.assisted.AssistedInject import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.StateFlow import kotlinx.coroutines.flow.combine import kotlinx.coroutines.flow.distinctUntilChanged import kotlinx.coroutines.flow.flowOf Loading Loading @@ -213,6 +215,23 @@ constructor( } } /** Whether the notification stack is displayed in pulsing mode. */ val isPulsing: Flow<Boolean> by lazy { if (SceneContainerFlag.isUnexpectedlyInLegacyMode()) { flowOf(false) } else { keyguardInteractor.get().isPulsing.dumpWhileCollecting("isPulsing") } } val shouldAnimatePulse: StateFlow<Boolean> by lazy { if (SceneContainerFlag.isUnexpectedlyInLegacyMode()) { MutableStateFlow(false) } else { keyguardInteractor.get().isAodAvailable } } @AssistedFactory interface Factory { fun create(): NotificationScrollViewModel Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeScrimController.java +6 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import com.android.systemui.doze.DozeHost; import com.android.systemui.doze.DozeLog; import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.plugins.statusbar.StatusBarStateController.StateListener; import com.android.systemui.scene.shared.flag.SceneContainerFlag; import javax.inject.Inject; Loading Loading @@ -124,6 +125,11 @@ public class DozeScrimController implements StateListener { // Begin pulse. Note that it's very important that the pulse finished callback // be invoked when we're done so that the caller can drop the pulse wakelock. if (SceneContainerFlag.isEnabled()) { // ScrimController.Callback#onDisplayBlanked is no longer triggered when flexiglass is // on, but we still need to signal that pulsing has started. callback.onPulseStarted(); } mPulseCallback = callback; mPulseReason = reason; } Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/view/NotificationScrollView.kt +3 −0 Original line number Diff line number Diff line Loading @@ -86,6 +86,9 @@ interface NotificationScrollView { /** Sets whether the view is displayed in doze mode. */ fun setDozing(dozing: Boolean) /** Sets whether the view is displayed in pulsing mode. */ fun setPulsing(pulsing: Boolean, animated: Boolean) /** Gets the inset for HUNs when they are not visible */ fun getHeadsUpInset(): Int Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewbinder/NotificationScrollViewBinder.kt +5 −0 Original line number Diff line number Diff line Loading @@ -88,6 +88,11 @@ constructor( launch { viewModel.qsExpandFraction.collect { view.setQsExpandFraction(it) } } launch { viewModel.isScrollable.collect { view.setScrollingEnabled(it) } } launch { viewModel.isDozing.collect { isDozing -> view.setDozing(isDozing) } } launch { viewModel.isPulsing.collect { isPulsing -> view.setPulsing(isPulsing, viewModel.shouldAnimatePulse.value) } } launch { viewModel.shouldResetStackTop .filter { it } Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/NotificationScrollViewModel.kt +19 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,8 @@ import dagger.Lazy import dagger.assisted.AssistedFactory import dagger.assisted.AssistedInject import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.StateFlow import kotlinx.coroutines.flow.combine import kotlinx.coroutines.flow.distinctUntilChanged import kotlinx.coroutines.flow.flowOf Loading Loading @@ -213,6 +215,23 @@ constructor( } } /** Whether the notification stack is displayed in pulsing mode. */ val isPulsing: Flow<Boolean> by lazy { if (SceneContainerFlag.isUnexpectedlyInLegacyMode()) { flowOf(false) } else { keyguardInteractor.get().isPulsing.dumpWhileCollecting("isPulsing") } } val shouldAnimatePulse: StateFlow<Boolean> by lazy { if (SceneContainerFlag.isUnexpectedlyInLegacyMode()) { MutableStateFlow(false) } else { keyguardInteractor.get().isAodAvailable } } @AssistedFactory interface Factory { fun create(): NotificationScrollViewModel Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeScrimController.java +6 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import com.android.systemui.doze.DozeHost; import com.android.systemui.doze.DozeLog; import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.plugins.statusbar.StatusBarStateController.StateListener; import com.android.systemui.scene.shared.flag.SceneContainerFlag; import javax.inject.Inject; Loading Loading @@ -124,6 +125,11 @@ public class DozeScrimController implements StateListener { // Begin pulse. Note that it's very important that the pulse finished callback // be invoked when we're done so that the caller can drop the pulse wakelock. if (SceneContainerFlag.isEnabled()) { // ScrimController.Callback#onDisplayBlanked is no longer triggered when flexiglass is // on, but we still need to signal that pulsing has started. callback.onPulseStarted(); } mPulseCallback = callback; mPulseReason = reason; } Loading