mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 06:03:15 +08:00
Merge pull request #259 from asmorkalov:manager_outofbound_fix
This commit is contained in:
commit
1af55b4bcb
@ -402,10 +402,16 @@ public class ManagerActivity extends Activity
|
||||
|
||||
protected String NormalizeVersion(String OpenCVersion, String PackageVersion)
|
||||
{
|
||||
if (OpenCVersion == null || PackageVersion == null)
|
||||
return "unknown";
|
||||
|
||||
int dot = PackageVersion.indexOf(".");
|
||||
return OpenCVersion.substring(0, OpenCVersion.length()-1) + "." +
|
||||
OpenCVersion.toCharArray()[OpenCVersion.length()-1] + "." +
|
||||
PackageVersion.substring(0, dot) + " rev " + PackageVersion.substring(dot+1);
|
||||
if (dot == -1 || OpenCVersion.length() == 0)
|
||||
return "unknown";
|
||||
else
|
||||
return OpenCVersion.substring(0, OpenCVersion.length()-1) + "." +
|
||||
OpenCVersion.toCharArray()[OpenCVersion.length()-1] + "." +
|
||||
PackageVersion.substring(0, dot) + " rev " + PackageVersion.substring(dot+1);
|
||||
}
|
||||
|
||||
protected String ConvertPackageName(String Name, String Version)
|
||||
|
Loading…
Reference in New Issue
Block a user