If a person comes into this State in obedience to a subpoena directing him to attend and testify in this State, he shall not, while in this State pursuant to the subpoena or order, be subject to arrest or the service of process, civil or criminal, in connection with matters which arose before his entrance into this State under the subpoena.
Ca. Pen. Code § 1334.4