From 7f22aa27f8f9f5b185320d1f4de9fea86c253fb5 Mon Sep 17 00:00:00 2001 From: burakov Date: Fri, 12 Jul 2024 14:34:03 +0000 Subject: [bc25] Add comments to prevent error-prone use of `ShadeMode`. Flag: com.android.systemui.dual_shade Flag: com.android.systemui.scene_container Bug: 338033836 Test: N/A, this is only a documentation change. Change-Id: I004190355a88c166ecd171eea259652922f8e725 --- .../com/android/systemui/shade/domain/interactor/ShadeInteractor.kt | 6 +++++- .../src/com/android/systemui/shade/shared/model/ShadeMode.kt | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'packages/SystemUI/src') diff --git a/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractor.kt b/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractor.kt index c1f8a0be646d..45f359efbb7a 100644 --- a/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractor.kt +++ b/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractor.kt @@ -55,7 +55,11 @@ interface ShadeInteractor : BaseShadeInteractor { /** Whether the shade can be expanded from QQS to QS. */ val isExpandToQsEnabled: Flow - /** The version of the shade layout to use. */ + /** + * The version of the shade layout to use. + * + * Note: Most likely, you want to read [isShadeLayoutWide] instead of this. + */ val shadeMode: StateFlow /** diff --git a/packages/SystemUI/src/com/android/systemui/shade/shared/model/ShadeMode.kt b/packages/SystemUI/src/com/android/systemui/shade/shared/model/ShadeMode.kt index 8214a24a9a38..a8199a402ef1 100644 --- a/packages/SystemUI/src/com/android/systemui/shade/shared/model/ShadeMode.kt +++ b/packages/SystemUI/src/com/android/systemui/shade/shared/model/ShadeMode.kt @@ -29,6 +29,8 @@ sealed interface ShadeMode { /** * The split shade where, on large screens and unfolded foldables, the QS and notification parts * are placed side-by-side and expand/collapse as a single panel. + * + * Note: This isn't the only mode where the shade is wide. */ data object Split : ShadeMode -- cgit v1.2.3-59-g8ed1b