Handle swipe down on taskbar to stash
- Moved all touch-to-stash logic to new TaskbarStashViaTouchController (handles both tap outside to stash instantly as well as swipe down inside to stash after letting go) - This is a TouchController on TaskbarDragLayer, so it intercepts touches from TaskbarView before icons can be dragged during swipe down Test: swipe up to invoke transient taskbar in an app, swipe down or touch outside to stash Flag: ENABLE_TRANSIENT_TASKBAR=true Fixes: 246631710 Change-Id: I5cf64848bba34ad32fcc80a93fb4f79ebd2c10a7
This commit is contained in:
1 parent
fad8c1c449
commit
c73db73a79
10 files changed
+162
-153
No files matched your search
@@ -18,6 +18,7 @@ package com.android.launcher3.views;
|
||||
|
||||
import static android.view.MotionEvent.ACTION_CANCEL;
|
||||
import static android.view.MotionEvent.ACTION_DOWN;
|
||||
import static android.view.MotionEvent.ACTION_OUTSIDE;
|
||||
import static android.view.MotionEvent.ACTION_UP;
|
||||
|
||||
import static com.android.launcher3.util.window.RefreshRateTracker.getSingleFrameMs;
|
||||
@@ -260,7 +261,10 @@ public abstract class BaseDragLayer<T extends Context & ActivityContext>
|
||||
mTouchCompleteListener = null;
|
||||
}
|
||||
|
||||
if (mActiveController != null) {
|
||||
if (mActiveController != null && ev.getAction() != ACTION_OUTSIDE) {
|
||||
// For some reason, once we intercept touches and have an mActiveController, we won't
|
||||
// get onInterceptTouchEvent() for ACTION_OUTSIDE. Thus, we must recalculate a new
|
||||
// TouchController (if any) to handle the ACTION_OUTSIDE here in onTouchEvent() as well.
|
||||
return mActiveController.onControllerTouchEvent(ev);
|
||||
} else {
|
||||
// In case no child view handled the touch event, we may not get onIntercept anymore
|
||||
|
||||
Reference in new issue
Block a user