diff options
author | Tony Wickham <twickham@google.com> | 2019-09-20 12:54:14 -0700 |
---|---|---|
committer | Tony Wickham <twickham@google.com> | 2019-09-20 22:01:18 +0000 |
commit | 60bf8c117b2388a8f243f20e673c29656548be4a (patch) | |
tree | 29cbad63c0dea0fed86f92172f01e8918207d560 | |
parent | 24fb1526e24c4e791f7c1792ad1962730072bb4b (diff) | |
download | packages_apps_Trebuchet-60bf8c117b2388a8f243f20e673c29656548be4a.tar.gz packages_apps_Trebuchet-60bf8c117b2388a8f243f20e673c29656548be4a.tar.bz2 packages_apps_Trebuchet-60bf8c117b2388a8f243f20e673c29656548be4a.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
-rw-r--r-- | quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherActivityControllerHelper.java | 4 |
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(); |