Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit bfc2e3a2 authored by Nicolo' Mazzucato's avatar Nicolo' Mazzucato
Browse files

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
parent 4f81748b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment