It’s illegal in 47 states, but too many people are addicted. It’s restricted in 15 states, but it happens in broad daylight and hardly anyone gets caught in the act. It’s condemned even by some of the people who do it.

With that in mind, the AAA Foundation for Traffic Safety has been studying how to minimize the driving distractions that kill 3,500 people and injure 390,000 in U.S. crashes every year.

What they found, in a study presented Wednesday, is that automakers aren’t necessarily the best at deciding what to install in their vehicles.

“What we’ve been studying for the last three or four years is the explosion to technology in the vehicle — hundreds of buttons, touch screens, gesture controls, heads-up displays, voice commands,” said David Strayer, the author of the study. “Our concern is that in many cases the driver will assume that if it’s put in the vehicle, and it’s enabled to be used while the vehicle’s in motion, then it must be safe. That’s just simply not true.”

The AAA Foundation commissioned Strayer, a professor of cognition and neural science at the University of Utah, to compare two aftermarket modes of communication with the ones the manufacturers install in their cars on the assembly line.

Strayer found that Apple’s CarPlay and Google’s Android Auto shaved seconds that could prove crucial from the time a driver was distracted when compared to the “infotainment” the car came with.

He found that drivers were able to get their eyes back on the road with the two aftermarket devices five seconds faster when making a call and 15 seconds faster when programming the navigation system.

“If you start to take your eyes off the road for more than two seconds you start to see the crash risk increase,” Strayer said. “The matter of time it takes to read a text is about 4½ seconds, so the shorter the interaction and the easier the interaction, the less it competes with driving.”

Sending text messages while driving is illegal in all but three states (Montana, Arizona, Missouri). Calling someone on a handheld cellphone while driving is banned in 15 states. And 38 states ban cell use by younger drivers.

AAA’s own survey earlier this year found that 58 percent of drivers thought people talking on their cellphones were a “very serious threat” to their safety and 78 percent said texting was a significant danger, but almost half of them admitted to making calls and 35 percent said they had sent a text or email.

Those numbers — and the inference that other drivers should do what I say, and not what I do — have been fairly consistent in surveys taken over several years.

Another, by the Root Insurance Co. in April, distracted driving awareness month, said 80 percent of drivers admitted to using a mobile device, a third said texting was one of their biggest distractions behind the wheel, 25 percent use social media and 20 percent said they have to check their phone at least every 30 minutes while driving.

Why do people do something they are quick to condemn when others do it?

About half of them told State Farm Insurance in a survey released last year that talking on the phone was “an efficient use of my time,” and 33 percent said they text while driving to “stay in touch with my family.”

Erie Insurance teamed up with the Insurance Institute for Highway Safety on a study that moved from survey perceptions to hard facts, analyzing the data kept by the National Highway Traffic Safety Administration to draw a picture of distracted driving.

Simple daydreaming was the cause of 61 percent of fatal distracted crashes, they found. Cellphone use — talking, listening, dialing, texting — ranked second at 14 percent.

Rubbernecking, talking with someone in the car, fiddling with some other device, adjusting the heating or eating all ranked in the single digits.

“AAA is under no circumstances recommending one [aftermarket] system over another,” said Jake Nelson, AAA’s director of traffic safety advocacy. “Neither Apple CarPlay or Android Auto or any of the systems provided by vehicle manufacturers meet our requirement of being no more demanding than listening to the radio.”

Nelson added: “If the industry continues to say safety is a top priority, they will follow the recommendations of the federal government to lock out certain actions like the ability to program navigation while driving down the road or to send text messages while driving, and that has not happened among many of the vehicle manufacturers.”