mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Prevent black screen when trying to scan a QR code in assistant right after granting the app the CAMERA permission (on some devices)
This commit is contained in:
parent
94d6584213
commit
58295401ef
1 changed files with 4 additions and 0 deletions
|
|
@ -118,6 +118,10 @@ class QrCodeViewModel
|
||||||
@UiThread
|
@UiThread
|
||||||
fun setBackCamera() {
|
fun setBackCamera() {
|
||||||
coreContext.postOnCoreThread { core ->
|
coreContext.postOnCoreThread { core ->
|
||||||
|
// Just in case, on some devices such as Xiaomi Redmi Note 5
|
||||||
|
// this is required right after granting the CAMERA permission
|
||||||
|
core.reloadVideoDevices()
|
||||||
|
|
||||||
for (camera in core.videoDevicesList) {
|
for (camera in core.videoDevicesList) {
|
||||||
if (camera.contains("Back")) {
|
if (camera.contains("Back")) {
|
||||||
Log.i("$TAG Found back facing camera [$camera], using it")
|
Log.i("$TAG Found back facing camera [$camera], using it")
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue