code: public static boolean isPointOnPolygon(LatLng point, PolygonOptions polygon, boolean geodesic, double tolerance) {
  
          boolean onPolygon = PolyUtil.containsLocation(point, polygon.getPoints(), geodesic) ||
                  PolyUtil.isLocationOnEdge(point, polygon.getPoints(), geodesic, tolerance);
  
          if (onPolygon) {
              for (List<LatLng> hole : polygon.getHoles()) {
                  if (PolyUtil.containsLocation(point, hole, geodesic)) {
                      onPolygon = false;
                      break;
                  }
              }
          }
  
          return onPolygon;
      }
docs: Is the point of the polygon
  
  @param point     point
  @param polygon   polygon
  @param geodesic  geodesic check flag
  @param tolerance distance tolerance
  @return true if on the polygon