diff options
author | 2025-03-17 12:12:46 -0700 | |
---|---|---|
committer | 2025-03-17 12:12:46 -0700 | |
commit | 6ee45343a81bf2186e57e7a11dd0e9d01d8334db (patch) | |
tree | e0b1f5261a05f50b9773e864462035b7c03757ac | |
parent | cfbec8a47733b684ee4d29600441003e51ce5bb1 (diff) | |
parent | 02198d0c62228231a94834bdb9d28e6551300280 (diff) |
Merge "Pseudo-merge scene_container and keyguard_wm_state_refactor." into main
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/keyguard/KeyguardWmStateRefactor.kt | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardWmStateRefactor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardWmStateRefactor.kt index ddccc5d9e96d..41d14b9e727f 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardWmStateRefactor.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardWmStateRefactor.kt @@ -20,7 +20,16 @@ import com.android.systemui.Flags import com.android.systemui.flags.FlagToken import com.android.systemui.flags.RefactorFlagUtils -/** Helper for reading or using the keyguard wm state refactor flag state. */ +/** + * Helper for reading or using the keyguard_wm_state_refactor flag state. + * + * keyguard_wm_state_refactor works both with and without flexiglass (scene_container), but + * flexiglass requires keyguard_wm_state_refactor. For this reason, this class will return isEnabled + * if either keyguard_wm_state_refactor OR scene_container are enabled. This enables us to roll out + * keyguard_wm_state_refactor independently of scene_container, while also ensuring that + * scene_container rolling out ahead of keyguard_wm_state_refactor causes code gated by + * KeyguardWmStateRefactor to be enabled as well. + */ @Suppress("NOTHING_TO_INLINE") object KeyguardWmStateRefactor { /** The aconfig flag name */ @@ -30,10 +39,9 @@ object KeyguardWmStateRefactor { val token: FlagToken get() = FlagToken(FLAG_NAME, isEnabled) - /** Is the refactor enabled */ @JvmStatic inline val isEnabled - get() = Flags.keyguardWmStateRefactor() + get() = Flags.keyguardWmStateRefactor() || Flags.sceneContainer() /** * Called to ensure code is only run when the flag is enabled. This protects users from the |