diff options
| author | Amith Yamasani <yamasani@google.com> | 2013-07-17 15:52:45 -0700 |
|---|---|---|
| committer | Amith Yamasani <yamasani@google.com> | 2013-07-18 09:57:43 -0700 |
| commit | 49bdc1681e58bd01174673042c42f65bb34943dd (patch) | |
| tree | f3b2e949ff488bb2e3a40170e60eb97d422051e5 /core/java | |
| parent | 023140919545a4d7e559908d84fcc05493d8ee05 (diff) | |
Ignore list item clicks if PreferenceActivity is paused.
Since list item clicks are delivered asynchronously, it's possible to
get click callbacks after the activity has already paused.
This should actually be blocked further up the event chain, ideally,
so that the list selection state is not out of sync with the application.
Bug: 9752185
Change-Id: I1058d64cba98e9093b462e2e581bdbccdace1420
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/preference/PreferenceActivity.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/java/android/preference/PreferenceActivity.java b/core/java/android/preference/PreferenceActivity.java index a9ee96ec76c7..ec97efb0df28 100644 --- a/core/java/android/preference/PreferenceActivity.java +++ b/core/java/android/preference/PreferenceActivity.java @@ -973,6 +973,9 @@ public abstract class PreferenceActivity extends ListActivity implements @Override protected void onListItemClick(ListView l, View v, int position, long id) { + if (!isResumed()) { + return; + } super.onListItemClick(l, v, position, id); if (mAdapter != null) { |
