diff options
| author | 2023-12-28 13:36:51 -0800 | |
|---|---|---|
| committer | 2024-01-02 15:18:17 -0800 | |
| commit | 8b387a38fa8c10085e9498285e9413369974b99e (patch) | |
| tree | b2744265169a0df958793cbf3637a27c06c79b5b /api/coverage/tools | |
| parent | c61f0302a6230c8ca688e57db17b8190b1567cf7 (diff) | |
[flexiglass] Adds burn-in to smartspace section elements.
This CL has several necessary changes:
1. Extracts burn-in and alpha from KeyguardRootViewModel and onto
AodBurnInViewModel and AodAlphaViewModel, respectively. This is
necessary because the new blueprint/section implementation doesn't
use KeyguardRootView by design (using an @Composable hierarchy
instead) which means that it cannot use KeyguardRootViewBinder to
apply the alpha, scale, and translation on the necessary smartspace,
date, and weather elements (nor can it do so for clock elements -
something that this CL doesn't do but does enable).
2. Changes the way the old view-binder (KeyguardRootViewBinder) passes
UI-sourced parameters (like the clock provider, inset, and status
view position) into the view-model (KeyguardRootViewModel) to be
passed in when querying the flows that require it, instead of setting
them as fields on the view-model. This is cleaner but also opens up
the ability to do the same from Jetpack Compose, where side-effects
such as this don't necessarily trigger another composition pass.
3. Implements a way to pipe the positioning of the top of the clock
section and the top of the smartspace section back up to the
blueprint that owns them and has that blueprint then create the
burn-in parameters that can be used for (2) in the Compose-based
implementation. This can be done using the @Composable fun
burnIn(...) function that then produces an instance of BurnInState
with proper callbacks for setting the clock controller and reporting
the tops of the two sections.
4. Implements a simple modifier (fun Modifier.burnInAware) which is then
used by SmartspaceSection (and can be used by other sections in the
future) allowing the section to selectively apply the anti-burn-in
alpha, scale, and translation to selected child composables that need
that treatment in AOD.
5. Finally, there are some test cleanups: the alpha and burn-in related
test cases were moved out of KeyguardRootViewModelTest and into the new test classes for the new, smaller view-models which are deviceless-supporting. The KeyguardRootViewModelTest was also moved to make it deviceless-supporting.
Bug: 316211368
Test: See included test changes
Test: manually verified in Flexiglass and outside of Flexiglass
Flag: ACONFIG com.android.systemui.scene_container DEVELOPMENT
Change-Id: I1b4affbaeacf7205ee573f5d45df1f8bbcd8f241
Diffstat (limited to 'api/coverage/tools')
0 files changed, 0 insertions, 0 deletions