Fixed an issue where the wrong notification would be heads upped

When setting the heads up on the summary, the headsup could be transfered
to the children, which is correct whenever we only have one child but not
if contains more then one. We're now looking at the pending notifications
as well in order to make the heads up transfer and revert back in case
we just made the wrong decision.

Test: install test app from bug: first post group and first child and then group with second child, observe normal heads up behavior
Change-Id: I52803f6846d602b6eb542aa18185bde7d60573e0
Fixes: 71818291
5 files changed