Social media companies clinched a victory in a flood of ongoing California lawsuits that accuse them of fueling mental illness and addiction in adolescents.

Los Angeles Superior Court Judge Carolyn B. Kuhl sustained the defendants’ demurrer in four January complaints filed by California, Florida, Rhode Island and Washington school districts.