Aaron Carey, aged 28, punched Áine Ní Riain, a district court solicitor, in the face when he took her phone while she was on her way home from work.
Carey, who was residing at Judge Darleys Hostel, Parkgate St, Dublin, at the time, pleaded guilty at Dublin Circuit Criminal Court to assaulting Ms Ní Riain causing her harm at Benburb Street and at Wolfe Tone Quay on January 24, 2015.
The court heard Ms Ní Riain followed Carey and grabbed onto him, but he punched her again and escaped with the phone.
Garda Brian Graydon said a colleague encountered Carey and another male trying to sell the phone on Moore St two days later.
Judge Nolan said Ms Ní Riain was “made of tough stuff” and came across as a “very determined lady”.