Reload video devices in settings after granting CAMERA permission
This commit is contained in:
parent
bb4328f216
commit
667b17a8c7
2 changed files with 3 additions and 1 deletions
|
@ -78,6 +78,8 @@ class VideoSettingsFragment : Fragment() {
|
|||
val granted = grantResults[0] == PackageManager.PERMISSION_GRANTED
|
||||
if (granted) {
|
||||
Log.i("[Video Settings] CAMERA permission granted")
|
||||
coreContext.core.reloadVideoDevices()
|
||||
viewModel.initCameraDevicesList()
|
||||
} else {
|
||||
Log.w("[Video Settings] CAMERA permission denied")
|
||||
}
|
||||
|
|
|
@ -120,7 +120,7 @@ class VideoSettingsViewModel : GenericSettingsViewModel() {
|
|||
bandwidthLimit.value = core.downloadBandwidth
|
||||
}
|
||||
|
||||
private fun initCameraDevicesList() {
|
||||
fun initCameraDevicesList() {
|
||||
val labels = arrayListOf<String>()
|
||||
for (camera in core.videoDevicesList) {
|
||||
if (prefs.hideStaticImageCamera && camera.startsWith("StaticImage")) {
|
||||
|
|
Loading…
Reference in a new issue