OSDN Git Service

Potential fix for Bug: 10241642
authorAmith Yamasani <yamasani@google.com>
Thu, 8 Aug 2013 23:06:39 +0000 (16:06 -0700)
committerAmith Yamasani <yamasani@google.com>
Thu, 8 Aug 2013 23:06:39 +0000 (16:06 -0700)
Check if the fragment is running before handling click.

Change-Id: I78ab3db5c5d0b3e041cff7525239698c361fd5fb

src/com/android/settings/ZonePicker.java

index 1502ad1..a5479af 100644 (file)
@@ -288,6 +288,8 @@ public class ZonePicker extends ListFragment {
 
     @Override
     public void onListItemClick(ListView listView, View v, int position, long id) {
+        // Ignore extra clicks
+        if (!isResumed()) return;
         final Map<?, ?> map = (Map<?, ?>)listView.getItemAtPosition(position);
         final String tzId = (String) map.get(KEY_ID);