Prevent potential crash + fixed camera display on dialer for tablets in portrait
This commit is contained in:
parent
3b8e83e1ed
commit
eade07060a
2 changed files with 6 additions and 2 deletions
|
@ -43,7 +43,11 @@ class AccountSettingsViewModelFactory(private val identity: String) :
|
||||||
return AccountSettingsViewModel(account) as T
|
return AccountSettingsViewModel(account) as T
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return AccountSettingsViewModel(coreContext.core.defaultAccount!!) as T
|
val defaultAccount = coreContext.core.defaultAccount
|
||||||
|
if (defaultAccount != null) {
|
||||||
|
return AccountSettingsViewModel(defaultAccount) as T
|
||||||
|
}
|
||||||
|
return coreContext.core.accountList.firstOrNull() as T
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
android:contentDescription="@null"
|
android:contentDescription="@null"
|
||||||
android:src="@drawable/dialer_background" />
|
android:src="@drawable/dialer_background" />
|
||||||
|
|
||||||
<TextureView
|
<org.linphone.mediastream.video.capture.CaptureTextureView
|
||||||
android:id="@+id/video_preview_window"
|
android:id="@+id/video_preview_window"
|
||||||
android:visibility="@{viewModel.showPreview ? View.VISIBLE : View.GONE, default=gone}"
|
android:visibility="@{viewModel.showPreview ? View.VISIBLE : View.GONE, default=gone}"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
Loading…
Reference in a new issue