Merge "Fix zordering of recents input consumer" into sc-v2-dev

This commit is contained in:
Winson Chung
2021-08-13 03:00:48 +00:00
committed by Android (Google) Code Review
2 changed files with 4 additions and 4 deletions

View File

@@ -543,7 +543,7 @@ final class InputMonitor {
if (recentsAnimationController.updateInputConsumerForApp( if (recentsAnimationController.updateInputConsumerForApp(
mRecentsAnimationInputConsumer.mWindowHandle)) { mRecentsAnimationInputConsumer.mWindowHandle)) {
mRecentsAnimationInputConsumer.show(mInputTransaction, mRecentsAnimationInputConsumer.show(mInputTransaction,
recentsAnimationController.getHighestLayerTask()); recentsAnimationController.getHighestLayerActivity());
mAddRecentsAnimationInputConsumerHandle = false; 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; int highestLayer = Integer.MIN_VALUE;
Task highestLayerTask = null; Task highestLayerTask = null;
for (int i = mPendingAnimations.size() - 1; i >= 0; i--) { for (int i = mPendingAnimations.size() - 1; i >= 0; i--) {
@@ -1116,7 +1116,7 @@ public class RecentsAnimationController implements DeathRecipient {
highestLayerTask = adapter.mTask; highestLayerTask = adapter.mTask;
} }
} }
return highestLayerTask; return highestLayerTask.getTopMostActivity();
} }
boolean isAnimatingTask(Task task) { boolean isAnimatingTask(Task task) {