diff --git a/services/core/java/com/android/server/wm/InputMonitor.java b/services/core/java/com/android/server/wm/InputMonitor.java index d819557006a63..6efda04ba9895 100644 --- a/services/core/java/com/android/server/wm/InputMonitor.java +++ b/services/core/java/com/android/server/wm/InputMonitor.java @@ -543,7 +543,7 @@ final class InputMonitor { if (recentsAnimationController.updateInputConsumerForApp( mRecentsAnimationInputConsumer.mWindowHandle)) { mRecentsAnimationInputConsumer.show(mInputTransaction, - recentsAnimationController.getHighestLayerTask()); + recentsAnimationController.getHighestLayerActivity()); mAddRecentsAnimationInputConsumerHandle = false; } } diff --git a/services/core/java/com/android/server/wm/RecentsAnimationController.java b/services/core/java/com/android/server/wm/RecentsAnimationController.java index c457df9f6e869..d7dc3061f250a 100644 --- a/services/core/java/com/android/server/wm/RecentsAnimationController.java +++ b/services/core/java/com/android/server/wm/RecentsAnimationController.java @@ -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) {