Leslie Bailey, 28, was arrested on May 8 and charged with indecent exposure. He was allegedly on his knees humping the seat next to the drivers cab at the front of the train and was observed by the train operator. After that little scene he rolled over on his back, began waving his flag vigorously while smoking a crack pipe.
However, it appears that being cranked out of your mind and off your psych meds in San Francisco is enough to beat a charge of indecent exposure. They should have charged him with smoking in public, they might have put him in prison for that.
Bailey was convicted of committing a lewd act in public, sentenced to time served, and released. The article linked here does not say whether or not he got his crack pipe back.