diff options
| author | 2024-10-22 14:30:08 +0000 | |
|---|---|---|
| committer | 2024-10-30 18:28:45 +0000 | |
| commit | 3162fb4ed7eda61c45ec1d1bacf3c963a5a594c6 (patch) | |
| tree | 518d2685d264f8299aa9144a188827971cb6e993 /api/api_test.go | |
| parent | d8181f252ed077168ac890841db1a3c74ac02c6b (diff) | |
Improve NSSL `start` positioning for Dual Shade & Connected Displays.
So far, NSSL's start edge was positioned either at the beginning of the
screen (single shade) or at the half-width (split shade). Dual Shade
requires more fine-grained positioning, tied to the width of the shade
itself; the NSSL should be full-width on narrow screens, and a smaller
portion of the screen (either fixed size or a percentage) on wider
screens.
Summary of changes in this CL:
1. Define dual shade dimens in resource configuration files, instead of
   code constants. The final values for each config are still TBD, but
   the tentative spec is:
   * Pixel portrait/landscape: 412dp
   * Folded foldable portrait/landscape: 412dp
   * Unfolded foldable portrait/landscape: 392dp
   * Tablet portrait/landscape: 474dp
2. Replace `useSplitShade` with `horizontalPosition`. For unflagged
   code, this is a mechanical refactor where `useSplitShade == true`
   is equivalent to
   `horizontalPosition is HorizontalPosition.MiddleToEdge`. I added
   dedicated unit test cases to verify this.
3. Change the guideline percentage to match the ratio specified in
   `HorizontalPosition.MiddleToEdge`. This is still 50% at the moment,
   but will likely change soon for some Dual Shade configurations.
4. Under `HorizontalPosition.FloatAtEnd` (only enabled in SceneContainer
   and DualShade), do not constrain the NSSL start edge and instead
   constrain the width. This achieves a fixed-width, end-aligned panel.
Bug: 338033836
Flag: com.android.systemui.scene_container
Test: Verified manually by observing that notifications placement is
 unaffected on SceneContainer mode without dual shade, and narrower than
 half-screen when dual shade is enabled.
Test: Added unit tests.
Test: Existing unit tests still pass.
Change-Id: Ia2b03a3c0376c8490e15c8238ecd89a2eb7dae4f
Diffstat (limited to 'api/api_test.go')
0 files changed, 0 insertions, 0 deletions