OSDN Git Service
(root)
/
android-x86
/
frameworks-base.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ac96fa5
)
Fix possible NPE in AdapterView's OnItemClickListener clients.
author
Romain Guy
<romainguy@android.com>
Mon, 22 Mar 2010 21:12:43 +0000
(14:12 -0700)
committer
Romain Guy
<romainguy@android.com>
Mon, 22 Mar 2010 21:12:43 +0000
(14:12 -0700)
Bug #
2533718
Change-Id: I32e72e29a7b4bb8331f2492f5c5b5507d1b3993a
core/java/android/widget/AbsListView.java
patch
|
blob
|
history
diff --git
a/core/java/android/widget/AbsListView.java
b/core/java/android/widget/AbsListView.java
index
86011d7
..
a30059c
100644
(file)
--- a/
core/java/android/widget/AbsListView.java
+++ b/
core/java/android/widget/AbsListView.java
@@
-1835,9
+1835,11
@@
public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
mSelectedPosition < mAdapter.getCount()) {
final View view = getChildAt(mSelectedPosition - mFirstPosition);
- performItemClick(view, mSelectedPosition, mSelectedRowId);
+ if (view != null) {
+ performItemClick(view, mSelectedPosition, mSelectedRowId);
+ view.setPressed(false);
+ }
setPressed(false);
- if (view != null) view.setPressed(false);
return true;
}
break;