Commit b1181df
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: Jiwon Kim <jiwon88.kim@samsung.com>
Change-Id: I8390a5d8c78b306a6c81dce9d41ceffe93bfdeb7
Signed-off-by: Akash Srivastava <akashniki@gmail.com>1 parent 7c7b048 commit b1181df
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2799 | 2799 | | |
2800 | 2800 | | |
2801 | 2801 | | |
| 2802 | + | |
2802 | 2803 | | |
2803 | 2804 | | |
2804 | 2805 | | |
| |||
0 commit comments