Refactor of LargeScreenUtils.shouldUseLargeScreenShadeHeader
Primary reason for refactor is to include flagging - so split shade on small landscape screens can be flag-guarded.
Refactor:
- removed static methods LargeScreenUtils.shouldUseLargeScreenShadeHeader
- now using SplitShadeStateController.shouldUseSplitNotificationShade
- SplitShadeStateController is injected or passed when necessary
- flag guarding can now be done in SplitShadeStateController.shouldUseSplitNotificationShade
- FakeSplitShadeStateController is passed in test classes
Improvements that could be made in a follow up CL:
- no longer need resources as a parameter for shouldUseLargeScreenShadeHeader, context can be injected and then context.resources could be used internally
- StateFlow could be used, this could be subscribed to instead of checking shouldUseLargeScreenShadeHeader in 'updateResources' methods.
- Improvements ignored for now to reduce the size of the change and speed up review
Now, when LOCKSCREEN_ENABLE_LANDSCAPE is on: split shade is used on small landscape screens.
Bug: 293252410
Test: See files
Change-Id: If35ad6d5e095f15e037b0d2bb58f346758966379
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
index c134806..c72f565 100644
--- a/packages/SystemUI/res/values/config.xml
+++ b/packages/SystemUI/res/values/config.xml
@@ -592,6 +592,11 @@
<!-- Whether to use the split 2-column notification shade -->
<bool name="config_use_split_notification_shade">false</bool>
+ <!-- Whether to force split shade.
+ For now, this value has effect only when flag lockscreen.enable_landscape is enabled.
+ TODO (b/293290851) - change this comment/resource when flag is enabled -->
+ <bool name="force_config_use_split_notification_shade">false</bool>
+
<!-- Whether we use large screen shade header which takes only one row compared to QS header -->
<bool name="config_use_large_screen_shade_header">false</bool>