in ontario canada
where i am
the law specifically prohibits flashing rear lights
and i believe specifies that front lights must be steady
i ride with both lights flashing almost all the time
as i think it increase visibility
and i have never ever been stopped
but that is here
and california is known for doing things differently
however
it must be a pretty small subset of police
that both know the specific requirements
and also care about someone with incorrect lighting
while many other bicyclists have no lights at all