Inflate ambient + heads up view as necessary
In order to save memory, this CL introduces API to set a subset of the
content views of a notification to inflate instead of all of them.
It also changes the default views to inflate to the contracted,
expanded, and public views. Heads up and ambient views are only
inflated if the respective notification will heads up or pulse. In
addition, these views are freed up once the heads up/pulse ends.
This saves a significant amount of memory. While 50 notifications would
take up around 50 MB before, they take up around 27 MB after this
change.
Bug: 111809944
Test: runtest systemui, manual
Change-Id: I970420943a3ecfac3e53d83a342b29636e32a51d
10 files changed