Fix placeholder not shown after launch again

This issue is regressed by [1].
When we verify if the container is top active container,
we should filter out the case that the Activity is not in
TaskFragmentContainer.

fixes: 224431790
Test: manual - test steps mentioned in bug

[1]: 3d419be76f

Change-Id: Iae3b2b903bf15448d429b8edd25ceeef97e74738
This commit is contained in:
Charles Chen
2022-03-15 15:47:24 +08:00
parent 781829d9a6
commit f7a3e79fa3

View File

@@ -501,7 +501,7 @@ public class SplitController implements JetpackTaskFragmentOrganizer.TaskFragmen
final TaskFragmentContainer container = getContainerWithActivity(
activity.getActivityToken());
// Don't launch placeholder if the container is occluded.
if (container != getTopActiveContainer()) {
if (container != null && container != getTopActiveContainer()) {
return false;
}