Picture-winged Fly Licking Oak Sap

Small picture-winged flies (Pseudotephritis millepunctata, family Ulidiidae) visiting an oak tree (Quercus crispula, family Fagaceae) to feed on fermenting tree sap. They kept swiveling the spotted wings while licking. I wonder if that behaviour was a courtship display or a threat display. Female has a black ovipositor. Early-August 2014 in Japan.