From 1c8eb5e3d03ab492ae5cc69f1d179e9dc244930d Mon Sep 17 00:00:00 2001 From: Craig Mautner Date: Mon, 4 Aug 2014 17:08:25 -0700 Subject: [PATCH] Use actual number of packages rather than getCount() The ResolverActivity method getCount() returns the number of entries below the default entry, not the total number of entries. But the onCreate() method expected the getCount() method to return the total number of entries. This change provides the total to onCreate(). Fixes bug 16800358. Change-Id: I3915c3d5ad642e31d7248226fc91bd4047f16b2d --- core/java/com/android/internal/app/ResolverActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/java/com/android/internal/app/ResolverActivity.java b/core/java/com/android/internal/app/ResolverActivity.java index f0e7215876598..59891d6a07a85 100644 --- a/core/java/com/android/internal/app/ResolverActivity.java +++ b/core/java/com/android/internal/app/ResolverActivity.java @@ -229,7 +229,7 @@ public class ResolverActivity extends Activity implements AdapterView.OnItemClic } mAlwaysUseOption = alwaysUseOption; - int count = mAdapter.getCount(); + int count = mAdapter.mList.size(); if (mLaunchedFromUid < 0 || UserHandle.isIsolated(mLaunchedFromUid)) { // Gulp! finish();