Account for deltas due to rounding when comparing aspect ratios.

The aspect ratio applied to an activity is rounded up to the nearest
pixel. This rounding will lead to a deviation in the aspect ratio
when recalculated from dimensions. A straight comparison of these
values as floats may lead to false positives.

This change extends the use of deltas when comparing equality of
aspect ratios in tests to other scenarios, in particular less than
or equals.

Test: atest android.server.am.AspectRatioSdk25Tests#testMaxAspectRatioPreOActivity
Change-Id: I196163643743e965942c53e5c99038e85d5851d7
Fixes: 78229272
2 files changed