code: public void closePolygonRing(List<LatLng> points) {
          if (!PolyUtil.isClosedPolygon(points)) {
              LatLng first = points.get(0);
              points.add(new LatLng(first.latitude, first.longitude));
          }
      }
docs: Close the polygon ring (exterior or hole) points if needed
  
  @param points ring points
  @since 1.3.2