Looking at your texts is not like searching your pockets, judges say.

On Wednesday, the Texas Court of Criminal Appeals ruled that law enforcement officials do need a warrant to search an arrested person's cell phone after they've been jailed.

The ruling did not decide whether it is legal or not for police to search a suspect's phone at the incidence of arrest, which is currently a hotly contested subject. The Supreme Court is set to decide that matter later this year.

For now, however, seven Texas appeals court judgeshave ruled that a person has a legitimate expectation of privacy over the contents of their cell phone while the phone is being stored in the jail property room. An eighth judge wrote a dissenting opinion.

The case, Texas v. Granville, involved Anthony Granville, a student who was arrested for causing a disturbance on a school bus. After Granville was arrested, his cell phone was placed in the booking room. Later, a “School Resources Officer” was told that Granville had taken a photo of another student urinating in the boys' bathroom prior to his arrest. The officer, who had not been involved in the arrest of Granville, went down to the booking room, obtained Granville's phone, turned it on, found the photo, and printed out a copy of it. The officer then kept the phone as evidence and charged Granville with Improper Photography, a state felony.

Granville's lawyers moved to suppress the evidence against him, but the prosecution maintained that an officer can search anything in the jail's booking room if there is probable cause. The trial judge disagreed, and the state appealed. But Texas authorities did not find much more support in the Court of Appeals either.

In her majority ruling yesterday, Judge Cochran wrote:

The Fourth Amendment states that “[t]he right of the people to be secure in their persons, houses, papers, and effects against unreasonable searches and seizures shall not be violated.” The term “papers and effects” obviously carried a different connotation in the late eighteenth century than it does today. No longer are they stored only in desks, cabinets, satchels, and folders. Our most private information is now frequently stored in electronic devices such as computers, laptops, iPads, and cell phones, or in "the cloud" and accessible by those electronic devices. But the "central concern underlying the Fourth Amendment" has remained the same throughout the centuries; it is "the concern about giving police officers unbridled discretion to rummage at will among a person's private effects." This is a case about rummaging through a citizen's electronic private effects - a cell phone - without a warrant.

Although the ruling does not prohibit all warrantless searches of cell phones, the ruling is still very important, perhaps for less obvious reasons. “[T]he court recognizes that just because you've surrendered something to someone else (especially when that surrender is involuntary), that you can still maintain an expectation of privacy in the data and the item,” wrote Hanni Fakhoury, an attorney for the Electronic Frontier Foundation. “That has implications beyond this case and really is the heart of the issue in the NSA litigation (which the court itself acknowledges toward the end of the opinion, even citing from Klayman v. Obama) as well as other issues surrounding law enforcement use of new technologies like cell site data.”

Several cases challenging the NSA's bulk collection of phone call metadata have been decided with differing outcomes. In December 2013, a federal judge found the NSA's activities unconstitutional, but in a separate case another federal judge found the collection of information legal. Obviously this ruling only extends to Texas law, but it affirms that cell phones contain the equivalent of a person's private effects and should be protected from search as such.

"This is a major victory not only for privacy, but for common sense," wrote Fred Cate, a professor of law at Indiana University. "Over the past decade the government has asserted—and often acted its assertion that—it is free to collect data from our cellphones for national security purposes, whenever we cross borders, or if we happen to be arrested. This case reflects a small, but very significant, judicial rejection of that assertion."

Update 01:38 2/28/2014: This article was updated to reflect that seven judges made up the majority ruling, and one dissented.