CMResolver: Fix bad equivalancy check by using known boolean.

Otherwise we throw an index out of bounds exception when trying
  to fetch data from the wrong adapter when clicking a result.

Change-Id: I2269216c6d13fa7db3f8e7bc990cfaad6197d1c9
This commit is contained in:
Adnan Begovic 2015-09-14 23:45:48 -07:00
parent 3c456656b3
commit 688a04562e
1 changed files with 1 additions and 2 deletions

View File

@ -575,8 +575,7 @@ public class ResolverActivity extends Activity implements AdapterView.OnItemClic
// Header views don't count.
return;
}
ListAdapter d = mListView.getAdapter();
if (d == mAdapter) {
if (mAdapter.getCount() > 0 && !mUsingSuggestions) {
ResolveInfo resolveInfo = mAdapter.resolveInfoForPosition(position, true);
if (mResolvingHome && hasManagedProfile()
&& !supportsManagedProfiles(resolveInfo)) {