Fixing crash when activity doesn't have a window

Fixes: 198170256
Test: atest RecentsAnimationControllerTest
Change-Id: I74688d5c30b3c8d4032f8a443dd6de50c341c77c
This commit is contained in:
Winson Chung
2021-08-30 15:30:26 -07:00
parent 6cd63468c0
commit f06d81271c

View File

@@ -581,9 +581,12 @@ final class InputMonitor {
if (mAddRecentsAnimationInputConsumerHandle && shouldApplyRecentsInputConsumer) {
if (recentsAnimationController.updateInputConsumerForApp(
mRecentsAnimationInputConsumer.mWindowHandle)) {
mRecentsAnimationInputConsumer.show(mInputTransaction,
recentsAnimationController.getHighestLayerWindow());
mAddRecentsAnimationInputConsumerHandle = false;
final WindowState highestLayerWindow =
recentsAnimationController.getHighestLayerWindow();
if (highestLayerWindow != null) {
mRecentsAnimationInputConsumer.show(mInputTransaction, highestLayerWindow);
mAddRecentsAnimationInputConsumerHandle = false;
}
}
}