It was one of those sneaky jokes you had to think about. Usually when you have to think twice about a joke, it's often an insult.
In this scene. he was just getting arrested as usual, and getting roughed up as usually. There were two black cops handcuffing him. While he was being his normal nonchalant self, his chest was slammed once to the hood of the squad car after he was already handcuffed. That scene looked odd to me already, because I seldom saw any scene like that from any of the 70's shows with black cops acting that aggressive towards a white guy who wasn't even a threat. I don't really recall too many black people on The Rockford files period right off bat. Anyway, to tell the two black cops they were being a little too rough he said, "Good job, but John Wayne would have kept his back towards the sun". This meant although they thought they were tough like John Wayne, they were still black. If the real John Wayne had to be part black, he would have at least had enough sense to only let his backside be black by keeping his back to the sun, and not his face were everybody can notice it. In otherwords, the black cops still weren't white, the normal color; instead they got burnt. There's no other way I could have read that joke other than some kind of racial slur. Even if I'm wrong, it was put out there were it could be taken wrong. Anyway, the scene ended with one of the black officers saying, "What?" Not like he was offended, but like he didn't get it. But in real life, he would have got it the same way I did.