mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 03:18:06 +00:00
Various fixes from Crashlytics reported issues
This commit is contained in:
parent
6c20ac8d40
commit
36cc74956e
3 changed files with 29 additions and 8 deletions
|
|
@ -673,7 +673,11 @@ fun Friend.getNativeContactPictureUri(): Uri? {
|
|||
fd.close()
|
||||
return pictureUri
|
||||
}
|
||||
} catch (_: IOException) { }
|
||||
} catch (ioe: IOException) {
|
||||
Log.e("[Contacts Manager] Can't open [$pictureUri]: $ioe")
|
||||
} catch (se: SecurityException) {
|
||||
Log.e("[Contacts Manager] Can't open [$pictureUri]: $se")
|
||||
}
|
||||
|
||||
// Fallback to thumbnail
|
||||
return Uri.withAppendedPath(
|
||||
|
|
|
|||
|
|
@ -62,14 +62,21 @@ class TelecomManager @WorkerThread constructor(context: Context) {
|
|||
private var currentlyFollowedCalls: Int = 0
|
||||
|
||||
init {
|
||||
callsManager.registerAppWithTelecom(
|
||||
CallsManager.CAPABILITY_BASELINE or
|
||||
CallsManager.Companion.CAPABILITY_SUPPORTS_VIDEO_CALLING
|
||||
)
|
||||
val hasTelecomFeature = context.packageManager.hasSystemFeature("android.software.telecom")
|
||||
val hasTelecomFeature =
|
||||
context.packageManager.hasSystemFeature("android.software.telecom")
|
||||
Log.i(
|
||||
"$TAG App has been registered with Telecom, android.software.telecom feature is [${if (hasTelecomFeature) "available" else "not available"}]"
|
||||
"$TAG android.software.telecom feature is [${if (hasTelecomFeature) "available" else "not available"}]"
|
||||
)
|
||||
|
||||
try {
|
||||
callsManager.registerAppWithTelecom(
|
||||
CallsManager.CAPABILITY_BASELINE or
|
||||
CallsManager.Companion.CAPABILITY_SUPPORTS_VIDEO_CALLING
|
||||
)
|
||||
Log.i("$TAG App has been registered with Telecom")
|
||||
} catch (e: Exception) {
|
||||
Log.e("$TAG Can't init TelecomManager: $e")
|
||||
}
|
||||
}
|
||||
|
||||
@WorkerThread
|
||||
|
|
|
|||
|
|
@ -193,7 +193,17 @@ class AccountSettingsViewModel @UiThread constructor() : GenericViewModel() {
|
|||
newParams.mwiServerAddress = null
|
||||
}
|
||||
|
||||
newParams.expires = expire.value?.toInt() ?: 31536000
|
||||
val expire = expire.value.orEmpty()
|
||||
val expireInt = if (expire.isEmpty()) {
|
||||
31536000
|
||||
} else {
|
||||
try {
|
||||
expire.toInt()
|
||||
} catch (_: NumberFormatException) {
|
||||
31536000
|
||||
}
|
||||
}
|
||||
newParams.expires = expireInt
|
||||
|
||||
val conferenceUri = conferenceFactoryUri.value.orEmpty()
|
||||
if (conferenceUri.isNotEmpty()) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue