OSDN Git Service

Always remember the last touch mode state when touch mode changes.
authorRomain Guy <romainguy@android.com>
Mon, 8 Feb 2010 22:58:01 +0000 (14:58 -0800)
committerRomain Guy <romainguy@android.com>
Mon, 8 Feb 2010 22:58:01 +0000 (14:58 -0800)
Do not just rely on getting an onWindowFocusChanged() event. There are cases
where we might not get it (view removed from the window for instance.)

core/java/android/widget/AbsListView.java

index fd6af05..2f96aef 100644 (file)
@@ -1953,6 +1953,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
                 }
             }
         }
+        mLastTouchMode = isInTouchMode ? TOUCH_MODE_ON : TOUCH_MODE_OFF;
     }
 
     @Override