Skip to content

Commit e903a6f

Browse files
committed
catching an exceptions thrown if no app can handle Dialpad
1 parent 3e5bbd6 commit e903a6f

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ android {
5757
}
5858

5959
dependencies {
60-
implementation 'com.simplemobiletools:commons:5.28.21'
60+
implementation 'com.simplemobiletools:commons:5.28.23'
6161
implementation 'joda-time:joda-time:2.10.1'
6262
implementation 'com.googlecode.ez-vcard:ez-vcard:0.10.5'
6363
implementation 'com.github.tibbi:IndicatorFastScroll:08f512858a'

app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/MainActivity.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,11 @@ class MainActivity : SimpleActivity(), RefreshContactsListener {
438438

439439
private fun launchDialpad() {
440440
Intent(Intent.ACTION_DIAL).apply {
441-
startActivity(this)
441+
if (resolveActivity(packageManager) != null) {
442+
startActivity(this)
443+
} else {
444+
toast(R.string.no_app_found)
445+
}
442446
}
443447
}
444448

app/src/main/res/layout/dialog_dialer_moved.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@
2323
android:layout_centerHorizontal="true"
2424
android:layout_margin="@dimen/medium_margin"
2525
android:background="?attr/selectableItemBackgroundBorderless"
26-
android:src="@drawable/ic_dialer" />
26+
android:src="@mipmap/ic_dialer" />
2727

2828
</RelativeLayout>

0 commit comments

Comments
 (0)