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

Commit 9c271908 authored by thecrazyskull's avatar thecrazyskull Committed by Joey Rizzoli
Browse files

SystemUI: locked tasks should have a valid view



If the view doesn't exist, the card won't be able to receive touch
events. We need those touch events to have a bounce-back animation
when trying to swipe away a locked card.

Change-Id: If7b3c5e5094d2752926eb306dd54264da0ceaa3e
Signed-off-by: default avatarJoey Rizzoli <joey@lineageos.org>
parent df718823
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -438,7 +438,8 @@ class TaskStackViewTouchHandler implements SwipeHelper.Callback {
    @Override
    public View getChildAtPosition(MotionEvent ev) {
        TaskView tv = findViewAtPoint((int) ev.getX(), (int) ev.getY());
        if (tv != null && canChildBeDismissed(tv)) {
        if (tv != null && (canChildBeDismissed(tv)
                || Recents.sLockedTasks.contains(tv.getTask()))) {
            return tv;
        }
        return null;
@@ -449,8 +450,8 @@ class TaskStackViewTouchHandler implements SwipeHelper.Callback {
        // Disallow dismissing an already dismissed task
        TaskView tv = (TaskView) v;
        Task task = tv.getTask();
        return !mSwipeHelperAnimations.containsKey(v) && 
                (mSv.getStack().indexOfStackTask(task) != -1);
        return !mSwipeHelperAnimations.containsKey(v) && !Recents.sLockedTasks.contains(task)
                && (mSv.getStack().indexOfStackTask(task) != -1);
    }

    /**