Fix zordering of recents input consumer

- It should be above the top activity of the task

Bug: 195427335
Test: atest RecentsAnimationControllerTest
Change-Id: Ic2c3a236541d5644f5b34e1c63b10e5e20eaf5f5
This commit is contained in:
Winson Chung
2021-08-12 14:30:55 -07:00
parent 7ca2837ab2
commit 916745dac0
2 changed files with 4 additions and 4 deletions

View File

@@ -543,7 +543,7 @@ final class InputMonitor {
if (recentsAnimationController.updateInputConsumerForApp(
mRecentsAnimationInputConsumer.mWindowHandle)) {
mRecentsAnimationInputConsumer.show(mInputTransaction,
recentsAnimationController.getHighestLayerTask());
recentsAnimationController.getHighestLayerActivity());
mAddRecentsAnimationInputConsumerHandle = false;
}
}

View File

@@ -1103,9 +1103,9 @@ public class RecentsAnimationController implements DeathRecipient {
}
/**
* Returns the task with the highest layer, or null if none is found.
* Returns the activity with the highest layer, or null if none is found.
*/
public Task getHighestLayerTask() {
public ActivityRecord getHighestLayerActivity() {
int highestLayer = Integer.MIN_VALUE;
Task highestLayerTask = null;
for (int i = mPendingAnimations.size() - 1; i >= 0; i--) {
@@ -1116,7 +1116,7 @@ public class RecentsAnimationController implements DeathRecipient {
highestLayerTask = adapter.mTask;
}
}
return highestLayerTask;
return highestLayerTask.getTopMostActivity();
}
boolean isAnimatingTask(Task task) {