The cop later told detectives he had been drinking heavily when the alleged texting occurred, according to officials.