This is not going to happen.
Just like laws requiring "smart guns" never happened. Or laws that required "microstamping" serial numbers on ammunition.
Lawmakers just make laws to convince people they should be re-elected, the ability to actually implement what they pass is only of passing interest to a few voters.
How many times have lawmakers "solved" the digital divide by passing some bill that makes $X billions available to "fix" the problem - I'll give you a hint - they "solve" this problem every two years in America.
Your proposed solution requires that everyone in California switch to Linux. then every application they use must check a field unique in Linux/Unix.
Has linux even passed the 5% market share level?
The OS developers will say no, and they will dare California to kick Windows, macOS, and Linux off computers in the state.