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

Commit a754a3b3 authored by Lyn's avatar Lyn
Browse files

Rename allow to calculateState since it no longer returns boolean

Bug: 321089634
Test: VisualInterruptionDecisionProviderImplTest
Flag: ACONFIG notification_avalanche_suppression DEVELOPMENT
Change-Id: I5071fa68ef5f7f3e6d383e631d31d902dc66507e
parent df8815f0
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -252,13 +252,13 @@ class AvalancheSuppressor(
    override fun shouldSuppress(entry: NotificationEntry): Boolean {
        val timeSinceAvalanche = systemClock.currentTimeMillis() - avalancheProvider.startTime
        val isActive = timeSinceAvalanche < avalancheProvider.timeoutMs
        val state = allow(entry)
        val state = calculateState(entry)
        val suppress = isActive && state == State.SUPPRESS
        reason = "avalanche suppress=$suppress isActive=$isActive state=$state"
        return suppress
    }

    fun allow(entry: NotificationEntry): State  {
    private fun calculateState(entry: NotificationEntry): State  {
        if (
            entry.ranking.isConversation &&
                entry.sbn.notification.`when` > avalancheProvider.startTime