You’ve had one too many at your local pub. Or rebelled against appearing in court on a traffic ticket. Or cut through private property on your morning jog.

And now the cops are not only arresting you, they’re rifling through your cellphone, looking for evidence.

That’s legal in Georgia and most other states. On Tuesday the U.S. Supreme Court will weigh whether it ought to be, or whether police should have to get a warrant before searching the cellphone of anyone under arrest.

On one side are many law enforcement agencies, which say a phone, no matter how "smart," is no different from a wallet or address book that police can legally search if someone they arrest is carrying it. They say such searches are vital to preserving evidence of crimes and possibly preventing additional harm.

“Why is digital different?” asked Richard Littlehale, speaking on behalf of the Association of State Criminal Investigative Agencies. “Simply because technology aids law enforcement in fulfilling their mission, why should the standard now be higher?”

On the other side are defense lawyers and privacy advocates. They argue that smartphones — devices used by nearly six in 10 American adults — are windows into every corner of our lives, including our finances, romances, whereabouts and medical histories.

“There is an extraordinary amount of personal information on our phones,” said Marc Rotenberg, executive director of the Electronic Privacy Information Center.

Think about it. For most of us, our phone and the sites it links to on the cloud contain a history of (among other things) our phone calls, the content of emails and texts, our entire social-media life, browsing habits, political activities, what we buy, our bank records, travel patterns, medical conditions and possibly — thanks to apps that use location data — exactly where we’ve been 24/7.

And if you think arrest is something that can’t happen to you, Rotenberg said, consider this: 12 million Americans are arrested every year, many of whom are never charged or indicted, let alone convicted.

Or, in the words of Atlanta attorney and former federal prosecutor Mark Campbell, “If you live on this earth long enough, you’re going to commit a misdemeanor.” Campbell’s firm, Changus Campbell LLP, specializes in federal criminal defense and cyberlaw.

Civil liberties groups also worry about what happens to information downloaded from a smartphone after it is in police hands.

“Do they get rid of it?” asked Michael Price of the Brennan Center for Justice at New York University. “How long do they get to keep it? Does it go into a database? Could the IRS take a look?”

Littlehale, who works for the Tennessee Bureau of Investigation, said he understands why people are touchy about their personal information. But he said scenarios like the one Price suggested confuse the role of ordinary law enforcement agencies, which are dedicated to fighting domestic crime, and spy outfits such as the National Security Agency.

“We are not engaged in the bulk collection of data,” Littlehale said. “We don’t have the mandate, we don’t have the capability, we don’t have the interest.

“We’re just interested in evidence. If it’s not evidence, we don’t have time to be interested in it.”

The courts have long held that police have a right to search a person they arrest without obtaining a warrant and to examine anything that person is carrying.

The justification is twofold: to protect the officer’s safety, and to prevent the destruction of evidence while police obtain a search warrant.

Privacy advocates say neither of those is at issue in the case of data stored on a cellphone. They say a smartphone is not a weapon, and police can safeguard any evidence it may contain by holding it until they obtain a warrant to search it.

Law enforcement advocates disagree, noting that cellphones can be “wiped” remotely — say, by an accomplice of the person who is under arrest. Further, they note, most phones have an automatic locking feature; if the user opts in, the phone will lock itself after a specific period of inactivity and require a password or PIN to unlock it.

“Friend of the court” briefs filed with the U.S. Supreme Court by both sides spend a good bit of ink discussing how easy or difficult it is for police to shield against or override such technologies.

Privacy champions' favorite example is the company Cellebrite, whose technology can blow past passwords and locks on many phones and not only download but analyze the contents — sometimes including deleted items.

“It pulls off data that isn’t even accessible to the user,” Price said. “It’s like a science fiction sort of brain transfer.”

But Littlehale said few police agencies have the money for such advanced gadgetry. In the real world, he said, the arresting officer is almost certain to simply check the log of phone calls or the text messages for potential evidence of the alleged crime for which the arrest was made.

In 2012, the Georgia Supreme Court weighed in on the issue, ruling in Hawkins vs. the State that police may search a cellphone carried by someone they arrest. But the court said such searches must be targeted rather than open-ended.

“The fact that a large amount of information may be in a cellphone has substantial import as to the scope of the permitted search,” the ruling said. “That will usually mean that an officer may not conduct a ‘fishing expedition’ and sift through all of the data stored in the cellphone.”

And that is where some legal observers expect the U.S. Supreme Court to land as well.

“The big question,” Campbell said, “is: Is the phone related to the offense of arrest?”