Merge "Fix bugs when transitioning out of touch mode"

This commit is contained in:
Adam Powell
2010-03-15 14:14:13 -07:00
committed by Android (Google) Code Review
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();
}
}
}