[Bouncer] Add better way to determine inflection.

It seems that the scenario test failed because it could never reach the
threshold to determine whether the element should fade back in on the
other side. I found a way more elegant approach here.

This is confirmed to fix the scenario test and is way better.

Fixes: 253470463
Test: atest
Change-Id: I5c1d1260d3c9d343fd38ee1ff6e3c72edf161dea
1 file changed