catching an exceptions thrown if no app can handle Dialpad
This commit is contained in:
parent
3e5bbd69c8
commit
e903a6f16e
|
@ -57,7 +57,7 @@ android {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.simplemobiletools:commons:5.28.21'
|
||||
implementation 'com.simplemobiletools:commons:5.28.23'
|
||||
implementation 'joda-time:joda-time:2.10.1'
|
||||
implementation 'com.googlecode.ez-vcard:ez-vcard:0.10.5'
|
||||
implementation 'com.github.tibbi:IndicatorFastScroll:08f512858a'
|
||||
|
|
|
@ -438,7 +438,11 @@ class MainActivity : SimpleActivity(), RefreshContactsListener {
|
|||
|
||||
private fun launchDialpad() {
|
||||
Intent(Intent.ACTION_DIAL).apply {
|
||||
startActivity(this)
|
||||
if (resolveActivity(packageManager) != null) {
|
||||
startActivity(this)
|
||||
} else {
|
||||
toast(R.string.no_app_found)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -23,6 +23,6 @@
|
|||
android:layout_centerHorizontal="true"
|
||||
android:layout_margin="@dimen/medium_margin"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:src="@drawable/ic_dialer" />
|
||||
android:src="@mipmap/ic_dialer" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
|
Loading…
Reference in New Issue