If an action or proceeding against a defendant who has been admitted to bail is dismissed, the bail shall not be exonerated until a period of 15 days has elapsed since the entry of the order of dismissal. If, within such period, the defendant is arrested and charged with a public offense arising out of the same act or omission upon which the action or proceeding was based, the bail shall be applied to the public offense. If an undertaking of bail is on file, the clerk of the court shall promptly mail notice to the surety on the bond and the bail agent who posted the bond whenever the bail is applied to a public offense pursuant to this section.
Ca. Pen. Code § 1303