Merge "Fix InputConsumer for RecentsAnimationController may access null pointer"

This commit is contained in:
Arthur Hung
2018-12-05 08:29:32 +00:00
committed by Android (Google) Code Review

View File

@@ -504,10 +504,12 @@ public class RecentsAnimationController implements DeathRecipient {
public void binderDied() {
cancelAnimation(REORDER_MOVE_TO_ORIGINAL_POSITION, "binderDied");
// Clear associated input consumers on runner death
final InputMonitor inputMonitor =
mService.mRoot.getDisplayContent(mDisplayId).getInputMonitor();
inputMonitor.destroyInputConsumer(INPUT_CONSUMER_RECENTS_ANIMATION);
synchronized (mService.getWindowManagerLock()) {
// Clear associated input consumers on runner death
final InputMonitor inputMonitor =
mService.mRoot.getDisplayContent(mDisplayId).getInputMonitor();
inputMonitor.destroyInputConsumer(INPUT_CONSUMER_RECENTS_ANIMATION);
}
}
void checkAnimationReady(WallpaperController wallpaperController) {