Consider view location in coordinates comparison

On some devices the activity is launched in freeform windows so we need
to take the view location on the screen into consideration.

Also add test for Y coordinate.

Bug: 161753277
Test: atest ViewUnbufferedTest
Change-Id: I5542b3b44476a57aad91f8b63a1cc66b2132809b
1 file changed