Call entry clean up when removing pending entries

Classes that hooked on to NotificationEntryManager to add more state
would leak the entries because NotificationEntryManager wouldn't inform
them to clean up their state if NEM ends up removing a notification
that's pending inflation. This is because the notification isn't
technically "active" yet based off NEM's pipeline. We add this hook to
correct this.

This is not an issue in NotifCollection as it is unrelated to the
inflation pipeline and instantly considers an added notification
"active" when it's posted, so the removal/clean up callbacks are
actually called when it's removed shortly after posting.

Bug: 149212504
Bug: 149205483
Test: add + cancel notifications in Notify.apk
adb shell dumpheap com.android.systemui
Observe in heap dump that NotificationEntry's match up

Change-Id: I9e41399dd9ee0de853f39a47876d8c176a8d8b21
1 file changed