Fix NPE on ActivityStack.removeTask when launched with invalid taskId
Prevents NPE in removeTask when use getDisplay directly. Bug: 119023840 Test: atest WmTests:ActivityStackTests Change-Id: I894f4b13e8a61c267f51af5331d8524a26cea009
This commit is contained in:
@@ -5438,7 +5438,7 @@ class ActivityStack extends ConfigurationContainer {
|
||||
if (isAttached()) {
|
||||
getDisplay().positionChildAtBottom(this);
|
||||
}
|
||||
if (!isActivityTypeHome() || getDisplay().isRemoved()) {
|
||||
if (!isActivityTypeHome() || !isAttached()) {
|
||||
remove();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user