Most companies have a policy that if a resident resides in a unit for X amount of years they are no longer responsible for the painting or carpet of that unit. Find out what it is and compare to the amount of time you resided in the unit. Also you can look on the apartment association website of California and find out what the laws are on normal ware and tare of an apartment. You can also find out those laws by calling fair housing of California.
If you find that you need to dispute the findings of the manager than you also need to be able to prove your case, like with pictures or compare your move in inspection with your move out inspection.
They best way to protect yourself in the future is take pictures of your apartment at inspection time. Give a copy of those pictures to the manager and have the manager sign for them. Then when you move out, take pictures again and have the manager sign for them again.
Good luck!! I hope this helped.