Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cb9ae182 authored by Winson Chung's avatar Winson Chung
Browse files

Skip launching task if there is no task

Bug: 75974298
Change-Id: I60a6c27c4dfb983d0f6e9832fb3be1e714cea2e7
parent 08bdb7c0
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -84,7 +84,10 @@ public class QuickScrubController implements OnAlarmListener {
        }
        int page = mRecentsView.getNextPage();
        Runnable launchTaskRunnable = () -> {
            ((TaskView) mRecentsView.getPageAt(page)).launchTask(true);
            TaskView taskView = ((TaskView) mRecentsView.getPageAt(page));
            if (taskView != null) {
                taskView.launchTask(true);
            }
        };
        int snapDuration = Math.abs(page - mRecentsView.getPageNearestToCenterOfScreen())
                * QUICKSCRUB_END_SNAP_DURATION_PER_PAGE;