From bba7a957baf58140893af99a318353a08e687387 Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 20 Nov 2018 14:28:17 +0100 Subject: [PATCH] lets finish the Dialer activity if the number isnt provided in a supported format --- .../contacts/pro/activities/DialerActivity.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/DialerActivity.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/DialerActivity.kt index ceba2076..198a39b9 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/DialerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/DialerActivity.kt @@ -10,6 +10,7 @@ import android.net.Uri import android.os.Bundle import android.os.PowerManager import com.simplemobiletools.commons.extensions.beGone +import com.simplemobiletools.commons.extensions.toast import com.simplemobiletools.commons.extensions.updateTextColors import com.simplemobiletools.contacts.pro.R import com.simplemobiletools.contacts.pro.helpers.ContactsHelper @@ -36,6 +37,9 @@ class DialerActivity : SimpleActivity(), SensorEventListener { updateCallee(it) } } + } else { + toast(R.string.unknown_error_occurred) + finish() } }