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
This commit is contained in:
@@ -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 ****/
|
||||
|
||||
Reference in New Issue
Block a user