Fix NotificationStack size calculation
There was a lot of duplicated code to calculate: 1. How many notifications should fit while on the lockscreen 2. The height of the notification stack The two things are now in NotificationstackSizeCalculator.kt, allowing also some Unit testing, and removing some responsibilities from NotificationPanelViewController. There was a bug in the calculation of the notification stack bottom padding that resulted in less notifications being displayed in the lockscreen: the padding value set was from the bottom of the screen, but the notification stack bottom was a bit higher. By removing this value from the padding, more space can be used. In computeMaxKeyguardNotifications, it seems there was an additional minimumPadding applied (from mClockPositionAlgorithm.getMinStackScrollerPadding()). However, the stack already has the padding at the top. + Added some debug lines, to make debugging of this easier in the future. + Renamed some setters adding "forDebug" suffix, as it was confusing to understand if they were doing anything useful. It turned out some properties are set to NotificationStackLayout only to draw debugging lines. Bug: 222482219 Test: atest NotificationStackSizeCalculator && atest com.android.systemui.statusbar.notification && manual QA request Change-Id: I7d972398ea39602259d6b5efa17672daf8da03c4
Loading
Please register or sign in to comment