Commit b1d14f76 authored by Alexander Smorkalov's avatar Alexander Smorkalov

Bug with several "in use" labels fixed in OpenCV Manager UI.

parent 0105d0a2
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.opencv.engine" package="org.opencv.engine"
android:versionCode="15" android:versionCode="16"
android:versionName="1.5" > android:versionName="1.6" >
<uses-sdk android:minSdkVersion="8" /> <uses-sdk android:minSdkVersion="8" />
<uses-feature android:name="android.hardware.touchscreen" android:required="false"/> <uses-feature android:name="android.hardware.touchscreen" android:required="false"/>
......
...@@ -308,7 +308,11 @@ public class ManagerActivity extends Activity ...@@ -308,7 +308,11 @@ public class ManagerActivity extends Activity
ActivePackagePath = mActivePackageMap.get(OpenCVersion); ActivePackagePath = mActivePackageMap.get(OpenCVersion);
Log.d(TAG, OpenCVersion + " -> " + ActivePackagePath); Log.d(TAG, OpenCVersion + " -> " + ActivePackagePath);
if (null != ActivePackagePath && ActivePackagePath.indexOf(mInstalledPackageInfo[i].packageName) >= 0) if (null != ActivePackagePath)
{
int start = ActivePackagePath.indexOf(mInstalledPackageInfo[i].packageName);
int stop = start + mInstalledPackageInfo[i].packageName.length();
if (start >= 0 && ActivePackagePath.charAt(stop) == '/')
{ {
temp.put("Activity", "y"); temp.put("Activity", "y");
PublicName += " (in use)"; PublicName += " (in use)";
...@@ -317,6 +321,11 @@ public class ManagerActivity extends Activity ...@@ -317,6 +321,11 @@ public class ManagerActivity extends Activity
{ {
temp.put("Activity", "n"); temp.put("Activity", "n");
} }
}
else
{
temp.put("Activity", "n");
}
temp.put("Name", PublicName); temp.put("Name", PublicName);
temp.put("Version", NormalizeVersion(OpenCVersion, mInstalledPackageInfo[i].versionName)); temp.put("Version", NormalizeVersion(OpenCVersion, mInstalledPackageInfo[i].versionName));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment