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

Commit 3975de5f authored by Matthew Ng's avatar Matthew Ng
Browse files

No recents items can be dismissed by tap or swipe

When there are no recents items shown, any tap or swipe will dismiss it
and go back to the launcher.

Bug: 31464845
Fixes: 31464845
Test: manual - overview with no recents and tap the screen to dismiss
Change-Id: I98987daf4d064e3f65141f790e68018fcf445c26
parent 6556aa93
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ import com.android.systemui.recents.Recents;
import com.android.systemui.recents.RecentsConfiguration;
import com.android.systemui.recents.events.EventBus;
import com.android.systemui.recents.events.activity.ConfigurationChangedEvent;
import com.android.systemui.recents.events.activity.HideRecentsEvent;
import com.android.systemui.recents.events.ui.HideIncompatibleAppOverlayEvent;
import com.android.systemui.recents.events.ui.ShowIncompatibleAppOverlayEvent;
import com.android.systemui.recents.events.ui.dragndrop.DragDropTargetChangedEvent;
@@ -139,7 +140,10 @@ public class RecentsViewTouchHandler {
    /** Handles touch events once we have intercepted them */
    public boolean onTouchEvent(MotionEvent ev) {
        handleTouchEvent(ev);
        return mDragRequested;
        if (ev.getAction() == MotionEvent.ACTION_UP && mRv.getStack().getStackTaskCount() == 0) {
            EventBus.getDefault().send(new HideRecentsEvent(false, true));
        }
        return true;
    }

    /**** Events ****/