Fix NPEs when swiping up from keyguard

- In onRecentsAnimationCanceled
- In applyLoadPlan

Test: Lock screen from home screen, swipe up from bottom of keyguard
Fixes: 197622171
Change-Id: Ibb6b292cb99ad2f08e402c1a6e311b819c5f7d73
This commit is contained in:
Tony Wickham
2021-08-31 09:46:32 -07:00
parent e55c0feb43
commit b922452bf5
2 changed files with 6 additions and 2 deletions
@@ -805,7 +805,9 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
mActivityInitListener.unregister();
mStateCallback.setStateOnUiThread(STATE_GESTURE_CANCELLED | STATE_HANDLER_INVALIDATED);
TaskViewUtils.setDividerBarShown(mRecentsAnimationTargets.nonApps, true);
if (mRecentsAnimationTargets != null) {
TaskViewUtils.setDividerBarShown(mRecentsAnimationTargets.nonApps, true);
}
// Defer clearing the controller and the targets until after we've updated the state
mRecentsAnimationController = null;
@@ -1351,8 +1351,10 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
}
Log.d(TASK_VIEW_ID_CRASH, "taskViewCount: " + getTaskViewCount()
+ " " + sb.toString());
mRunningTaskViewId = -1;
} else {
mRunningTaskViewId = newRunningTaskView.getTaskViewId();
}
mRunningTaskViewId = newRunningTaskView.getTaskViewId();
}
if (mNextPage == INVALID_PAGE) {