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

Commit dfdc6952 authored by Ale Nijamkin's avatar Ale Nijamkin Committed by Automerger Merge Worker
Browse files

Merge "Hide camera affordance when secure Camera is disabled" into main am:...

Merge "Hide camera affordance when secure Camera is disabled" into main am: 6e51daa4 am: 20848e47 am: 5e8cda1e am: 3745bbfc am: 8f1ba44a

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2753845



Change-Id: I25b2f4d7d6f0dab405d5aa748c30d38d6be3791e
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 45eda46e 8f1ba44a
Loading
Loading
Loading
Loading
+15 −10
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ import dagger.Lazy
import javax.inject.Inject
import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.flowOf
import kotlinx.coroutines.flow.flow
import kotlinx.coroutines.withContext

@SysUISingleton
@@ -58,8 +58,9 @@ constructor(
        get() = R.drawable.ic_camera

    override val lockScreenState: Flow<KeyguardQuickAffordanceConfig.LockScreenState>
        get() =
            flowOf(
        get() = flow {
            emit(
                if (isLaunchable()) {
                    KeyguardQuickAffordanceConfig.LockScreenState.Visible(
                        icon =
                            Icon.Resource(
@@ -67,7 +68,11 @@ constructor(
                                ContentDescription.Resource(R.string.accessibility_camera_button)
                            )
                    )
                } else {
                    KeyguardQuickAffordanceConfig.LockScreenState.Hidden
                }
            )
        }

    override suspend fun getPickerScreenState(): KeyguardQuickAffordanceConfig.PickerScreenState {
        return if (isLaunchable()) {