Prevent some crashes seen on Play Store console

This commit is contained in:
Sylvain Berfini 2025-03-18 12:51:25 +01:00
parent 49dc1fe69f
commit 6375e0db87
2 changed files with 11 additions and 3 deletions

View file

@ -185,8 +185,14 @@ class TelecomManager
}
}
}
} catch (e: CallException) {
Log.e("$TAG Failed to add call to Telecom's CallsManager: $e")
} catch (ce: CallException) {
Log.e("$TAG Failed to add call to Telecom's CallsManager: $ce")
} catch (se: SecurityException) {
Log.e("$TAG Security exception trying to add call to Telecom's CallsManager: $se")
} catch (ise: IllegalArgumentException) {
Log.e("$TAG Illegal argument exception trying to add call to Telecom's CallsManager: $ise")
} catch (e: Exception) {
Log.e("$TAG Exception trying to add call to Telecom's CallsManager: $e")
}
}
}

View file

@ -186,8 +186,10 @@ class RegisterFragment : GenericFragment() {
val telephonyManager = requireContext().getSystemService(Context.TELEPHONY_SERVICE) as TelephonyManager
val countryIso = telephonyManager.networkCountryIso
coreContext.postOnCoreThread {
val fragmentContext = context ?: return@postOnCoreThread
val adapter = object : ArrayAdapter<String>(
requireContext(),
fragmentContext,
R.layout.drop_down_item,
viewModel.dialPlansLabelList
) {