From d6f6bd37d3b79284d70be2892dab7be1b58c8e0b Mon Sep 17 00:00:00 2001 From: Juha Heinanen Date: Sat, 15 Aug 2026 16:50:45 +0300 Subject: [PATCH] Direct to Android settings when Default Phone app is disabled --- app/src/main/kotlin/com/tutpro/baresip/SettingsScreen.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/main/kotlin/com/tutpro/baresip/SettingsScreen.kt b/app/src/main/kotlin/com/tutpro/baresip/SettingsScreen.kt index 9641be34..a880c228 100644 --- a/app/src/main/kotlin/com/tutpro/baresip/SettingsScreen.kt +++ b/app/src/main/kotlin/com/tutpro/baresip/SettingsScreen.kt @@ -1031,6 +1031,11 @@ private fun SettingsContent( ) } else { + try { + dialerRoleRequest.launch(Intent(Settings.ACTION_MANAGE_DEFAULT_APPS_SETTINGS)) + } catch (e: ActivityNotFoundException) { + Log.e(TAG, "ActivityNotFound exception: ${e.message}") + } BaresipService.instance?.addMobileUserAgent() restart = true } @@ -1100,6 +1105,7 @@ private fun SettingsContent( ) { _ -> val isHeld = roleManager.isRoleHeld(RoleManager.ROLE_SMS) viewModel.defaultMessaging.value = isHeld + restart = true } Switch( checked = defaultMessaging,