Fixed the calculation of how many views to show on the lockscreen

The gapHeight wasn't taken into account as well as any potentially
visible headers neither. The media view was simply ignored, so
when then calculating the content height we had one view too few.
This also improves some bordercases of the measurement which
could be wrong. We can't use the shelf to do the gap calculations
but need to use the actual views.

Fixes: 156914265
Fixes: 157233336
Test: Add notifications and media, observe notification visible.
Change-Id: I92ef47153b5566c713004aed729c8761618ddf5e
2 files changed