Many years ago, after arresting a man in South-Central Los Angeles, I drove him to the old Parker Center Jail for processing. After completing the paperwork, the strip-search, the fingerprinting and what have you, I escorted him to the final stage of the booking process, the point at which we would part ways until meeting again in court. I ushered him into the holding cell and wished him luck, as I most often did when circumstances allowed, and as I was about to close the door on him he turned to me and said, “You’re the nicest po-lice I ever met.”

I took this as a great compliment, for the man, owing to a criminal record best described as opulent, surely had met a good many police officers in his life. Ours had been an interaction as free of friction as any of the type can be, for both of us had observed what was once an unwritten code that governed behavior on both sides of the law: When the cops caught you dirty, you went to jail like a gentleman and didn’t fight, run, or make a fuss about it. The other side of this bargain dictated that police officers not abuse, either physically or verbally, anyone who observed the code.

This was a code that benefitted all involved parties. For the lawbreaker, it meant a trouble-free transition into the justice system, without the injuries and added charges that would arise from resisting arrest. And it made for fewer injuries among the cops as well, not to mention fewer torn uniforms and less paperwork for their sergeants. (Sergeants loathe paperwork, and they treat accordingly any subordinate who generates more than his share.)

It was once well understood in Los Angeles and elsewhere that those who violated this code would be made to wish they hadn’t. If you were so imprudent as to fight with the police, you would lose, an outcome that would be assured by as many cops as it took to bring it about. And if, rather than submitting to arrest, you ran away and hid somewhere, there was a good chance that an ill-tempered police dog would find you and treat you as he would a chew toy.

And so it went for many years, when only the most foolish or drug addled of miscreants ignored the Code of the Street. Alas, the Code is dead, killed by combination of “activism” and political timidity.

Today, in certain neighborhoods in cities across the country, at every arrest, indeed at every traffic stop and simple radio call, police officers are met with hostility and contempt from people who seem to think that their perceived grievances with society renders them immune to the laws the police are there to enforce.

A cop today can catch a burglar coming out a window with a pillowcase full of swag, and before long the burglar himself or his friends or family members or whoever happens to be passing by will be demanding to know the probable cause and asking where’s the warrant and denying responsibility and generally making a scene in the hope that when someone posts all of it to YouTube the police will come out looking bad.

This is the environment in which today’s police officers work, so it should come as no surprise that increasing numbers of them are choosing to avoid situations where the risk of YouTube infamy is present. And this is why, in Chicago, Baltimore, and elsewhere, wherever the police are the only guarantor of order, that order is eroding into violent, bloody chaos.

Which brings us to President Trump’s speech in Brentwood, New York, last week. Against a backdrop of uniformed police officers from Long Island, and speaking to an audience of many more, the president spent a half-hour talking about the evils committed by the MS-13 street gang, which, from its origins near downtown Los Angeles, has metastasized into a coast-to-coast cancer of crime.

And nowhere is it more malignant than on Long Island, where the gang is said to be responsible for 17 murders since January 2016 in Suffolk County alone.

In the course of that speech, the president made an unscripted aside in which he made light of police officers being “rough” with people arrested for violent crimes. Borrowing from comedian Jerry Seinfeld, Mr. Trump admonished his audience not to worry about someone arrested for murder hitting his head while getting into a police car. The cops in attendance laughed and applauded, as did I and most cops who watched the speech.

But not everyone was so amused. In USA Today there appeared a story representative of the breathless reaction. “Police after Trump speech,” said the headline, “We don’t tolerate ‘roughing up’ prisoners.” Similar stories appeared in the Los Angeles Times, the New Yorker, and on CNN, and I assume in every other media outlet staffed by people still aghast that Mr. Trump was elected last November. All of these stories quoted high-ranking police officers who expressed their horror that the president would speak so casually about such a sensitive topic.

For all the good it will do, I would encourage these people to calm down. Mr. Trump’s speech will not unleash a wave of police abuse on an unsuspecting populace. What made all those cops cheer and applaud was not a presidential endorsement of excessive force, but was rather a lighthearted moment in a lengthy speech that was unapologetically and unwaveringly supportive and appreciative of American police officers. “I am a big believer and admirer of people in law enforcement,” said Mr. Trump. “We love our police, we love our sheriffs, we love our ICE officers.”

Later in the speech, the president said, “We have your backs one hundred percent. Not like the old days.”

And there you had it. Far from applauding a presidential license for abuse, those cops in Brentwood, indeed cops everywhere in the country, were applauding a man who, unlike his predecessor, appreciates their work and is willing to express his gratitude for it publicly and without qualification. And what a welcome change that is from the Obama years.

Recall that President Obama could not express support for America’s police without lecturing them on their perceived moral shortcomings. Incredibly, and more to the point insultingly, Mr. Obama could not resist going into scold mode while addressing mourners at the funeral for the five Dallas police officers murdered in July 2016.

For years, America’s police officers watched as the racial grievance industry, aided by credulous reporters and pandering politicians – Mr. Obama most of all – did their best to persuade the country that the police were responsible for all that ails America’s cities, and that all would be just fine if only the cops could tame their “implicit biases” and be a little nicer.

It was all bilge, and at last we have a president who is willing to say so. That’s why all those cops were cheering.