Loading quickstep/src/com/android/launcher3/taskbar/TaskbarView.java +13 −1 Original line number Diff line number Diff line Loading @@ -243,7 +243,19 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar if (!mTouchEnabled) { return true; } mControllerCallbacks.onTouchEvent(event); if (mIconLayoutBounds.contains((int) event.getX(), (int) event.getY())) { // Don't allow long pressing between icons. return true; } if (mControllerCallbacks.onTouchEvent(event)) { int oldAction = event.getAction(); try { event.setAction(MotionEvent.ACTION_CANCEL); return super.onTouchEvent(event); } finally { event.setAction(oldAction); } } return super.onTouchEvent(event); } Loading quickstep/src/com/android/launcher3/taskbar/TaskbarViewController.java +7 −1 Original line number Diff line number Diff line Loading @@ -223,7 +223,11 @@ public class TaskbarViewController { return view -> mControllers.taskbarStashController.updateAndAnimateIsStashedInApp(true); } public void onTouchEvent(MotionEvent motionEvent) { /** * Get the first chance to handle TaskbarView#onTouchEvent, and return whether we want to * consume the touch so TaskbarView treats it as an ACTION_CANCEL. */ public boolean onTouchEvent(MotionEvent motionEvent) { final float x = motionEvent.getRawX(); final float y = motionEvent.getRawY(); switch (motionEvent.getAction()) { Loading @@ -239,6 +243,7 @@ public class TaskbarViewController { mControllers.taskbarStashController.startStashHint( /* animateForward= */ false); mCanceledStashHint = true; return true; } break; case MotionEvent.ACTION_UP: Loading @@ -249,6 +254,7 @@ public class TaskbarViewController { } break; } return false; } } } src/com/android/launcher3/BubbleTextView.java +4 −0 Original line number Diff line number Diff line Loading @@ -409,6 +409,10 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver, * Returns true if the touch down at the provided position be ignored */ protected boolean shouldIgnoreTouchDown(float x, float y) { if (mDisplay == DISPLAY_TASKBAR) { // Allow touching within padding on taskbar, given icon sizes are smaller. return false; } return y < getPaddingTop() || x < getPaddingLeft() || y > getHeight() - getPaddingBottom() Loading Loading
quickstep/src/com/android/launcher3/taskbar/TaskbarView.java +13 −1 Original line number Diff line number Diff line Loading @@ -243,7 +243,19 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar if (!mTouchEnabled) { return true; } mControllerCallbacks.onTouchEvent(event); if (mIconLayoutBounds.contains((int) event.getX(), (int) event.getY())) { // Don't allow long pressing between icons. return true; } if (mControllerCallbacks.onTouchEvent(event)) { int oldAction = event.getAction(); try { event.setAction(MotionEvent.ACTION_CANCEL); return super.onTouchEvent(event); } finally { event.setAction(oldAction); } } return super.onTouchEvent(event); } Loading
quickstep/src/com/android/launcher3/taskbar/TaskbarViewController.java +7 −1 Original line number Diff line number Diff line Loading @@ -223,7 +223,11 @@ public class TaskbarViewController { return view -> mControllers.taskbarStashController.updateAndAnimateIsStashedInApp(true); } public void onTouchEvent(MotionEvent motionEvent) { /** * Get the first chance to handle TaskbarView#onTouchEvent, and return whether we want to * consume the touch so TaskbarView treats it as an ACTION_CANCEL. */ public boolean onTouchEvent(MotionEvent motionEvent) { final float x = motionEvent.getRawX(); final float y = motionEvent.getRawY(); switch (motionEvent.getAction()) { Loading @@ -239,6 +243,7 @@ public class TaskbarViewController { mControllers.taskbarStashController.startStashHint( /* animateForward= */ false); mCanceledStashHint = true; return true; } break; case MotionEvent.ACTION_UP: Loading @@ -249,6 +254,7 @@ public class TaskbarViewController { } break; } return false; } } }
src/com/android/launcher3/BubbleTextView.java +4 −0 Original line number Diff line number Diff line Loading @@ -409,6 +409,10 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver, * Returns true if the touch down at the provided position be ignored */ protected boolean shouldIgnoreTouchDown(float x, float y) { if (mDisplay == DISPLAY_TASKBAR) { // Allow touching within padding on taskbar, given icon sizes are smaller. return false; } return y < getPaddingTop() || x < getPaddingLeft() || y > getHeight() - getPaddingBottom() Loading