(a)
At any time after the filing of the complaint and before the expiration of 30 days after final judgment, the plaintiff may wholly or partially abandon the proceeding by serving on the defendant and filing in court a written notice of such abandonment.(b)
The court may, upon motion made within 30 days after the filing of such notice, set the abandonment aside if it determines that the position of the moving party has been substantially changed to his detriment in justifiable reliance upon the proceeding and such party cannot be restored to substantially the same position as if the proceeding had not been commenced.(c)
Upon denial of a motion to set aside such abandonment or, if no such motion is filed, upon the expiration of the time for filing such a motion, the court shall, on motion of any party, enter judgment wholly or partially dismissing the proceeding.
Source:
Section 1268.510, https://leginfo.legislature.ca.gov/faces/codes_displaySection.xhtml?lawCode=CCP§ionNum=1268.510.
.