A former staff sergeant in the British Army has been ordered to sign the Sex Offender's Register for five years after pleading guilty to exposing himself.
Barry Wooten, 51, from Cherry Tree Grove, Chorley, had been fixing a table to the wall for an older lady from Longton, Preston Magistrates' Court was told.
The former soldier, who served in the Royal Corps of Transport and the Territorial Army, must sign the Sex Offender's Register for five years, has been given 100 hours unpaid work, a rehabilitation activity, and a restraining order.
Prosecuting, Alex Mann said: " It relates to an incident that happened at the victim's home in 2017, the victim is a retired lady.
" She has a clear recollection of what happened.
"The defendant was in her home to do some DIY.
"Whilst he was completing that job he was dressed appropriately and there were no concerns."
But Wooten, who works for a crane company, went to the bathroom and told her he had accidentally got his trousers wet and asked if he could take them off to dry them.
The victim agreed, and Wooten sat down in his boxer shorts with a cup of tea.
But he then showed the victim an adult pornographic clip on his phone.
The alarmed woman, who was preparing to go out, told him it was inappropriate.
Mrs Mann added: "She then said five minutes later he was standing in the bathroom doorway smiling, and his boxer shorts were down. Both hands were grasped in his boxer shorts. She found the whole thing very odd."
Wooten left her home and the victim never reported it until the following year, when she confided in a relative and police were contacted.
Defending, Greg Earnshaw said his client, a father-of-two, had served in Northern Ireland, Kosovo and Bosnia, and had also been deployed to drive battlefield ambulances in Afghanistan while in the TA.
He added: "He doesn't understand why he did it, he can't explain it.
"He is very sorry for it and showed that by his early guilty plea."
The court heard he had previous similar convictions, but they date back to the 1990s.
He must pay an £85 surcharge and £85 costs.