Two police officers who glanced under the door of a toilet stall in a public restroom at Portland State University didn't violate 45-year-old Timothy John Wilson's privacy rights.

That's because Wilson was lying on the floor of the stall with his pants pulled down -- and it was clear to anyone who stooped over to see that Wilson was masturbating, the Oregon Court of Appeals ruled Wednesday.

The Appeals Court upheld Wilson’s conviction for public indecency. It rejected his argument that police violated his constitutional right to privacy by conducting an unlawful search on March 15, 2016, in the restroom at PSU’s Urban Center.

In making its ruling, the Appeals Court also cited many examples in which police peeking, peering and craning for a better view were acting within the bounds of the Oregon Constitution.

The Appeals Court pointed to a 1987 case -- in which it found a Bend cop acted lawfully by standing on a rock to gain a view over a 6-foot-tall backyard fence to see a man tending to his illegal marijuana grow. In a 2003 case, the Appeals Court also found that a Tigard cop did nothing wrong by looking through a 3-inch-wide gap in the blinds of an apartment window. The officer saw a man inside snorting cocaine.

But the Appeals Court noted that there are limits -- especially when it comes to the use of hidden cameras and “the final bastion of privacy ... human procreation and excretion.” The Appeals Court pointed to a few cases in which it found police violated the privacy of public masturbators by hiding cameras in public restrooms to catch them.

In Wilson’s case, PSU officers Gregory Marks and David Troppe witnessed Wilson’s act, in person. The Appeals Court also noted that the officers’ behavior was acceptable, given that it is not uncommon for someone who walks into a public restroom to glance under a stall door to see if a toilet is occupied.

At the time of his arrest, Wilson told jailers that he’d spent his teen years as a ward of the state. He also said he'd struggled with mental health problems for decades, been homeless for more than 30 years and drank alcohol daily.

After a one-day trial, Multnomah County Circuit Judge Bronson James found Wilson guilty of misdemeanor public indecency and sentenced him to 45 days in jail. James, who is now a judge on the Appeals Court, didn’t participate in Wednesday’s ruling.

The ruling was made by a three-judge panel: Rex Armstrong, Douglas Tookey and Scott Shorr. Read the decision here.

-- Aimee Green

Comments on this story have been closed. Readers can comment on The Oregonian's Facebook page.