mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-02-18 12:30:38 +01:00
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 {
|
dependencies {
|
||||||
implementation 'com.simplemobiletools:commons:5.28.21'
|
implementation 'com.simplemobiletools:commons:5.28.23'
|
||||||
implementation 'joda-time:joda-time:2.10.1'
|
implementation 'joda-time:joda-time:2.10.1'
|
||||||
implementation 'com.googlecode.ez-vcard:ez-vcard:0.10.5'
|
implementation 'com.googlecode.ez-vcard:ez-vcard:0.10.5'
|
||||||
implementation 'com.github.tibbi:IndicatorFastScroll:08f512858a'
|
implementation 'com.github.tibbi:IndicatorFastScroll:08f512858a'
|
||||||
|
@ -438,7 +438,11 @@ class MainActivity : SimpleActivity(), RefreshContactsListener {
|
|||||||
|
|
||||||
private fun launchDialpad() {
|
private fun launchDialpad() {
|
||||||
Intent(Intent.ACTION_DIAL).apply {
|
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_centerHorizontal="true"
|
||||||
android:layout_margin="@dimen/medium_margin"
|
android:layout_margin="@dimen/medium_margin"
|
||||||
android:background="?attr/selectableItemBackgroundBorderless"
|
android:background="?attr/selectableItemBackgroundBorderless"
|
||||||
android:src="@drawable/ic_dialer" />
|
android:src="@mipmap/ic_dialer" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user