diff --git a/src/com/android/settings/dashboard/SearchResultsSummary.java b/src/com/android/settings/dashboard/SearchResultsSummary.java index 69816347542..5f236711442 100644 --- a/src/com/android/settings/dashboard/SearchResultsSummary.java +++ b/src/com/android/settings/dashboard/SearchResultsSummary.java @@ -216,6 +216,11 @@ public class SearchResultsSummary extends Fragment { public void onItemClick(AdapterView parent, View view, int position, long id) { // We have a header, so we need to decrement the position by one position--; + // Some Monkeys could create a case where they were probably clicking on the + // List Header and thus the position passed was "0" and then by decrement was "-1" + if (position < 0) { + return; + } final Cursor cursor = mSuggestionsAdapter.mCursor; cursor.moveToPosition(position);