[Dual Shade] Change Dual Shade logic around screen width.
We've recently simplified our Dual Shade eligibility rules to be:
(1) The user can enable Single Shade on all non-wide* screens (handheld
devices and folded foldables, in portrait).
(2) On all wide screens, including handhelds in landscape rotation, Dual
Shade is enabled, regardless of user setting.
(3) This means we can get rid of the config-defined `isShadeLayoutWide`
bit in `SceneContainer`. Instead, all code dependent on it will be
gradually moved to perform the check in the `@Composable`, if
possible.
If not, it will use the newly-introduced `isWideScreen` instead of
the legacy concept of `isShadeLayoutWide`, which was based on the
config value `config_use_split_notification_shade` rather than the
actual screen width.
* "Wide" is defined as >= 600dp.
In a follow-up CL, Split Shade will be deprecated in `SceneContainer`.
BONUS: This also replaces some incorrect references to `isLargeScreen`
with the newly introduced `isWideScreen`.
Fix: 391128665
Fix: 391379390
Fix: 391380435
Fix: 405379458
Bug: 354926927
Bug: 338033836
Bug: 405383415
Bug: 411365508
Bug: 411449027
Bug: 409594391
Bug: 408932746
Test: Added unit tests.
Test: Updated all affected unit tests.
Test: Manually tested by opening and closing both shades on both a
folded and unfolded device, verifying the shade appears full width
or partial width as expected.
Test: Manually tested by disabling Dual Shade, and verifying that
Single Shade (folded) and Split Shade (unfolded) appear as expected.
Test: Manually tested by disabling scene_container and verifying that
Single Shade (folded) and Split Shade (unfolded) appear as expected.
Flag: com.android.systemui.scene_container
Change-Id: I5a2c2119adc80bbdf1e7b0a3128c5ae452d81144
Loading
Please register or sign in to comment