summaryrefslogtreecommitdiffstats
path: root/src/com/android
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2011-09-12 17:16:06 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-09-12 17:16:06 -0700
commit680410646329ced74ec31bdf6355f6a36a95ba48 (patch)
treee97744e1fc6545ee17dcba07518949436adfc9a0 /src/com/android
parent0aae7c2d51f369e0f45bc9e1f05cac34ecf9c864 (diff)
parent4eb475de8265a4d177580a137a6a7148aaec1380 (diff)
downloadpackages_apps_Browser-680410646329ced74ec31bdf6355f6a36a95ba48.zip
packages_apps_Browser-680410646329ced74ec31bdf6355f6a36a95ba48.tar.gz
packages_apps_Browser-680410646329ced74ec31bdf6355f6a36a95ba48.tar.bz2
Merge "Add sanity checking to bookmark click listener"
Diffstat (limited to 'src/com/android')
-rw-r--r--src/com/android/browser/view/BookmarkExpandableView.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/com/android/browser/view/BookmarkExpandableView.java b/src/com/android/browser/view/BookmarkExpandableView.java
index 44a123a..4fb09c4 100644
--- a/src/com/android/browser/view/BookmarkExpandableView.java
+++ b/src/com/android/browser/view/BookmarkExpandableView.java
@@ -264,8 +264,15 @@ public class BookmarkExpandableView extends ExpandableListView
@Override
public void onClick(View v) {
+ if (v.getVisibility() != View.VISIBLE) {
+ return;
+ }
int groupPosition = (Integer) v.getTag(R.id.group_position);
int childPosition = (Integer) v.getTag(R.id.child_position);
+ if (mAdapter.getGroupCount() <= groupPosition
+ || mAdapter.mChildren.get(groupPosition).getCount() <= childPosition) {
+ return;
+ }
long id = (Long) v.getTag(R.id.child_id);
if (mOnChildClickListener != null) {
mOnChildClickListener.onChildClick(BookmarkExpandableView.this,