-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Mute Audio Default Setting #268
Conversation
In the currently used version of CameraX, you can now start a recording muted with |
Co-authored-by: Jaehwa Noh <shwoghk14@gmail.com>
feature/settings/src/main/java/com/google/jetpackcamera/settings/ui/SettingsComponents.kt
Outdated
Show resolved
Hide resolved
feature/settings/src/main/java/com/google/jetpackcamera/settings/SettingsUiState.kt
Show resolved
Hide resolved
* remove .idea files * implement FakePermissionChecker for test
feature/settings/src/main/java/com/google/jetpackcamera/settings/SettingsViewModel.kt
Outdated
Show resolved
Hide resolved
2f1d4de
to
8a0569d
Compare
feature/settings/src/main/java/com/google/jetpackcamera/settings/SettingsUiState.kt
Outdated
Show resolved
Hide resolved
feature/settings/src/main/java/com/google/jetpackcamera/settings/SettingsUiState.kt
Outdated
Show resolved
Hide resolved
* files changed were also hit with the ktlinter
constraintsRepository: ConstraintsRepository | ||
) : ViewModel() { | ||
private var grantedPermissions = mutableSetOf<String>() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should make this a MutableStateFlow<Set<String>>
so that it can be combined into the below flow. Otherwise you have a race between this being set and the settings/constraints being updated.
# Conflicts: # core/camera/src/main/java/com/google/jetpackcamera/core/camera/CameraXCameraUseCase.kt # feature/settings/src/main/java/com/google/jetpackcamera/settings/SettingsScreen.kt # feature/settings/src/main/java/com/google/jetpackcamera/settings/SettingsUiState.kt # feature/settings/src/main/java/com/google/jetpackcamera/settings/SettingsViewModel.kt # feature/settings/src/main/java/com/google/jetpackcamera/settings/ui/SettingsComponents.kt # feature/settings/src/main/res/values/strings.xml # settings.gradle.kts
9ca2dbc
to
4fe4239
Compare
Persistent setting to start video recordings muted or with audio.
notable changes:
The permission to record audio is used as a constraint for the Mute Audio setting -- It will be disabled if the permission is not granted
Same process of adding a new setting...