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.
(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, finding that "once in the exclusive control of the police, cellular telephones do not ordinarily pose a threat to officer safety." Furthermore, lawmakers found that existing practices -- including confiscating the phone (without searching it) or promptly applying to a judge for a search warrant -- alleviate concerns about destruction of evidence.
This isn't just about cell phones. The wording of this law specifically refers to "portable electronic devices," defined as: "any portable device that is capable of creating, receiving, accessing, or storing electronic data or communications."
So in addition to cell phones this might conceivably cover tablet computers, laptops, netbooks, e-readers, media players, gaming devices, digital cameras, audio recorders, external hard drives, flash drives and other devices available now or in the future.
The new law can strengthen the rights to freedom of speech and assembly in California. The prior court ruling -- though aimed mainly at gathering evidence about criminal activity such as drug deals or prostitution -- also could be used by police to gain intelligence about the identities or activities of people at protests or other public or private gatherings.
Hanni Fakhoury, staff attorney for the Electronic Frontier Foundation, explained why law-abiding citizens should worry about warrantless cell phone searches. "It's really easy to pick on people who have been arrested and charged with crimes. But that subset could get expanded to cover everyone. Also, an arrest is not the same as a conviction."
The new law also strengthens California's protections for journalists and their sources, according to the California Newspaper Publishers Association. The state's "shield law," which prohibits the state or other litigants from subpoenaing reporters' unpublished notes or other sensitive information related to their work.
Many reporters keep such information on their cell phones and other devices, and it's not unheard of for journalists to get arrested in California.
Fakhoury noted that once police do obtain a warrant to search an arrestee's phone or other portable electronic device, it's possible that everything on that device might become fair game for law enforcement or prosecution.
"If they have a search warrant, depending on its scope, it might be tough to restrict what information on phones they get and how they use it," he said. "Courts are divided on this. They recognize that there must be limits to searches -- but they also know that incriminating evidence can be anywhere, and it's likely to be hidden."
In recent months the issue of warrantless cell phone searches has arisen in several states with varying results. For instance, the Ohio Supreme Court barred warrantless cell phone searches, but lower courts in Georgia and Florida have upheld such searches.
Fakhoury of EFF believes that California's new law sends a strong message to other courts and legislatures around the U.S. -- including the U.S. Supreme Court.
"I certainly see this issue ending up in the U.S. Supreme Court at some point," said Fakhoury. "None of the cases involved relied solely on state law. They all raised constitutional issues. There would be no reason for the Supreme Court not to get involved."
The opinions expressed in this post are solely those of Amy Gahran.