Driver whips out phone in pulled over car, gets another ticket. Were police in the wrong?

Q: I was pulled over for doing a rolling stop at a stop sign. I was headed to a meeting so when I got pulled over, I whipped out my phone to text my contact that I was going to be late. The officer then issued me another ticket for using my cellphone in a vehicle [...]