Don't crash when swiping up if there are no TaskViews
This can happen in LockTask mode, after enabling Overview. In that case,
you are locked to the current task, but are allowed to go to overview
but no tasks are shown there.
Bug: 139917483
Change-Id: I2180cc5e72c343977ea53cc02907ed8dac0f8bc6
(cherry picked from commit 60bf8c117b2388a8f243f20e673c29656548be4a)
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherActivityControllerHelper.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherActivityControllerHelper.java
index d7afd32..bbcd3b4 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherActivityControllerHelper.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherActivityControllerHelper.java
@@ -381,6 +381,10 @@
TaskView runningTaskView = recentsView.getRunningTaskView();
if (runningTaskView == null) {
runningTaskView = recentsView.getCurrentPageTaskView();
+ if (runningTaskView == null) {
+ // There are no task views in LockTask mode when Overview is enabled.
+ return;
+ }
}
TimeInterpolator oldInterpolator = translateY.getInterpolator();
Rect fallbackInsets = launcher.getDeviceProfile().getInsets();