That's a question of policy, not law.
The policy is to have a soft, feminine appearing officer (who hopefully isn’t gay) act at the very least as “bait” for a sexual encounter. It is possible that his actions were more than just being a passive, adjoining stall mate; we won’t know that till he is subject to examination and cross examination.