Homeless sex offender arrested after dog bites Portland cop