In recent months the issue of warrantless cell phone searches has arisen in several states with varying results.

Editor’s Note: Amy Gahran writes about mobile tech for CNN.com. She is a San Francisco Bay Area writer and media consultant whose blog, Contentious.com, explores how people communicate in the online age.

Story highlights

New law would override a January ruling by the California Supreme Court

Law would require police in that state to obtain a warrant before searching someone's cell phone

The Peace Officers Research Association of California opposed the law

CNN  — 

If you get arrested in California, the photos, e-mails and other personal data on your cell phone soon could be a bit safer from prying police eyes soon. A bill passed by the state legislature would require law-enforcement officers to obtain a warrant before searching the cell phone of a person placed under arrest.

If signed by the governor, the bill would override a January ruling by the California Supreme Court. According to California Sen. Mark Leno, who sponsored the legislation, this ruling had “legalized the warrantless search of cell phones during an arrest, regardless of whether the information on the phone is relevant to the arrest or if criminal charges are ever filed.”

The new California law unanimously passed in the state Assembly. Gov. Jerry Brown has until October 9 to sign it into law, according to a spokesman from the governor’s office.

Under this legislation, California law enforcement officers would have to first obtain a search warrant when there is probable cause to believe a suspect’s portable electronic device contains evidence of a crime.

The Peace Officers Research Association of California, which opposed the bill, argued: “Restricting the authority of a peace officer to search an arrestee unduly restricts their ability to apply the law, fight crime, discover evidence valuable to an investigation and protect the citizens of California.”

The California legislature disagreed, findi