summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Julia Tuttle <juliatuttle@google.com> 2024-12-19 13:05:03 -0500
committer Julia Tuttle <juliatuttle@google.com> 2025-01-17 10:29:45 -0500
commit9adb9a0caf1936821a78958155dc3ab88818d75c (patch)
tree2d104bbb07b2466aae39888226a06fd78efadfb3
parent4d82f0c81fc5c97c23033cd182cdce4eebdef57c (diff)
Add FlowPreview @OptIns
Flag: EXEMPT mechanical cleanup Test: presubmit Change-Id: I65dfcf561282ed66a6a73d27282a1de6393ab4b9
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromAodTransitionInteractor.kt2
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromDozingTransitionInteractor.kt2
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromDreamingTransitionInteractor.kt1
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardInteractor.kt2
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionAuditLogger.kt2
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 {