adding a crashfix at viewing contact details

This commit is contained in:
tibbi 2021-05-18 15:45:04 +02:00
parent 8970b1f746
commit 188014ceb8

View file

@ -638,6 +638,7 @@ class ViewContactActivity : ContactActivity() {
ensureBackgroundThread { ensureBackgroundThread {
val actions = getSocialActions(contactId) val actions = getSocialActions(contactId)
runOnUiThread { runOnUiThread {
if (!isDestroyed && !isFinishing) {
ChooseSocialDialog(this@ViewContactActivity, actions) { action -> ChooseSocialDialog(this@ViewContactActivity, actions) { action ->
Intent(Intent.ACTION_VIEW).apply { Intent(Intent.ACTION_VIEW).apply {
val uri = ContentUris.withAppendedId(ContactsContract.Data.CONTENT_URI, action.dataId) val uri = ContentUris.withAppendedId(ContactsContract.Data.CONTENT_URI, action.dataId)
@ -649,6 +650,7 @@ class ViewContactActivity : ContactActivity() {
} }
} }
} }
}
override fun customRingtoneSelected(ringtonePath: String) { override fun customRingtoneSelected(ringtonePath: String) {
contact_ringtone.text = ringtonePath.getFilenameFromPath() contact_ringtone.text = ringtonePath.getFilenameFromPath()