Current and former Facebook leadership reached the agreement with shareholders only one day into the trial.