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

Commit 0a375f8b authored by Julia Reynolds's avatar Julia Reynolds
Browse files

Post invalidate list calls to an executor

To avoid reentrant pipeline calls

Test: scenario HUN tests
Fixes: 438375101
Flag: EXEMPT BUG_FIX
Change-Id: Ia1ede38eb1b9088d7015830fcebe59b86ca32109
parent 5c134240
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -961,16 +961,20 @@ constructor(
        object : OnHeadsUpChangedListener {
            override fun onHeadsUpStateChanged(entry: NotificationEntry, isHeadsUp: Boolean) {
                if (!isHeadsUp) {
                    mExecutor.execute {
                        mNotifPromoter.invalidateList("headsUpEnded: ${entry.logKey}")
                        mHeadsUpViewBinder.unbindHeadsUpView(entry)
                        endNotifLifetimeExtensionIfExtended(entry)
                    }
                }
            }

            override fun onHeadsUpAnimatingAwayEnded(entry: NotificationEntry) {
                mExecutor.execute {
                    mNotifPromoter.invalidateList("headsUpAnimatingAwayEnded: ${entry.logKey}")
                }
            }
        }

    private fun isSticky(entry: NotificationEntry) = mHeadsUpManager.isSticky(entry.key)