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
This commit is contained in:
Craig Mautner
2014-08-04 17:08:25 -07:00
parent 6c8aecd3f2
commit 1c8eb5e3d0

View File

@@ -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();