summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Wickham <twickham@google.com>2019-09-20 12:54:14 -0700
committerTony Wickham <twickham@google.com>2019-09-21 04:10:35 +0000
commitd2d58656a4ac1da8580c3636a681f36cba0c1ba9 (patch)
tree87bc88c0eb8596bf90eda5e30ddd23595579c54e
parent3adf6ff5a2de10a131e4949cec622fc228d8dbd4 (diff)
downloadandroid_packages_apps_Trebuchet-d2d58656a4ac1da8580c3636a681f36cba0c1ba9.tar.gz
android_packages_apps_Trebuchet-d2d58656a4ac1da8580c3636a681f36cba0c1ba9.tar.bz2
android_packages_apps_Trebuchet-d2d58656a4ac1da8580c3636a681f36cba0c1ba9.zip
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 Merged-In: I2180cc5e72c343977ea53cc02907ed8dac0f8bc6 (cherry picked from commit 60bf8c117b2388a8f243f20e673c29656548be4a)
-rw-r--r--quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherActivityControllerHelper.java4
1 files changed, 4 insertions, 0 deletions
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 25cc33df0..36eb8a13b 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 @@ public final class LauncherActivityControllerHelper implements ActivityControlHe
TaskView runningTaskView = recentsView.getRunningTaskView();
if (runningTaskView == null) {
runningTaskView = recentsView.getTaskViewAt(recentsView.getCurrentPage());
+ 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();