There are a lot of details which could be important here. The short answer, though, is "very probably" yes. Obviously as a sworn peace officer your friend should not be engaging in any abusive or dishonest tactics, period, whether or not the technically run afoul of the law or department procedure. That being said, it is very likely that this conduct ran afoul of any police department's administrative rules and regulations, and depending on the circumstances, might have been unlawful. It could also lead to 'legal trouble' in the sense that it would hurt the case against the defendant from the perspective of law enforcement. I would urge you to have the counsel for the defendant notified of this conduct, but that's another issue.
Any answer provided on Avvo, including this one, is a general answer about a legal question, not specific legal advice. Different lawyers may analyze this or any other matter differently, especially if there are additional facts not reflected in the question. I am not your attorney until retained by a written retainer agreement signed by both of us. I licensed in the state of California and the Central District of the Ninth Circuit.
I agree with Mr. Bouvier-Brown. Your friend may not get into legal trouble. But, he may get into trouble with his superiors at the police department. The actions you described sound prejudicial to the defendant and could complicate the case for the prosecution or even result in a dismissal. If that happens, I'm sure your friend will get an earful from the DA's office.
The response above is not intended as legal advice. This response does not create an attorney-client relationship. Legal questions can only be fully answered through consultation with an attorney to whom you give full and accurate details. Anything you post here is not confidential and is not protected by the attorney-client relationship. It is highly recommended that you seek advice from a criminal defense attorney licensed in your jurisdiction by setting up a confidential meeting.
As an attorney, if this were my case, I would certainly have confronted this officer formally on the stand. Law Enforcement officers would best be careful talking to represented clients, especially before a court proceeding, inside the courthouse, before a prelim.
I would have a field day with your friend, and his case must be crap against the defendant if he had to be fishing on the day of the prelim.
Tell your friend to keep his oath to protect and serve and not rely on intimidation and bullying. Defense attorney's have a way of dealing with cheating and bullying officers. Its called the truth.
Attorney James R. Fox If you found this answer helpful, let me know by clicking the "Mark as Helpful" button at the bottom of this answer or select it as Best Answer. It’s easy and appreciated. This response is intended to be a general statement of law, should not be relied upon as legal advice, does not create an attorney/client relationship and does not create a right to continuing email exchanges.