Skip to content

Commit

Permalink
AndroidX core update: replace deprecated NavUtils calls
Browse files Browse the repository at this point in the history
  • Loading branch information
UweTrottmann committed Nov 29, 2024
1 parent 6cd72da commit b2fb6ec
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ abstract class BaseThemeActivity : AppCompatActivity() {
android.R.id.home -> {
val upIntent = NavUtils.getParentActivityIntent(this)
if (upIntent != null) {
if (NavUtils.shouldUpRecreateTask(this, upIntent)) {
if (shouldUpRecreateTask(upIntent)) {
// This activity is NOT part of this app's task, so create a new task
// when navigating up, with a synthesized back stack.
TaskStackBuilder.create(this)
Expand All @@ -62,7 +62,7 @@ abstract class BaseThemeActivity : AppCompatActivity() {
} else {
// This activity is part of this app's task, so simply
// navigate up to the logical parent activity.
NavUtils.navigateUpTo(this, upIntent)
navigateUpTo(upIntent)
}
} else {
// No parent activity defined in AndroidManifest, let back press handle up
Expand Down

0 comments on commit b2fb6ec

Please sign in to comment.