Did you and your family live in California for those four years, or did you attend a boarding school and return home (not California) when not in school?
Here is the general UC residency policy: University of California - Admissions
If you and your family have lived in California for four years, you probably qualify for instate tuition. One note concerns the type of visa:
Students holding nonimmigrant visas (F1, J1, etc.) may not establish California residency for purposes of fees.
As long as that does not apply to you, you are probably a California resident.