From b442aee4c4335106f4e813769f5d4220e8a8349c Mon Sep 17 00:00:00 2001 From: Pat Manning Date: Thu, 22 Jul 2021 08:21:35 +0000 Subject: [PATCH] Add null check for recents scaling during quick switch. Test: manual - FallbackRecentsTest.goToOverviewFromHome and StartLauncherViaGestureTests.testStressPressHome were previously failing due to null mActivity in AbsSwipeUpHandler#getScaleProgressDueToScroll. Bug: 192470757 Change-Id: I562171c22ad3c89e64b4dc853a266c8b8b78402c --- quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java index 830b7fa26d..8a816cadc7 100644 --- a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java +++ b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java @@ -1809,7 +1809,7 @@ public abstract class AbsSwipeUpHandler, // Scaling of RecentsView during quick switch based on amount of recents scroll private float getScaleProgressDueToScroll() { - if (!mActivity.getDeviceProfile().isTablet || mRecentsView == null + if (mActivity == null || !mActivity.getDeviceProfile().isTablet || mRecentsView == null || !mRecentsViewScrollLinked) { return 0; }