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

am: e385255db4

Change-Id: Ib094039b1c515af77fcc3c051352de5cb15861cb
This commit is contained in:
Mihai Popa
2018-08-15 12:43:55 -07:00
committed by android-build-merger

View File

@@ -1553,7 +1553,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];