code: public boolean handleTouchEvent(MotionEvent event) {
          boolean needInvalidate = false;
  
          // TODO: detectors always return true, use class member needInvalidate instead local variable as workaround.
          // This flag should be computed inside gesture listeners methods to avoid invalidation.
          needInvalidate = gestureDetector.onTouchEvent(event);
  
          needInvalidate = scaleGestureDetector.onTouchEvent(event) || needInvalidate;
  
          if (isZoomEnabled && scaleGestureDetector.isInProgress()) {
              // Special case: if view is inside scroll container and user is scaling disable touch interception by
              // parent.
              disallowParentInterceptTouchEvent();
          }
  
          if (isValueTouchEnabled) {
              needInvalidate = computeTouch(event) || needInvalidate;
          }
  
          return needInvalidate;
      }
docs: Handle chart touch event(gestures, clicks). Return true if gesture was handled and chart needs to be
  invalidated.