Fixed a crash with the headsUpManager

Since the headsUpManager is calling out in various places to
its listeners, the callbacks may query the headsupmanager
in an internally inconsistent state, such that the pinned mode is
true but there is no topEntry. Let's add a null-check for
safety here.

Bug: 137804505
Test: atest SystemUITests
Change-Id: Ibae76b555ca51ccf676228b034a614d59a8b4e8e
1 file changed