diff options
| author | Nicolo' Mazzucato <nicomazz@google.com> | 2022-04-11 16:50:37 +0200 |
|---|---|---|
| committer | Nicolo' Mazzucato <nicomazz@google.com> | 2022-04-13 11:05:09 +0200 |
| commit | bfc2e3a2049817f6d4ce52bd084843d61686fe70 (patch) | |
| tree | cfbbd8b85d57bd24e81d6bf1d744b43f9a1b6ffe /core/java/android/inputmethodservice/InputMethodService.java | |
| parent | 4f81748bbf6a930992c4fafe28929440fdfb636a (diff) | |
Simplify keyguard notification count logic
The logic around NotificationStackSizeCalculator has been simplified by removing duplication of code between `computeMaxKeyguardNotifications` and `computeHeight`. Now `computeHeightPerNotificationLimit` returns a sequence where the "ith" element is the height of the shade when limited by "ith" notifications (and the remaining go into the shelf). Those values are used to compute the max notifications possible.
`totalAvailableSpace` now also has to include the space for the shelf. This makes the logic to check if the shelf fits easier. (before, the code was manually checking.
Tests have been modified to also include the shelf in the space available.
+ minor formatting fixes to kt files with ktfmt
+ improved debugging for keyguard available space for notifications, adding both top and bottom padding values.
+ Using real values from resources in dimentions test
+ writing more explicitly available space in each test
Bug: 214504318
Bug: 227733494
Test: Manual + atest android.platform.test.scenario.sysui.notification
Change-Id: Ibae96d0a01cc2698d2914efbf752a209636cfabc
Diffstat (limited to 'core/java/android/inputmethodservice/InputMethodService.java')
0 files changed, 0 insertions, 0 deletions
