Fix bugs when transitioning out of touch mode
Change-Id: I56cbac17fba500871af839a87d746ea8e1fd5d0f
This commit is contained in:
@@ -2241,7 +2241,8 @@ public final class ViewRoot extends Handler implements ViewParent,
|
||||
* leaving touch mode alone is considered the event).
|
||||
*/
|
||||
private boolean checkForLeavingTouchModeAndConsume(KeyEvent event) {
|
||||
if (event.getAction() != KeyEvent.ACTION_DOWN) {
|
||||
final int action = event.getAction();
|
||||
if (action != KeyEvent.ACTION_DOWN && action != KeyEvent.ACTION_MULTIPLE) {
|
||||
return false;
|
||||
}
|
||||
if ((event.getFlags()&KeyEvent.FLAG_KEEP_TOUCH_MODE) != 0) {
|
||||
|
||||
@@ -1980,11 +1980,11 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
|
||||
if (touchMode == TOUCH_MODE_OVERSCROLL || touchMode == TOUCH_MODE_OVERFLING) {
|
||||
if (mFlingRunnable != null) {
|
||||
mFlingRunnable.endFling();
|
||||
|
||||
if (mScrollY != 0) {
|
||||
mScrollY = 0;
|
||||
invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
if (mScrollY != 0) {
|
||||
mScrollY = 0;
|
||||
invalidate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user