Fix for bug 7358703 Gmail ANR when trying to compose a message

When deferring scroll to a point, it's possible the text changed between
the time the scroll was requested to the time layout happens. In this
case, it attempts to scroll to a point past the end of the text buffer,
which created an infinite loop.

This patch clamps the scroll offset to the length of the text, so it
just scrolls to the end in that case, rather than crashing.

Change-Id: I53740d119d588560f5a4d9fb80e38f7057faab89
1 file changed