Merge "Fix NPE inside REcyclerViewFastScroller" into sc-dev

This commit is contained in:
Hyunyoung Song
2021-06-14 23:18:22 +00:00
committed by Android (Google) Code Review

View File

@@ -344,7 +344,7 @@ public class RecyclerViewFastScroller extends View {
// swiping very close to the thumb area (not just within it's bound)
// will also prevent back gesture
SYSTEM_GESTURE_EXCLUSION_RECT.get(0).offset(mThumbDrawOffset.x, mThumbDrawOffset.y);
if (Utilities.ATLEAST_Q) {
if (Utilities.ATLEAST_Q && mSystemGestureInsets != null) {
SYSTEM_GESTURE_EXCLUSION_RECT.get(0).left =
SYSTEM_GESTURE_EXCLUSION_RECT.get(0).right - mSystemGestureInsets.right;
}