Fix bugs when transitioning out of touch mode

Change-Id: I56cbac17fba500871af839a87d746ea8e1fd5d0f
This commit is contained in:
Adam Powell
2010-03-15 14:07:28 -07:00
parent 4aa44192ee
commit 51a6bee671
2 changed files with 7 additions and 6 deletions

View File

@@ -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) {

View File

@@ -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();
}
}
}