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

Commit 0a2a2879 authored by Adam Powell's avatar Adam Powell Committed by Android (Google) Code Review
Browse files

Merge "Fix bug 5073637 - Market apps crashing FastScroller"

parents aead35a8 568ccd88
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -116,6 +116,8 @@ class FastScroller {

    private int mOverlayPosition;

    private boolean mMatchDragPosition;

    private static final int FADE_TIMEOUT = 1500;

    private final Rect mTmpRect = new Rect();
@@ -262,6 +264,9 @@ class FastScroller {

        ta.recycle();

        mMatchDragPosition = context.getApplicationInfo().targetSdkVersion >=
                android.os.Build.VERSION_CODES.HONEYCOMB;

        setScrollbarPosition(mList.getVerticalScrollbarPosition());
    }
    
@@ -595,7 +600,7 @@ class FastScroller {
        if (mSectionIndexer == null) {
            getSectionsFromIndexer();
        }
        if (mSectionIndexer == null) {
        if (mSectionIndexer == null || !mMatchDragPosition) {
            return ((mList.getHeight() - mThumbH) * firstVisibleItem)
                    / (totalItemCount - visibleItemCount);
        }