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

Commit a0f04940 authored by Alan Viverette's avatar Alan Viverette
Browse files

Remove unnecessary null check in FastScroller

Bug: 19805564
Change-Id: I12e1a3cadf52038fb480e5694d12b6ec5e0e467b
parent 6022edc5
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -753,13 +753,13 @@ class FastScroller {
        final View track = mTrackImage;
        final View thumb = mThumbImage;
        final Rect container = mContainerRect;
        final int containerWidth = container.width();
        final int widthMeasureSpec = MeasureSpec.makeMeasureSpec(containerWidth, MeasureSpec.AT_MOST);
        final int maxWidth = container.width();
        final int widthMeasureSpec = MeasureSpec.makeMeasureSpec(maxWidth, MeasureSpec.AT_MOST);
        final int heightMeasureSpec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
        track.measure(widthMeasureSpec, heightMeasureSpec);

        final int trackWidth = track.getMeasuredWidth();
        final int thumbHalfHeight = thumb == null ? 0 : thumb.getHeight() / 2;
        final int thumbHalfHeight = thumb.getHeight() / 2;
        final int left = thumb.getLeft() + (thumb.getWidth() - trackWidth) / 2;
        final int right = left + trackWidth;
        final int top = container.top + thumbHalfHeight;