Transforming the path isn't an option for me since I need the canvas' transformations. This is because I need the canvas' transformation applied to the paint; for instance, if the paint has a gradient.
However, based on the ideas above, I've found a way (rather cumbersome). Any ideas for simplification are welcome.
transformation = canvas.getTotalMatrix() // get the canvas' transformation
transformed_path = Path()
original_path.transform(transformation, transformed_path) // transform the path forward (this changes position, etc)
fill_path = Path()
stroke_paint.getFillPath(transformed_path, fill_path) // create a filled version of the path
inverse_transformation = Matrix()
transformation.invert(inverse_transformation) // get the inverse transformation
fill_path.transform(inverse_transformation) // transform the path back (this changes position, including the stroke width in reverse since we've a filled path now)
stroke_paint.setStyle(Paint.kFill_Style) // change the paint style to fill
canvas.drawPath(fill_path, stroke_paint) // draw the path with the canvas' transformation (this reverses the stroke width change)