Skip to content
Snippets Groups Projects
Commit 20848e47 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: 6e51daa4

parents 5b97b218 6e51daa4
No related branches found
No related tags found
No related merge requests found
......@@ -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,16 +58,21 @@ constructor(
get() = R.drawable.ic_camera
override val lockScreenState: Flow<KeyguardQuickAffordanceConfig.LockScreenState>
get() =
flowOf(
KeyguardQuickAffordanceConfig.LockScreenState.Visible(
icon =
Icon.Resource(
R.drawable.ic_camera,
ContentDescription.Resource(R.string.accessibility_camera_button)
)
)
get() = flow {
emit(
if (isLaunchable()) {
KeyguardQuickAffordanceConfig.LockScreenState.Visible(
icon =
Icon.Resource(
R.drawable.ic_camera,
ContentDescription.Resource(R.string.accessibility_camera_button)
)
)
} else {
KeyguardQuickAffordanceConfig.LockScreenState.Hidden
}
)
}
override suspend fun getPickerScreenState(): KeyguardQuickAffordanceConfig.PickerScreenState {
return if (isLaunchable()) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment