A bill recently signed into law by Governor Jerry Brown of California has privacy advocates and tech industry experts alike singing its praises.

In what has been called a “landmark victory for digital privacy,” citizens in the state can no longer have their electronic communications or activities turned over to the government without a warrant, meaning a judge must find valid reason for these private correspondences to be accessed by law enforcement or the government.

It’s not hard to make the connection between this act and the events involving whistleblower Edward Snowden. In a case that still has an undecided outcome, Snowden gave journalists proof that the government had compelled cellular service providers to release the digital communications from millions of their customers under the auspices of battling terrorism. Cellular providers have indicated they’ve had trouble regaining consumers’ trust after what many have seen as an intrusion into their rights to privacy, one that the providers readily cooperated with.

Under the new California Electronic Communications Privacy Act, authored by state senators Mark Leno (D-San Francisco) and Joel Anderson (R-Alpine), any entity that needs access to customers’ private communications over text message, email, or other digital formats will have to secure a warrant before the cellular provider can turn them over. Leno’s explanation of the bill compared a text message to a letter secured in a private desk drawer; the letter is currently protected property as the police cannot come into the home and remove it without legal justification; if they do so without proper authorization, then it becomes inadmissible as evidence. The authors of the bill have clearly demonstrated that an email is the same as that letter and therefore deserves the same level of citizen protection.

While some might argue that using a cellular provider automatically forfeits any expectation of privacy—and therefore the government should be allowed to read a suspect’s emails or text messages without his permission or knowledge—there’s another digital feature that is now protected in the bill: GPS location. This bill will require a warrant for law enforcement to use a suspect’s phone location to prove his whereabouts.

Currently, the federal law governing this type of seizure of digital communication allows law enforcement to only need a subpoena to get these records, not a warrant. More than 300 members of Congress have cosponsored legislation to update that law to better protect citizens’ privacy, but so far no action has been taken.