class TouchInputHandler extends MotionInputHandler<K> {

    @Override
    public void onLongPress(@NonNull MotionEvent e) {
        if (!mDetailsLookup.overItemWithSelectionKey(e)) {
            if (DEBUG) Log.d(TAG, "Ignoring LongPress on non-model-backed item.");
            return;
        }

        ItemDetails<K> item = mDetailsLookup.getItemDetails(e);
        // Should really not be null at this point, but...
        if (item == null) {
            return;
        }

        boolean handled = false;

        if (isRangeExtension(e)) {
            extendSelectionRange(item);
            handled = true;
        } else {
            if (!mSelectionTracker.isSelected(item.getSelectionKey())
                    && mSelectionPredicate.canSetStateForKey(item.getSelectionKey(), true)) {
                // If we cannot select it, we didn't apply anchoring - therefore should not
                // start gesture selection
                if (selectItem(item)) {
                    // And finally if the item was selected && we can select multiple
                    // we kick off gesture selection.
                    if (mSelectionPredicate.canSelectMultiple()) {
                        mGestureStarter.run();
                    }
                    handled = true;
                }
            } else {
                // We only initiate drag and drop on long press for touch to allow regular
                // touch-based scrolling
                mOnDragInitiatedListener.onDragInitiated(e);
                handled = true;
            }
        }

        if (handled) {
            mHapticPerformer.run();
        }
    }

      TouchInputHandler(
            @NonNull SelectionTracker<K> selectionTracker,
            @NonNull ItemKeyProvider<K> keyProvider,
            @NonNull ItemDetailsLookup<K> detailsLookup,
            @NonNull SelectionPredicate<K> selectionPredicate,
            @NonNull Runnable gestureStarter,
            @NonNull OnDragInitiatedListener onDragInitiatedListener,
            @NonNull OnItemActivatedListener<K> onItemActivatedListener,
            @NonNull FocusDelegate<K> focusDelegate,
            @NonNull Runnable hapticPerformer);

}