Fix NPE when recents is empty

Bug: 74551539
Change-Id: I95416903ed7994cd42f1a8af0fb10591781efd5a
This commit is contained in:
Tony
2018-03-13 14:09:46 +00:00
parent 7eee62b313
commit 329ce74b7c

View File

@@ -133,8 +133,7 @@ public class OverviewSwipeController extends AnimatorListenerAdapter
mSwipeDownEnabled = true;
View view = mRecentsView.getChildAt(mRecentsView.getCurrentPage());
if (mLauncher.getDragLayer().isEventOverView(view, ev) &&
view instanceof TaskView) {
if (view instanceof TaskView && mLauncher.getDragLayer().isEventOverView(view, ev)) {
// The tile can be dragged down to open the task.
mTaskBeingDragged = (TaskView) view;
directionsToDetectScroll = SwipeDetector.DIRECTION_BOTH;