cleanup whitespace
fix setError

setError doesn't work for ICS+. Hack from
stack overflow to get it working cleanly on all
devices