Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## Next release

* Fix: [Web] Multiple missed call notifications
* Fix: [Android] `openPhoneAccountsSettings` not always opening on various Android (mainly Samsung) devices

## 0.1.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,22 @@ object TelecomManagerExtension {

fun TelecomManager.openPhoneAccountSettings(activity: Activity) {
if (Build.MANUFACTURER.equals("Samsung", ignoreCase = true)) {
val intent = Intent(TelecomManager.ACTION_CHANGE_PHONE_ACCOUNTS)
intent.component = ComponentName(
"com.android.server.telecom",
"com.android.server.telecom.settings.EnableAccountPreferenceActivity"
)
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK
activity.startActivity(intent, null)
try {
val intent = Intent(TelecomManager.ACTION_CHANGE_PHONE_ACCOUNTS)
intent.component = ComponentName(
"com.android.server.telecom",
"com.android.server.telecom.settings.EnableAccountPreferenceActivity"
)
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK
activity.startActivity(intent, null)
} catch (e: Exception) {
Log.e("TelecomManager", "openPhoneAccountSettings: ${e.message}")

// use fallback method
val intent = Intent(TelecomManager.ACTION_CHANGE_PHONE_ACCOUNTS)
activity.startActivity(intent, null)
}

} else {
val intent = Intent(TelecomManager.ACTION_CHANGE_PHONE_ACCOUNTS)
activity.startActivity(intent, null)
Expand Down