I wouldn't have rolled the window down.
That's what prompted the officer to ask for ID in the first place IMHO.
I'm gonna use this..."I know I don't know you at all but I would hate waste this condom...."
If he asked for ID , I would give it to them , it is just going to make the experience harder if you don't give it up.
Sure it may be infringing on your rights, but it has been going on for so long, they will be suspicious if you do not give it up.
If you feel like you want to fight "the Man" go for it.