Merge "Fix crash during cursor moving on BiDi text" into pi-dev

This commit is contained in:
Mihai Popa
2018-08-15 19:16:02 +00:00
committed by Android (Google) Code Review

View File

@@ -1583,7 +1583,8 @@ public abstract class Layout {
}
float get(final int offset) {
if (mHorizontals == null) {
if (mHorizontals == null || offset < mLineStartOffset
|| offset >= mLineStartOffset + mHorizontals.length) {
return getHorizontal(offset, mPrimary);
} else {
return mHorizontals[offset - mLineStartOffset];