Ki Chun-kei insisted that the whistling was nothing more than drunken antics, and claimed he did not know the policemen were so close when he did it.
But one of the officers claimed he had become deaf for three seconds thanks to the whistling, leading the judge to impose a prison sentence on the demonstrator.
Ki, 50, was participating in an annual demonstration on July 1 last year to mark the anniversary of Hong Kong being handed over to China by the UK, the South China Morning Post reported.
He was caught on camera approaching police and whistling at them, apparently without immediate provocation.
One officer said Ki was less than a foot away from his ear when he whistled sharply, leaving him unable to hear for two or three seconds.
The defendant’s lawyer Pauline Leung Po-lam said that he had not meant to harm the policemen, and argued that ‘a short ringing in their ears’ did not amount to assault.
But magistrate Ho Wai-yang disagreed, pointing out that the officers were clearly identifiable thanks to their uniforms, and characterised the incident as an ‘illegal use of force’.
Ki was found guilty in January of three charges of assaulting police.
‘Every Hongkonger has the right to take part in protests,’ Ms Ho said at the time. ‘The court respects that. But the court does not allow the illegal use of force.’
During sentencing today, the magistrate ruled that Ki should spend six weeks in prison for the three assaults.
She said she was taking into account two similar offences committed by the defendant more than a decade ago.
Ms Po-Lam said that a doctors’ report showed that Ki was an alcoholic, which could have impaired his decision-making.
‘The offence was not made after detailed planning,’ she said. ‘He had perhaps become impulsive after drinking.’
While Hong Kong is a partial democracy which is generally considered much more free than mainland China, many campaigners have complained of a crackdown on civil liberties and human rights in the territory.