A man spat at a garda and told him he had Covid-19 after he was arrested on suspicion of causing damage at his parents' house, it has been alleged.
Daniel Quearney (25) is accused of spitting, making the threat and becoming violent at a garda station in the west of the capital.
Mr Quearney maintained he was coughing and telling officers he had the virus while he was being restrained, but denied spitting.
Judge Gerard Jones "reluctantly" granted him bail and adjourned the case at Blanchardstown District Court.
Mr Quearney, of no fixed address, is charged with criminal damage to plasterboard at his parents' house; threatening, abusive and insulting behaviour; obstructing Garda Daragh Cullen; and violent behaviour at Blanchardstown Garda Station.
Gda Cullen said he arrested the accused at Hartstown Road, Blanchardstown, on March 27 and later charged him with the offences.
He replied "he didn't do it", the garda said.
Asked to outline the circumstances, Gda Cullen told Judge Jones he was called to the accused's parents' home at Castlewood, Huntstown, where he observed a hole in the wall and spoke to Mr Quearney's father.
The accused was not present at that time and the garda saw him walking down the road.
"After he was arrested, he spat at me and said he had Covid-19," Gda Cullen said.
Applying for bail, defence barrister Simon Fleming said the garda had not been present at the time of the alleged offences in the house.
Judge Jones asked what the accused had to say about spitting at a garda. This was just an allegation at this stage and Mr Quearney was presumed innocent, Mr Fleming said.
"He is, but it's a very serious matter," the judge said.
The accused said: "I was coughing, I told him I had Covid-19. I never spit at any garda."
He said there were six gardai holding his legs and arms and he was not resisting.
Judge Jones said he was "reluctantly" granting bail in the accused's own €100 bond, with no cash lodgment required.
Conditions are that he stays away from the alleged victims and out of the Dublin 15 area, commits no crime and consumes no alcohol or drugs.
He must also sign on at the Bridewell Garda Station.
"I'm not impressed with this carry on," the judge said.
He adjourned the case to a date in June.