mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Prevent crash in HelpViewModel if app is built without Firebase
This commit is contained in:
parent
0c28f9b0c6
commit
b68af84602
1 changed files with 6 additions and 1 deletions
|
|
@ -149,7 +149,12 @@ class HelpViewModel
|
|||
sdkVersion.value = coreContext.sdkVersion
|
||||
logsUploadInProgress.value = false
|
||||
|
||||
firebaseProjectId.value = FirebaseApp.getInstance().options.projectId
|
||||
try {
|
||||
firebaseProjectId.value = FirebaseApp.getInstance().options.projectId
|
||||
} catch (e: Exception) {
|
||||
Log.e("$TAG Failed to get FirebaseApp instance: $e")
|
||||
firebaseProjectId.value = "unknown"
|
||||
}
|
||||
|
||||
coreContext.postOnCoreThread { core ->
|
||||
core.addListener(coreListener)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue