Skip to content

Commit 0cd4f67

Browse files
adampAndroid (Google) Code Review
authored andcommitted
Merge "Fix documentation of Activity#navigateUpTo() to describe its actual behavior." into jb-dev
2 parents 54562cf + 35c064b commit 0cd4f67

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

core/java/android/app/Activity.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4846,8 +4846,13 @@ public boolean shouldUpRecreateTask(Intent targetIntent) {
48464846
* Navigate from this activity to the activity specified by upIntent, finishing this activity
48474847
* in the process. If the activity indicated by upIntent already exists in the task's history,
48484848
* this activity and all others before the indicated activity in the history stack will be
4849-
* finished. If the indicated activity does not appear in the history stack, this is equivalent
4850-
* to simply calling finish() on this activity.
4849+
* finished.
4850+
*
4851+
* <p>If the indicated activity does not appear in the history stack, this will finish
4852+
* each activity in this task until the root activity of the task is reached, resulting in
4853+
* an "in-app home" behavior. This can be useful in apps with a complex navigation hierarchy
4854+
* when an activity may be reached by a path not passing through a canonical parent
4855+
* activity.</p>
48514856
*
48524857
* <p>This method should be used when performing up navigation from within the same task
48534858
* as the destination. If up navigation should cross tasks in some cases, see

0 commit comments

Comments
 (0)