California Penal Code Section 12040

(a) A person commits criminal possession of a firearm when he or she carries a firearm in a public place or on any public street while masked so as to hide his or her identity. (b) Criminal possession of a firearm is punishable by imprisonment in the state prison or by imprisonment in a county jail not to exceed one year. (c) Subdivision (a) shall not apply to the following: (1) A peace officer who is in the performance of his or her duties. (2) Full-time paid peace officers of other states and the federal government who are carrying out official duties while in this state. (3) Any person summoned by any of the officers enumerated in paragraph (1) or (2) to assist in making arrests or preserving the peace while he or she is actually engaged in assisting that officer. (4) The possession of an unloaded firearm or a firearm loaded with blank ammunition by an authorized participant in, or while rehearsing for, a motion picture, television, video production, entertainment event, entertainment activity, or lawfully organized and conducted activity when the participant lawfully uses the firearm as part of that production, event, or activity. (5) The possession of a firearm by a licensed hunter while actually engaged in lawful hunting, or while going directly to or returning directly from the hunting expedition.