Skip to content

Commit 0de06b7

Browse files
author
Jean-Baptiste Queru
committed
Merge into jb-mr1-dev
Change-Id: I02a0c4a7c8f66c52631f962e097c28f6a41d7a64
2 parents c68accd + 9ceac5a commit 0de06b7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

core/java/android/app/TaskStackBuilder.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,11 @@ public TaskStackBuilder addParentStack(Activity sourceActivity) {
128128
if (parent != null) {
129129
// We have the actual parent intent, build the rest from static metadata
130130
// then add the direct parent intent to the end.
131-
addParentStack(parent.getComponent());
131+
ComponentName target = parent.getComponent();
132+
if (target == null) {
133+
target = parent.resolveActivity(mSourceContext.getPackageManager());
134+
}
135+
addParentStack(target);
132136
addNextIntent(parent);
133137
}
134138
return this;

0 commit comments

Comments
 (0)