diff options
| author | 2025-01-21 07:24:45 -0800 | |
|---|---|---|
| committer | 2025-01-21 07:24:45 -0800 | |
| commit | c6bc05708f775a9adf0f6757dff3f7bbfcd59ee8 (patch) | |
| tree | a89199d6200a220964839b450987112261912fd5 | |
| parent | eb06ce14c20d2e0d7d73aa9da484e3d20f7ff1f5 (diff) | |
| parent | 9adb9a0caf1936821a78958155dc3ab88818d75c (diff) | |
Merge "Add FlowPreview @OptIns" into main
5 files changed, 9 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromAodTransitionInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromAodTransitionInteractor.kt index b42da5265d86..717437923e57 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromAodTransitionInteractor.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromAodTransitionInteractor.kt @@ -36,6 +36,7 @@ import javax.inject.Inject import kotlin.time.Duration.Companion.milliseconds import kotlinx.coroutines.CoroutineDispatcher import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.FlowPreview import kotlinx.coroutines.flow.debounce @SysUISingleton @@ -80,6 +81,7 @@ constructor( /** * Listen for the signal that we're waking up and figure what state we need to transition to. */ + @OptIn(FlowPreview::class) private fun listenForAodToAwake() { // Use PowerInteractor's wakefulness, which is the earliest wake signal available. We // have all of the information we need at this time to make a decision about where to diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromDozingTransitionInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromDozingTransitionInteractor.kt index 021cce6d1e23..4291181d8336 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromDozingTransitionInteractor.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromDozingTransitionInteractor.kt @@ -41,6 +41,7 @@ import javax.inject.Inject import kotlin.time.Duration.Companion.milliseconds import kotlinx.coroutines.CoroutineDispatcher import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.FlowPreview import kotlinx.coroutines.flow.debounce @SysUISingleton @@ -114,6 +115,7 @@ constructor( } } + @OptIn(FlowPreview::class) @SuppressLint("MissingPermission") private fun listenForDozingToAny() { if (KeyguardWmStateRefactor.isEnabled) { diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromDreamingTransitionInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromDreamingTransitionInteractor.kt index a9992112f893..82b8ca2a890b 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromDreamingTransitionInteractor.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromDreamingTransitionInteractor.kt @@ -125,6 +125,7 @@ constructor( * the power button is pressed quickly, we may need to go directly from DREAMING to * GLANCEABLE_HUB as the transition to DOZING has not occurred yet. */ + @OptIn(FlowPreview::class) @SuppressLint("MissingPermission") private fun listenForDreamingToGlanceableHubFromPowerButton() { if (!communalSettingsInteractor.isCommunalFlagEnabled()) return diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardInteractor.kt index 8f7f2a0a8cbb..1f3c08ca9f7a 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardInteractor.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardInteractor.kt @@ -56,6 +56,7 @@ import javax.inject.Inject import javax.inject.Provider import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.ExperimentalCoroutinesApi +import kotlinx.coroutines.FlowPreview import kotlinx.coroutines.delay import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.MutableStateFlow @@ -203,6 +204,7 @@ constructor( * examining the value of this flow, to let other consumers have enough time to also see that * same new value. */ + @OptIn(FlowPreview::class) val isAbleToDream: Flow<Boolean> = dozeTransitionModel .flatMapLatest { dozeTransitionModel -> diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionAuditLogger.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionAuditLogger.kt index cd62d5f3b6e1..3dc123a81bde 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionAuditLogger.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionAuditLogger.kt @@ -30,6 +30,7 @@ import com.android.systemui.shade.domain.interactor.ShadeInteractor import com.android.systemui.statusbar.notification.stack.ui.viewmodel.SharedNotificationContainerViewModel import javax.inject.Inject import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.FlowPreview import kotlinx.coroutines.flow.debounce private val TAG = KeyguardTransitionAuditLogger::class.simpleName!! @@ -52,6 +53,7 @@ constructor( private val deviceEntryInteractor: DeviceEntryInteractor, ) { + @OptIn(FlowPreview::class) fun start() { scope.launch { powerInteractor.detailedWakefulness.collect { |