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

Commit cd04c89f authored by Mario Bertschler's avatar Mario Bertschler
Browse files

Removing view.isInTouchMode() because plaform returns false when

using a mouse on long click.

Bug: 38204847

Change-Id: I5b10e8251f4f0a7b148c0404d5939a0fa8325a46
parent bef71011
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -2098,11 +2098,6 @@ public class Workspace extends PagedView
    public void startDrag(CellLayout.CellInfo cellInfo, DragOptions options) {
        View child = cellInfo.cell;

        // Make sure the drag was started by a long press as opposed to a long click.
        if (!child.isInTouchMode()) {
            return;
        }

        mDragInfo = cellInfo;
        child.setVisibility(INVISIBLE);

+0 −3
Original line number Diff line number Diff line
@@ -299,10 +299,7 @@ public class AllAppsContainerView extends BaseContainerView implements DragSourc

    @Override
    public boolean onLongClick(final View v) {
        // Return early if this is not initiated from a touch
        if (!v.isInTouchMode()) return false;
        // When we have exited all apps or are in transition, disregard long clicks

        if (!mLauncher.isAppsViewVisible() ||
                mLauncher.getWorkspace().isSwitchingState()) return false;
        // Return if global dragging is not enabled or we are already dragging
+0 −3
Original line number Diff line number Diff line
@@ -283,9 +283,6 @@ public class Folder extends AbstractFloatingView implements DragSource, View.OnC
        Object tag = v.getTag();
        if (tag instanceof ShortcutInfo) {
            ShortcutInfo item = (ShortcutInfo) tag;
            if (!v.isInTouchMode()) {
                return false;
            }

            mEmptyCellRank = item.rank;
            mCurrentDragView = v;
+2 −2
Original line number Diff line number Diff line
@@ -104,8 +104,8 @@ public class ShortcutsItemView extends PopupItemView implements View.OnLongClick

    @Override
    public boolean onLongClick(View v) {
        // Return early if this is not initiated from a touch or not the correct view
        if (!v.isInTouchMode() || !(v.getParent() instanceof DeepShortcutView)) return false;
        // Return early if not the correct view
        if (!(v.getParent() instanceof DeepShortcutView)) return false;
        // Return early if global dragging is not enabled
        if (!mLauncher.isDraggingEnabled()) return false;
        // Return early if an item is already being dragged (e.g. when long-pressing two shortcuts)
+0 −2
Original line number Diff line number Diff line
@@ -139,8 +139,6 @@ public class WidgetsContainerView extends BaseContainerView
        if (LOGD) {
            Log.d(TAG, String.format("onLongClick [v=%s]", v));
        }
        // Return early if this is not initiated from a touch
        if (!v.isInTouchMode()) return false;
        // When we  are in transition, disregard long clicks
        if (mLauncher.getWorkspace().isSwitchingState()) return false;
        // Return if global dragging is not enabled