From 60bf8c117b2388a8f243f20e673c29656548be4a Mon Sep 17 00:00:00 2001 From: Tony Wickham Date: Fri, 20 Sep 2019 12:54:14 -0700 Subject: 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 --- .../src/com/android/quickstep/LauncherActivityControllerHelper.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherActivityControllerHelper.java') 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(); -- cgit v1.2.3