From ce563b6b44d19fb905e1c1c8be35d552159af15e Mon Sep 17 00:00:00 2001 From: Tony Wickham Date: Fri, 1 Jul 2022 16:52:06 -0700 Subject: [PATCH] Add null check on mRecentsView in the InputConsumerProxy Test: N/A Fixes: 237217685 Change-Id: I45352f180e3df3298039b183eee743e5a246f543 --- .../src/com/android/quickstep/AbsSwipeUpHandler.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java index 0972e4e9c0..bce9dbffb7 100644 --- a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java +++ b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java @@ -297,9 +297,12 @@ public abstract class AbsSwipeUpHandler, mActivityInterface = gestureState.getActivityInterface(); mActivityInitListener = mActivityInterface.createActivityInitListener(this::onActivityInit); mInputConsumerProxy = - new InputConsumerProxy(context, - () -> mRecentsView.getPagedViewOrientedState().getRecentsActivityRotation(), - inputConsumer, () -> { + new InputConsumerProxy(context, /* rotationSupplier = */ () -> { + if (mRecentsView == null) { + return ROTATION_0; + } + return mRecentsView.getPagedViewOrientedState().getRecentsActivityRotation(); + }, inputConsumer, /* callback = */ () -> { endRunningWindowAnim(mGestureState.getEndTarget() == HOME /* cancel */); endLauncherTransitionController(); }, new InputProxyHandlerFactory(mActivityInterface, mGestureState));