The Supreme Court on Wednesday officially ruled that phones in the United States are “generally protected from searches without warrant,” which means law enforcement should now need a warrant before they try to open your phone and use its contents as evidence against you.

The suit, Riley v. California was brought to the Supreme Court after a man named David Riley was pulled over in California for a traffic violation. Police took a cell phone from Riley during a search, noticed that Riley was using “a term associated with a street gang,” and then handed the phone over to a detective. After the detective went through the phone, Riley was arrested in connection with a shooting – all of this stemming from a traffic violation.

“The data a user views on many modern cell phones may not in fact be stored on the device itself,” the Supreme Court said. “Treating a cell phone as a container whose contents may be searched incident to an arrest is a bit strained as an initial matter.”

Here’s another way the Supreme Court considered searching cell phones:

The United States concedes that the search incident to arrest exception may not be stretched to cover a search of files accessed remotely-that is, a search of files stored in the cloud. Such a search would be like finding a key in a suspect’s pocket and arguing that it allowed law enforcement to unlock and search a house. Officers searching a phone’s data would not typically know whether the information they are viewing was stored locally at the time of the arrest or has been pulled from the cloud.”

That doesn’t mean that police officers can’t inspect your data, however. “Our holding, of course, is not that the information on a cell phone is immune from search; it is instead that a warrant is generally required before such a search, even when a cell phone is seized incident to arrest,” the Supreme Court said.