Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4e0b13c9 authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change 3348 into donut

* changes:
  Fix AlphabetIndexer.getSectionForPosition()
parents 327da854 1b111bb6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -248,8 +248,8 @@ public class AlphabetIndexer extends DataSetObserver implements SectionIndexer {
    public int getSectionForPosition(int position) {
        int savedCursorPos = mDataCursor.getPosition();
        mDataCursor.moveToPosition(position);
        mDataCursor.moveToPosition(savedCursorPos);
        String curName = mDataCursor.getString(mColumnIndex);
        mDataCursor.moveToPosition(savedCursorPos);
        // Linear search, as there are only a few items in the section index
        // Could speed this up later if it actually gets used.
        for (int i = 0; i < mAlphabetLength; i++) {