Loading packages/SystemUI/src/com/android/systemui/statusbar/PulseExpansionHandler.kt +1 −0 Original line number Diff line number Diff line Loading @@ -149,6 +149,7 @@ constructor(context: Context, } isExpanding = false isWakingToShadeLocked = true mWakeUpCoordinator.willWakeUp = true mPowerManager!!.wakeUp(SystemClock.uptimeMillis(), WAKE_REASON_GESTURE, "com.android.systemui:PULSEDRAG") mShadeController!!.goToLockedShade(mStartingChild) Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinator.kt +28 −4 Original line number Diff line number Diff line Loading @@ -63,6 +63,25 @@ class NotificationWakeUpCoordinator @Inject constructor( private var mWakingUp = false private val mEntrySetToClearWhenFinished = mutableSetOf<NotificationEntry>() private val mDozeParameters: DozeParameters; var willWakeUp = false set(value) { if (value && mDozeAmount != 0.0f) { field = value } } var pulsing: Boolean = false set(value) { field = value if (value) { // Only when setting pulsing to true we want an immediate update, since we get // this already when the doze service finishes which is usually before we get // the waking up callback updateNotificationVisibility(animate = shouldAnimateVisibility(), increaseSpeed = false) } } init { mAmbientPulseManager.addListener(this) Loading Loading @@ -92,8 +111,9 @@ class NotificationWakeUpCoordinator @Inject constructor( } private fun updateNotificationVisibility(animate: Boolean, increaseSpeed: Boolean) { var visible = mNotificationsVisibleForExpansion || mAmbientPulseManager.hasNotifications() if (!visible && mNotificationsVisible && mWakingUp && mDozeAmount != 0.0f) { var visible = (mNotificationsVisibleForExpansion || mAmbientPulseManager.hasNotifications()) && pulsing; if (!visible && mNotificationsVisible && (mWakingUp || willWakeUp) && mDozeAmount != 0.0f) { // let's not make notifications invisible while waking up, otherwise the animation // is strange return; Loading Loading @@ -192,6 +212,7 @@ class NotificationWakeUpCoordinator @Inject constructor( } fun setWakingUp(wakingUp: Boolean) { willWakeUp = false mWakingUp = wakingUp if (wakingUp && mNotificationsVisible && !mNotificationsVisibleForExpansion) { // We're waking up while pulsing, let's make sure the animation looks nice Loading @@ -200,9 +221,9 @@ class NotificationWakeUpCoordinator @Inject constructor( } override fun onAmbientStateChanged(entry: NotificationEntry, isPulsing: Boolean) { var animate = mDozeParameters.getAlwaysOn() && !mDozeParameters.getDisplayNeedsBlanking() var animate = shouldAnimateVisibility() if (!isPulsing) { if (mLinearDozeAmount != 0.0f) { if (mLinearDozeAmount != 0.0f && mLinearVisibilityAmount != 0.0f) { if (entry.isRowDismissed) { // if we animate, we see the shelf briefly visible. Instead we fully animate // the notification and its background out Loading @@ -218,4 +239,7 @@ class NotificationWakeUpCoordinator @Inject constructor( } updateNotificationVisibility(animate, increaseSpeed = false) } private fun shouldAnimateVisibility() = mDozeParameters.getAlwaysOn() && !mDozeParameters.getDisplayNeedsBlanking() } No newline at end of file packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationMenuRow.java +1 −0 Original line number Diff line number Diff line Loading @@ -340,6 +340,7 @@ public class NotificationMenuRow implements NotificationMenuRowPlugin, View.OnCl && !NotificationStackScrollLayout.isPinnedHeadsUp(getParent()) && !mParent.areGutsExposed() && !mParent.isDark() && !mParent.showingAmbientPulsing() && (mCheckForDrag == null || !mHandler.hasCallbacks(mCheckForDrag))) { // Only show the menu if we're not a heads up view and guts aren't exposed. mCheckForDrag = new CheckForDrag(); Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/AmbientState.java +7 −0 Original line number Diff line number Diff line Loading @@ -395,6 +395,13 @@ public class AmbientState { mPulsing = hasPulsing; } /** * @return if we're pulsing in general */ public boolean isPulsing() { return mPulsing; } public boolean isPulsing(NotificationEntry entry) { if (!mPulsing || mAmbientPulseManager == null) { return false; Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationSection.java +1 −0 Original line number Diff line number Diff line Loading @@ -260,6 +260,7 @@ class NotificationSection { + ExpandableViewState.getFinalActualHeight(firstView)); if (shiftBackgroundWithFirst) { mBounds.left += Math.max(firstView.getTranslation(), 0); mBounds.right += Math.min(firstView.getTranslation(), 0); } } } Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/PulseExpansionHandler.kt +1 −0 Original line number Diff line number Diff line Loading @@ -149,6 +149,7 @@ constructor(context: Context, } isExpanding = false isWakingToShadeLocked = true mWakeUpCoordinator.willWakeUp = true mPowerManager!!.wakeUp(SystemClock.uptimeMillis(), WAKE_REASON_GESTURE, "com.android.systemui:PULSEDRAG") mShadeController!!.goToLockedShade(mStartingChild) Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinator.kt +28 −4 Original line number Diff line number Diff line Loading @@ -63,6 +63,25 @@ class NotificationWakeUpCoordinator @Inject constructor( private var mWakingUp = false private val mEntrySetToClearWhenFinished = mutableSetOf<NotificationEntry>() private val mDozeParameters: DozeParameters; var willWakeUp = false set(value) { if (value && mDozeAmount != 0.0f) { field = value } } var pulsing: Boolean = false set(value) { field = value if (value) { // Only when setting pulsing to true we want an immediate update, since we get // this already when the doze service finishes which is usually before we get // the waking up callback updateNotificationVisibility(animate = shouldAnimateVisibility(), increaseSpeed = false) } } init { mAmbientPulseManager.addListener(this) Loading Loading @@ -92,8 +111,9 @@ class NotificationWakeUpCoordinator @Inject constructor( } private fun updateNotificationVisibility(animate: Boolean, increaseSpeed: Boolean) { var visible = mNotificationsVisibleForExpansion || mAmbientPulseManager.hasNotifications() if (!visible && mNotificationsVisible && mWakingUp && mDozeAmount != 0.0f) { var visible = (mNotificationsVisibleForExpansion || mAmbientPulseManager.hasNotifications()) && pulsing; if (!visible && mNotificationsVisible && (mWakingUp || willWakeUp) && mDozeAmount != 0.0f) { // let's not make notifications invisible while waking up, otherwise the animation // is strange return; Loading Loading @@ -192,6 +212,7 @@ class NotificationWakeUpCoordinator @Inject constructor( } fun setWakingUp(wakingUp: Boolean) { willWakeUp = false mWakingUp = wakingUp if (wakingUp && mNotificationsVisible && !mNotificationsVisibleForExpansion) { // We're waking up while pulsing, let's make sure the animation looks nice Loading @@ -200,9 +221,9 @@ class NotificationWakeUpCoordinator @Inject constructor( } override fun onAmbientStateChanged(entry: NotificationEntry, isPulsing: Boolean) { var animate = mDozeParameters.getAlwaysOn() && !mDozeParameters.getDisplayNeedsBlanking() var animate = shouldAnimateVisibility() if (!isPulsing) { if (mLinearDozeAmount != 0.0f) { if (mLinearDozeAmount != 0.0f && mLinearVisibilityAmount != 0.0f) { if (entry.isRowDismissed) { // if we animate, we see the shelf briefly visible. Instead we fully animate // the notification and its background out Loading @@ -218,4 +239,7 @@ class NotificationWakeUpCoordinator @Inject constructor( } updateNotificationVisibility(animate, increaseSpeed = false) } private fun shouldAnimateVisibility() = mDozeParameters.getAlwaysOn() && !mDozeParameters.getDisplayNeedsBlanking() } No newline at end of file
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationMenuRow.java +1 −0 Original line number Diff line number Diff line Loading @@ -340,6 +340,7 @@ public class NotificationMenuRow implements NotificationMenuRowPlugin, View.OnCl && !NotificationStackScrollLayout.isPinnedHeadsUp(getParent()) && !mParent.areGutsExposed() && !mParent.isDark() && !mParent.showingAmbientPulsing() && (mCheckForDrag == null || !mHandler.hasCallbacks(mCheckForDrag))) { // Only show the menu if we're not a heads up view and guts aren't exposed. mCheckForDrag = new CheckForDrag(); Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/AmbientState.java +7 −0 Original line number Diff line number Diff line Loading @@ -395,6 +395,13 @@ public class AmbientState { mPulsing = hasPulsing; } /** * @return if we're pulsing in general */ public boolean isPulsing() { return mPulsing; } public boolean isPulsing(NotificationEntry entry) { if (!mPulsing || mAmbientPulseManager == null) { return false; Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationSection.java +1 −0 Original line number Diff line number Diff line Loading @@ -260,6 +260,7 @@ class NotificationSection { + ExpandableViewState.getFinalActualHeight(firstView)); if (shiftBackgroundWithFirst) { mBounds.left += Math.max(firstView.getTranslation(), 0); mBounds.right += Math.min(firstView.getTranslation(), 0); } } } Loading