Loading packages/SystemUI/src/com/android/systemui/statusbar/AlertingNotificationManager.java +6 −0 Original line number Diff line number Diff line Loading @@ -204,6 +204,12 @@ public abstract class AlertingNotificationManager implements NotificationLifetim return; } NotificationEntry entry = alertEntry.mEntry; // If the notification is animating, we will remove it at the end of the animation. if (entry != null && entry.isExpandAnimationRunning()) { return; } mAlertEntries.remove(key); onAlertEntryRemoved(alertEntry); entry.sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED); Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationLaunchAnimatorController.kt +11 −5 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow import com.android.systemui.statusbar.notification.stack.NotificationListContainer import com.android.systemui.statusbar.phone.HeadsUpManagerPhone import com.android.systemui.statusbar.phone.NotificationShadeWindowViewController import com.android.systemui.statusbar.policy.HeadsUpUtil import kotlin.math.ceil import kotlin.math.max Loading @@ -22,8 +23,8 @@ class NotificationLaunchAnimatorControllerProvider( return NotificationLaunchAnimatorController( notificationShadeWindowViewController, notificationListContainer, notification, headsUpManager headsUpManager, notification ) } } Loading @@ -36,10 +37,11 @@ class NotificationLaunchAnimatorControllerProvider( class NotificationLaunchAnimatorController( private val notificationShadeWindowViewController: NotificationShadeWindowViewController, private val notificationListContainer: NotificationListContainer, private val notification: ExpandableNotificationRow, private val headsUpManager: HeadsUpManagerPhone private val headsUpManager: HeadsUpManagerPhone, private val notification: ExpandableNotificationRow ) : ActivityLaunchAnimator.Controller { private val notificationKey = notification.entry.sbn.key private val notificationEntry = notification.entry private val notificationKey = notificationEntry.sbn.key override var launchContainer: ViewGroup get() = notification.rootView as ViewGroup Loading Loading @@ -82,6 +84,7 @@ class NotificationLaunchAnimatorController( override fun onIntentStarted(willAnimate: Boolean) { notificationShadeWindowViewController.setExpandAnimationRunning(willAnimate) notificationEntry.isExpandAnimationRunning = willAnimate if (!willAnimate) { removeHun(animate = true) Loading @@ -93,6 +96,7 @@ class NotificationLaunchAnimatorController( return } HeadsUpUtil.setNeedsHeadsUpDisappearAnimationAfterClick(notification, animate) headsUpManager.removeNotification(notificationKey, true /* releaseImmediately */, animate) } Loading @@ -100,6 +104,7 @@ class NotificationLaunchAnimatorController( // TODO(b/184121838): Should we call InteractionJankMonitor.cancel if the animation started // here? notificationShadeWindowViewController.setExpandAnimationRunning(false) notificationEntry.isExpandAnimationRunning = false removeHun(animate = true) } Loading @@ -116,6 +121,7 @@ class NotificationLaunchAnimatorController( notification.isExpandAnimationRunning = false notificationShadeWindowViewController.setExpandAnimationRunning(false) notificationEntry.isExpandAnimationRunning = false notificationListContainer.setExpandingNotification(null) applyParams(null) removeHun(animate = false) Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotificationEntry.java +11 −0 Original line number Diff line number Diff line Loading @@ -179,6 +179,7 @@ public final class NotificationEntry extends ListEntry { private boolean mIsAlerting; public boolean mRemoteEditImeVisible; private boolean mExpandAnimationRunning; /** * @param sbn the StatusBarNotification from system server Loading Loading @@ -952,6 +953,16 @@ public final class NotificationEntry extends ListEntry { return mIsAlerting; } /** Set whether this notification is currently used to animate a launch. */ public void setExpandAnimationRunning(boolean expandAnimationRunning) { mExpandAnimationRunning = expandAnimationRunning; } /** Whether this notification is currently used to animate a launch. */ public boolean isExpandAnimationRunning() { return mExpandAnimationRunning; } /** Information about a suggestion that is being edited. */ public static class EditedSuggestionInfo { Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ViewState.java +1 −1 Original line number Diff line number Diff line Loading @@ -591,7 +591,7 @@ public class ViewState implements Dumpable { animator.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { HeadsUpUtil.setIsClickedHeadsUpNotification(child, false); HeadsUpUtil.setNeedsHeadsUpDisappearAnimationAfterClick(child, false); child.setTag(TAG_ANIMATOR_TRANSLATION_Y, null); child.setTag(TAG_START_TRANSLATION_Y, null); child.setTag(TAG_END_TRANSLATION_Y, null); Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarLaunchAnimatorController.kt +1 −1 Original line number Diff line number Diff line Loading @@ -28,8 +28,8 @@ class StatusBarLaunchAnimatorController( override fun onLaunchAnimationEnd(isExpandingFullyAbove: Boolean) { delegate.onLaunchAnimationEnd(isExpandingFullyAbove) statusBar.onLaunchAnimationEnd(isExpandingFullyAbove) statusBar.notificationPanelViewController.setIsLaunchAnimationRunning(false) statusBar.onLaunchAnimationEnd(isExpandingFullyAbove) } override fun onLaunchAnimationProgress( Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/AlertingNotificationManager.java +6 −0 Original line number Diff line number Diff line Loading @@ -204,6 +204,12 @@ public abstract class AlertingNotificationManager implements NotificationLifetim return; } NotificationEntry entry = alertEntry.mEntry; // If the notification is animating, we will remove it at the end of the animation. if (entry != null && entry.isExpandAnimationRunning()) { return; } mAlertEntries.remove(key); onAlertEntryRemoved(alertEntry); entry.sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED); Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationLaunchAnimatorController.kt +11 −5 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow import com.android.systemui.statusbar.notification.stack.NotificationListContainer import com.android.systemui.statusbar.phone.HeadsUpManagerPhone import com.android.systemui.statusbar.phone.NotificationShadeWindowViewController import com.android.systemui.statusbar.policy.HeadsUpUtil import kotlin.math.ceil import kotlin.math.max Loading @@ -22,8 +23,8 @@ class NotificationLaunchAnimatorControllerProvider( return NotificationLaunchAnimatorController( notificationShadeWindowViewController, notificationListContainer, notification, headsUpManager headsUpManager, notification ) } } Loading @@ -36,10 +37,11 @@ class NotificationLaunchAnimatorControllerProvider( class NotificationLaunchAnimatorController( private val notificationShadeWindowViewController: NotificationShadeWindowViewController, private val notificationListContainer: NotificationListContainer, private val notification: ExpandableNotificationRow, private val headsUpManager: HeadsUpManagerPhone private val headsUpManager: HeadsUpManagerPhone, private val notification: ExpandableNotificationRow ) : ActivityLaunchAnimator.Controller { private val notificationKey = notification.entry.sbn.key private val notificationEntry = notification.entry private val notificationKey = notificationEntry.sbn.key override var launchContainer: ViewGroup get() = notification.rootView as ViewGroup Loading Loading @@ -82,6 +84,7 @@ class NotificationLaunchAnimatorController( override fun onIntentStarted(willAnimate: Boolean) { notificationShadeWindowViewController.setExpandAnimationRunning(willAnimate) notificationEntry.isExpandAnimationRunning = willAnimate if (!willAnimate) { removeHun(animate = true) Loading @@ -93,6 +96,7 @@ class NotificationLaunchAnimatorController( return } HeadsUpUtil.setNeedsHeadsUpDisappearAnimationAfterClick(notification, animate) headsUpManager.removeNotification(notificationKey, true /* releaseImmediately */, animate) } Loading @@ -100,6 +104,7 @@ class NotificationLaunchAnimatorController( // TODO(b/184121838): Should we call InteractionJankMonitor.cancel if the animation started // here? notificationShadeWindowViewController.setExpandAnimationRunning(false) notificationEntry.isExpandAnimationRunning = false removeHun(animate = true) } Loading @@ -116,6 +121,7 @@ class NotificationLaunchAnimatorController( notification.isExpandAnimationRunning = false notificationShadeWindowViewController.setExpandAnimationRunning(false) notificationEntry.isExpandAnimationRunning = false notificationListContainer.setExpandingNotification(null) applyParams(null) removeHun(animate = false) Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotificationEntry.java +11 −0 Original line number Diff line number Diff line Loading @@ -179,6 +179,7 @@ public final class NotificationEntry extends ListEntry { private boolean mIsAlerting; public boolean mRemoteEditImeVisible; private boolean mExpandAnimationRunning; /** * @param sbn the StatusBarNotification from system server Loading Loading @@ -952,6 +953,16 @@ public final class NotificationEntry extends ListEntry { return mIsAlerting; } /** Set whether this notification is currently used to animate a launch. */ public void setExpandAnimationRunning(boolean expandAnimationRunning) { mExpandAnimationRunning = expandAnimationRunning; } /** Whether this notification is currently used to animate a launch. */ public boolean isExpandAnimationRunning() { return mExpandAnimationRunning; } /** Information about a suggestion that is being edited. */ public static class EditedSuggestionInfo { Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ViewState.java +1 −1 Original line number Diff line number Diff line Loading @@ -591,7 +591,7 @@ public class ViewState implements Dumpable { animator.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { HeadsUpUtil.setIsClickedHeadsUpNotification(child, false); HeadsUpUtil.setNeedsHeadsUpDisappearAnimationAfterClick(child, false); child.setTag(TAG_ANIMATOR_TRANSLATION_Y, null); child.setTag(TAG_START_TRANSLATION_Y, null); child.setTag(TAG_END_TRANSLATION_Y, null); Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarLaunchAnimatorController.kt +1 −1 Original line number Diff line number Diff line Loading @@ -28,8 +28,8 @@ class StatusBarLaunchAnimatorController( override fun onLaunchAnimationEnd(isExpandingFullyAbove: Boolean) { delegate.onLaunchAnimationEnd(isExpandingFullyAbove) statusBar.onLaunchAnimationEnd(isExpandingFullyAbove) statusBar.notificationPanelViewController.setIsLaunchAnimationRunning(false) statusBar.onLaunchAnimationEnd(isExpandingFullyAbove) } override fun onLaunchAnimationProgress( Loading