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

Commit 4f434c7f authored by Alan Viverette's avatar Alan Viverette
Browse files

Don't cast FastScroller adapter to BaseAdapter

BUG: 12130253
Change-Id: I78864a4603599daf39829d33414202c43ca97aa9
parent f51021c3
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -174,7 +174,7 @@ class FastScroller {
    /** Whether the preview image is visible. */
    private boolean mShowingPreview;

    private BaseAdapter mListAdapter;
    private Adapter mListAdapter;
    private SectionIndexer mSectionIndexer;

    /** Whether decorations should be laid out from right to left. */
@@ -892,15 +892,15 @@ class FastScroller {
                    .getAdapter();
            if (expAdapter instanceof SectionIndexer) {
                mSectionIndexer = (SectionIndexer) expAdapter;
                mListAdapter = (BaseAdapter) adapter;
                mListAdapter = adapter;
                mSections = mSectionIndexer.getSections();
            }
        } else if (adapter instanceof SectionIndexer) {
            mListAdapter = (BaseAdapter) adapter;
            mListAdapter = adapter;
            mSectionIndexer = (SectionIndexer) adapter;
            mSections = mSectionIndexer.getSections();
        } else {
            mListAdapter = (BaseAdapter) adapter;
            mListAdapter = adapter;
            mSections = null;
        }
    }