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

Commit fc274689 authored by Julia Reynolds's avatar Julia Reynolds Committed by Android (Google) Code Review
Browse files

Merge "Post invalidate list calls to an executor" into main

parents bb4aa207 0a375f8b
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)