File tree Expand file tree Collapse file tree
src/main/kotlin/com/github/terrakok/cicerone/androidx Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818 bintrayName = ' cicerone-kotlin'
1919 publishedGroupId = ' com.github.terrakok'
2020 artifact = ' cicerone'
21- libraryVersion = ' 6.4 '
21+ libraryVersion = ' 6.5 '
2222 gitUrl = ' https://github.com/terrakok/Cicerone'
2323 allLicenses = [' MIT' ]
2424}
Original file line number Diff line number Diff line change 11package com.github.terrakok.cicerone.androidx
22
3+ import android.content.ActivityNotFoundException
34import android.content.Intent
45import androidx.fragment.app.*
56import com.github.terrakok.cicerone.*
@@ -171,9 +172,9 @@ open class AppNavigator @JvmOverloads constructor(
171172 private fun checkAndStartActivity (screen : ActivityScreen ) {
172173 // Check if we can start activity
173174 val activityIntent = screen.createIntent(activity)
174- if (activityIntent.resolveActivity(activity.packageManager) != null ) {
175+ try {
175176 activity.startActivity(activityIntent, screen.startActivityOptions)
176- } else {
177+ } catch (e : ActivityNotFoundException ) {
177178 unexistingActivity(screen, activityIntent)
178179 }
179180 }
You can’t perform that action at this time.
0 commit comments