Skip to content
Commit 69485e3c authored by Ned Burns's avatar Ned Burns
Browse files

Debounce GroupCoalescer instead of using single timeout

Previously GroupCoalescer would delay all notifs in a group until some
max time limit had been reached. However, it can take a full group
upwards of 400ms to be delivered, but we don't want to delay ALL group
notifications by 400ms, because updates to individual children would
also have to wait that long.

Instead, switch to a debounce system where each time a grouped
notification is posted, it sets a timer for a relatively short amount of
time (~50ms). If another notification from the same group comes in, the
timer is reset. And there's still a max of 500ms for safety purposes.

This way, something that is truly a large group post can take up to
500ms by constantly resetting its timer, but a one-off group update can
take place almost immediately.

Test: atest SystemUITests:GroupCoalescerTest
Change-Id: I9808258069c00e7d994035edcfb154b93f75d15a
parent a65024de
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment