If your domicile (your main, permanent home) remained in California during your absences, CA considers you a resident for tax purposes unless you're outside California under an employment-related contract for an uninterrupted period of at least 546 consecutive days. See page 3 of this reference for full details: https://www.ftb.ca.gov/forms/2016/16_1031.pdf
You'll find California's full definition of domicile on page 9 of that reference.
Residents of CA are taxed on ALL income, including income from sources outside CA.
**Answers are correct to the best of my ability but do not constitute tax or legal advice.