android, desktop: support old Android WebViews (up to 69) (#4953)

* android, desktop: support old Android WebViews (up to 69)

* refactor

* WebView 70

* comment
This commit is contained in:
Stanislav Dmitrenko
2024-09-30 21:44:35 +07:00
committed by GitHub
parent ab034e626f
commit 15ca662805
5 changed files with 100 additions and 17 deletions
@@ -737,7 +737,11 @@ fun WebRTCView(callCommand: SnapshotStateList<WCallCommand>, onResponse: (WVAPIM
}
} catch (e: Exception) {
Log.e(TAG, "Error initializing WebView: ${e.stackTraceToString()}")
AlertManager.shared.showAlertMsg(generalGetString(MR.strings.error), generalGetString(MR.strings.error_initializing_web_view).format(e.stackTraceToString()))
if (e.stackTraceToString().contains("/lib64")) {
AlertManager.shared.showAlertMsg(generalGetString(MR.strings.error), generalGetString(MR.strings.error_initializing_web_view_wrong_arch).format(e.stackTraceToString()))
} else {
AlertManager.shared.showAlertMsg(generalGetString(MR.strings.error), generalGetString(MR.strings.error_initializing_web_view).format(e.stackTraceToString()))
}
return@AndroidView View(androidAppContext)
}
}