Skip to content
Commit 9db33d9c authored by Jiwon Kim's avatar Jiwon Kim
Browse files

Fixed Handler Leak on RecyclerView



A MotionEvent object is not recycled in case of error at onTouchEvent function.

@Override
public boolean onTouchEvent(MotionEvent e) {
...
final MotionEvent vtev = MotionEvent.obtain(e);
...
    case MotionEvent.ACTION_MOVE: {
        final int index = e.findPointerIndex(mScrollPointerId);
        if (index < 0) {
            Log.e(TAG, "Error processing scroll; pointer index for id "
                    + mScrollPointerId + " not found. Did any MotionEvents get skipped?");
            return false;
        }
...
}

Test: Manual

Signed-off-by: default avatarJiwon Kim <jiwon88.kim@samsung.com>
Change-Id: I8390a5d8c78b306a6c81dce9d41ceffe93bfdeb7
parent 26b017aa
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment