summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Alejandro Nijamkin <nijamkin@google.com> 2024-07-29 10:21:02 -0700
committer Alejandro Nijamkin <nijamkin@google.com> 2024-07-29 10:31:29 -0700
commit32b56ec149131e19717a5a217ffb588de0dc630a (patch)
treecad004ac62f89e79072c543e43893ddc7b386373
parentd2715b13c06ec5fb6760537556b12da38bc46092 (diff)
Blind crash fix
Reading the state later might help avoid the crash. Fix: 352141051 Test: couldn't reproduce the crash but no crash on boot after the fix either Flag: NONE this fix is not flag guarded Change-Id: Iadb3cab1f7d23303b15236aae15a1cbc93ec70d6 Change-Id: I1f7bef29690dd52fd78b8ea2741edfec8ad3f81f
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionBootInteractor.kt4
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionBootInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionBootInteractor.kt
index 805dbb08d1ac..2ebd9e8c5f2b 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionBootInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionBootInteractor.kt
@@ -30,6 +30,7 @@ import com.android.systemui.statusbar.policy.domain.interactor.DeviceProvisionin
import javax.inject.Inject
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.ExperimentalCoroutinesApi
+import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.first
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.launch
@@ -52,11 +53,12 @@ constructor(
* then we'll seed the repository with a transition from OFF -> GONE.
*/
@OptIn(ExperimentalCoroutinesApi::class)
- private val showLockscreenOnBoot =
+ private val showLockscreenOnBoot: Flow<Boolean> by lazy {
deviceProvisioningInteractor.isDeviceProvisioned.map { provisioned ->
(provisioned || deviceEntryInteractor.isAuthenticationRequired()) &&
deviceEntryInteractor.isLockscreenEnabled()
}
+ }
override fun start() {
scope.launch {