Whenever police ask me for my information, as they did twice during the G20, I immediately ask them: "am I legally required to give you my ID?" -- if they say "yes", I then ask them "what law requires that I provide you my ID?"
As a general rule, I do not volunteer any information to the police...