Bug with skiped packages fixed.
This commit is contained in:
parent
4ebcf2b224
commit
257d8df1d4
@ -173,6 +173,7 @@ public class ManagerActivity extends Activity
|
|||||||
mInstalledPackageView.setOnItemClickListener(new OnItemClickListener() {
|
mInstalledPackageView.setOnItemClickListener(new OnItemClickListener() {
|
||||||
|
|
||||||
public void onItemClick(AdapterView<?> adapter, View view, int position, long id) {
|
public void onItemClick(AdapterView<?> adapter, View view, int position, long id) {
|
||||||
|
//if (!mListViewItems.get((int) id).get("Name").equals("Built-in OpenCV library"));
|
||||||
if (!mInstalledPackageInfo[(int) id].packageName.equals("org.opencv.engine"))
|
if (!mInstalledPackageInfo[(int) id].packageName.equals("org.opencv.engine"))
|
||||||
{
|
{
|
||||||
mInstalledPackageView.setTag(Integer.valueOf((int)id));
|
mInstalledPackageView.setTag(Integer.valueOf((int)id));
|
||||||
@ -276,8 +277,12 @@ public class ManagerActivity extends Activity
|
|||||||
mInstalledPackageInfo = mMarket.GetInstalledOpenCVPackages();
|
mInstalledPackageInfo = mMarket.GetInstalledOpenCVPackages();
|
||||||
mListViewItems.clear();
|
mListViewItems.clear();
|
||||||
|
|
||||||
for (int i = 0; i < mInstalledPackageInfo.length; i++)
|
int RealPackageCount = mInstalledPackageInfo.length;
|
||||||
|
for (int i = 0; i < RealPackageCount; i++)
|
||||||
{
|
{
|
||||||
|
if (mInstalledPackageInfo[i] == null)
|
||||||
|
break;
|
||||||
|
|
||||||
// Convert to Items for package list view
|
// Convert to Items for package list view
|
||||||
HashMap<String,String> temp = new HashMap<String,String>();
|
HashMap<String,String> temp = new HashMap<String,String>();
|
||||||
|
|
||||||
@ -289,7 +294,6 @@ public class ManagerActivity extends Activity
|
|||||||
String PackageName = mInstalledPackageInfo[i].packageName;
|
String PackageName = mInstalledPackageInfo[i].packageName;
|
||||||
String VersionName = mInstalledPackageInfo[i].versionName;
|
String VersionName = mInstalledPackageInfo[i].versionName;
|
||||||
|
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD)
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD)
|
||||||
NativeLibDir = mInstalledPackageInfo[i].applicationInfo.nativeLibraryDir;
|
NativeLibDir = mInstalledPackageInfo[i].applicationInfo.nativeLibraryDir;
|
||||||
else
|
else
|
||||||
@ -306,7 +310,13 @@ public class ManagerActivity extends Activity
|
|||||||
VersionName = NativeInfo.versionName();
|
VersionName = NativeInfo.versionName();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
mInstalledPackageInfo[i] = mInstalledPackageInfo[RealPackageCount-1];
|
||||||
|
mInstalledPackageInfo[RealPackageCount-1] = null;
|
||||||
|
RealPackageCount--;
|
||||||
|
i--;
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int idx = 0;
|
int idx = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user