The person is a peace officer, correctional officer, state patrol officer, jailer, or keeper of a jail, or person designated with custodial authority by the jailer or keeper, and the contact occurred while the person was searching or arresting an the individual or while controlling or transferring an the individual in custody;.