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

Commit 6fb1ddf5 authored by Chih-Chung Chang's avatar Chih-Chung Chang Committed by Android (Google) Code Review
Browse files

Merge "Fix 5533861: Correct the thumbnail area hit testing calculation." into ics-mr1

parents 4c89478b 003328e9
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -599,14 +599,18 @@ public class SlotView extends GLView {
            absoluteX -= mHorizontalPadding;
            absoluteY -= mVerticalPadding;

            if (absoluteX < 0 || absoluteY < 0) {
                return INDEX_NONE;
            }

            int columnIdx = absoluteX / (mSlotWidth + mSlotGap);
            int rowIdx = absoluteY / (mSlotHeight + mSlotGap);

            if (columnIdx < 0 || (!WIDE && columnIdx >= mUnitCount)) {
            if (!WIDE && columnIdx >= mUnitCount) {
                return INDEX_NONE;
            }

            if (rowIdx < 0 || (WIDE && rowIdx >= mUnitCount)) {
            if (WIDE && rowIdx >= mUnitCount) {
                return INDEX_NONE;
            }