You really wouldn’t have to shoot though, just showing a gun is enough of punk repellant but if you were caught they’d probably throw the book at you like they do here in New York which I belive you face 5 years in jail even if the gun is licensed from another state which is outrageous for a constitutional right. All the time we got people here who are thrown in jail for defending their life with a gun whether they shoot or not. Probably the most infamous being the Bernard Goetz case where he shot 5 muggers on the subway (they all lived unfortunately) Not only did he go to jail, he was incredibly outrageously sued by one of the muggers who was awarded $41 million which Goetz still owes to this day.
in california, it is still a problem. it’s probably covered and referred to as “brandishing” or the equivalent. in a crowded situation, it could also be regarded by the courts as analogous to shouting fire in a crowded room (dunno, i am not a lawyer).
if trump comes back to san jose, san jose police has lost its credibility, and a need for national guard troops is indicated imho.