California judge rules for drugmakers in major opioid lawsuit