Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5f1d103a authored by Matt Pietal's avatar Matt Pietal
Browse files

Remove kotlin sample

It causes the coroutine to execute every 150ms, even when
asleep. Go back to a delay.

Fixes: 321570646
Test: manual, and perfetto trace
Flag: N/A
Change-Id: I96d957822dd78173cc458c3e4096143141510a72
parent 35ea9cfb
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -31,8 +31,8 @@ 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.sample
import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.onEach
import kotlinx.coroutines.launch

@SysUISingleton
@@ -62,7 +62,6 @@ constructor(
        listenForTransitionToCamera(scope, keyguardInteractor)
    }

    @FlowPreview
    private fun listenForAlternateBouncerToLockscreenHubAodOrDozing() {
        scope.launch {
            keyguardInteractor.alternateBouncerShowing
@@ -71,7 +70,7 @@ constructor(
                // happening prematurely.
                // This should eventually be removed in favor of
                // [KeyguardTransitionInteractor#startDismissKeyguardTransition]
                .sample(150L)
                .onEach { delay(150L) }
                .sampleCombine(
                    keyguardInteractor.primaryBouncerShowing,
                    startedKeyguardTransitionStep,