Fix dodge rect contains check

Seems that Rect#contains() checks for non-empty
as well as contains. Fix the check so that only
views with non-empty bounds are actually dodged.

Also moved some of the code around so that we
don't do any unnecessary work just to fail fast.

Test: included
BUG: 31528047

Change-Id: I3ee0e0fe87577d02dee22a8ebd8a9e1dc031796e
2 files changed