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 the individual or while controlling or transferring the individual in custody.