Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eca83c7a authored by Yining Liu's avatar Yining Liu
Browse files

Fix the missing HUN removal animation for delayed group notification

Fix the missing HUN removal animation for delayed group notification.
The child notifs are not promoted in the pipeline during HUN removal
animation, because BaseHeadsUpManager.isHeadsUpEntry returned false.
This change added a status check to make sure they are correctly
promoted and not being grouped in the pipeline during the HUN
removal animation.

Fix: 343475993
Test: HeadsUpCoordinatorTest
Flag: com.android.systemui.notification_group_hun_removal_animation_fix
Change-Id: I5346d01114054a52f24bb3de2b90c9bab37b7bbc
parent d6b4a140
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ import com.android.systemui.statusbar.notification.dagger.IncomingHeader
import com.android.systemui.statusbar.notification.interruption.HeadsUpViewBinder
import com.android.systemui.statusbar.notification.interruption.VisualInterruptionDecisionProvider
import com.android.systemui.statusbar.notification.logKey
import com.android.systemui.statusbar.notification.shared.GroupHunAnimationFix
import com.android.systemui.statusbar.notification.stack.BUCKET_HEADS_UP
import com.android.systemui.statusbar.policy.HeadsUpManager
import com.android.systemui.statusbar.policy.OnHeadsUpChangedListener
@@ -726,6 +727,12 @@ class HeadsUpCoordinator @Inject constructor(
     */
    private fun isAttemptingToShowHun(entry: ListEntry) =
        mHeadsUpManager.isHeadsUpEntry(entry.key) || isEntryBinding(entry)
                || isHeadsUpAnimatingAway(entry)

    private fun isHeadsUpAnimatingAway(entry: ListEntry): Boolean {
        if (!GroupHunAnimationFix.isEnabled) return false
        return entry.representativeEntry?.row?.isHeadsUpAnimatingAway ?: false
    }

    /**
     * Whether the notification is already heads up/binding per [isAttemptingToShowHun] OR if it