Rename OpenCV Engine to org.opencv.engine3 for release candidate

This commit is contained in:
Maksim Shabunin 2015-04-17 16:00:33 +03:00
parent b639353193
commit 316d76bdb6
22 changed files with 67 additions and 67 deletions

View File

@ -174,8 +174,8 @@ endforeach()
file(REMOVE_RECURSE "${probe_dir}")
if(NOT ANDROID)
ocv_list_filterout(handwritten_java_sources "/(engine|android)\\\\+")
ocv_list_filterout(handwritten_aidl_sources "/(engine|android)\\\\+")
ocv_list_filterout(handwritten_java_sources "/(engine3|android)\\\\+")
ocv_list_filterout(handwritten_aidl_sources "/(engine3|android)\\\\+")
else()
file(GLOB_RECURSE handwrittren_lib_project_files_rel RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/android_lib/" "${CMAKE_CURRENT_SOURCE_DIR}/android_lib/*")
list(REMOVE_ITEM handwrittren_lib_project_files_rel "${ANDROID_MANIFEST_FILE}")

View File

@ -4,7 +4,7 @@ import java.io.File;
import java.util.StringTokenizer;
import org.opencv.core.Core;
import org.opencv.engine.OpenCVEngineInterface;
import org.opencv.engine3.OpenCVEngineInterface;
import android.content.ComponentName;
import android.content.Context;
@ -21,8 +21,8 @@ class AsyncServiceHelper
final LoaderCallbackInterface Callback)
{
AsyncServiceHelper helper = new AsyncServiceHelper(Version, AppContext, Callback);
Intent intent = new Intent("org.opencv.engine.BIND");
intent.setPackage("org.opencv.engine");
Intent intent = new Intent("org.opencv.engine3.BIND");
intent.setPackage("org.opencv.engine3");
if (AppContext.bindService(intent, helper.mServiceConnection, Context.BIND_AUTO_CREATE))
{
return true;
@ -151,7 +151,7 @@ class AsyncServiceHelper
/**
* URL of OpenCV Manager page on Google Play Market.
*/
protected static final String OPEN_CV_SERVICE_URL = "market://details?id=org.opencv.engine";
protected static final String OPEN_CV_SERVICE_URL = "market://details?id=org.opencv.engine3";
protected ServiceConnection mServiceConnection = new ServiceConnection()
{

View File

@ -1,4 +1,4 @@
package org.opencv.engine;
package org.opencv.engine3;
/**
* Class provides a Java interface for OpenCV Engine Service. It's synchronous with native OpenCVEngine class.

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.opencv.engine"
package="org.opencv.engine3"
android:versionCode="300@ANDROID_PLATFORM_VERSION_CODE@"
android:versionName="3.00" >
@ -13,12 +13,12 @@
<service android:exported="true" android:name="OpenCVEngineService" android:process=":OpenCVEngineProcess">
<intent-filter>
<action android:name="org.opencv.engine.BIND"></action>
<action android:name="org.opencv.engine3.BIND"></action>
</intent-filter>
</service>
<activity
android:name="org.opencv.engine.manager.ManagerActivity"
android:name="org.opencv.engine3.manager.ManagerActivity"
android:label="@string/app_name"
android:screenOrientation="portrait">
<intent-filter>

View File

@ -3,23 +3,23 @@
#include <jni.h>
#include <string>
JNIEXPORT jint JNICALL Java_org_opencv_engine_HardwareDetector_GetCpuID(JNIEnv* , jclass)
JNIEXPORT jint JNICALL Java_org_opencv_engine3_HardwareDetector_GetCpuID(JNIEnv* , jclass)
{
return GetCpuID();
}
JNIEXPORT jstring JNICALL Java_org_opencv_engine_HardwareDetector_GetPlatformName(JNIEnv* env, jclass)
JNIEXPORT jstring JNICALL Java_org_opencv_engine3_HardwareDetector_GetPlatformName(JNIEnv* env, jclass)
{
std::string hardware_name = GetPlatformName();
return env->NewStringUTF(hardware_name.c_str());
}
JNIEXPORT jint JNICALL Java_org_opencv_engine_HardwareDetector_GetProcessorCount(JNIEnv* , jclass)
JNIEXPORT jint JNICALL Java_org_opencv_engine3_HardwareDetector_GetProcessorCount(JNIEnv* , jclass)
{
return GetProcessorCount();
}
JNIEXPORT jint JNICALL Java_org_opencv_engine_HardwareDetector_DetectKnownPlatforms(JNIEnv* , jclass)
JNIEXPORT jint JNICALL Java_org_opencv_engine3_HardwareDetector_DetectKnownPlatforms(JNIEnv* , jclass)
{
return DetectKnownPlatforms();
}

View File

@ -14,7 +14,7 @@ extern "C" {
* Method: GetCpuID
* Signature: ()I
*/
JNIEXPORT jint JNICALL Java_org_opencv_engine_HardwareDetector_GetCpuID
JNIEXPORT jint JNICALL Java_org_opencv_engine3_HardwareDetector_GetCpuID
(JNIEnv *, jclass);
/*
@ -22,7 +22,7 @@ JNIEXPORT jint JNICALL Java_org_opencv_engine_HardwareDetector_GetCpuID
* Method: GetPlatformName
* Signature: ()Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_org_opencv_engine_HardwareDetector_GetPlatformName
JNIEXPORT jstring JNICALL Java_org_opencv_engine3_HardwareDetector_GetPlatformName
(JNIEnv *, jclass);
/*
@ -30,7 +30,7 @@ JNIEXPORT jstring JNICALL Java_org_opencv_engine_HardwareDetector_GetPlatformNam
* Method: GetProcessorCount
* Signature: ()I
*/
JNIEXPORT jint JNICALL Java_org_opencv_engine_HardwareDetector_GetProcessorCount
JNIEXPORT jint JNICALL Java_org_opencv_engine3_HardwareDetector_GetProcessorCount
(JNIEnv *, jclass);
/*
@ -38,7 +38,7 @@ JNIEXPORT jint JNICALL Java_org_opencv_engine_HardwareDetector_GetProcessorCount
* Method: DetectKnownPlatforms
* Signature: ()I
*/
JNIEXPORT jint JNICALL Java_org_opencv_engine_HardwareDetector_DetectKnownPlatforms
JNIEXPORT jint JNICALL Java_org_opencv_engine3_HardwareDetector_DetectKnownPlatforms
(JNIEnv *, jclass);
#ifdef __cplusplus

View File

@ -15,7 +15,7 @@ using namespace android;
sp<IBinder> OpenCVEngineBinder = NULL;
IPackageManager* PackageManager = NULL;
JNIEXPORT jobject JNICALL Java_org_opencv_engine_BinderConnector_Connect(JNIEnv* env, jobject)
JNIEXPORT jobject JNICALL Java_org_opencv_engine3_BinderConnector_Connect(JNIEnv* env, jobject)
{
LOGI("Creating new component");
if (NULL != OpenCVEngineBinder.get())
@ -30,7 +30,7 @@ JNIEXPORT jobject JNICALL Java_org_opencv_engine_BinderConnector_Connect(JNIEnv*
return javaObjectForIBinder(env, OpenCVEngineBinder);
}
JNIEXPORT jboolean JNICALL Java_org_opencv_engine_BinderConnector_Init(JNIEnv* env, jobject , jobject market)
JNIEXPORT jboolean JNICALL Java_org_opencv_engine3_BinderConnector_Init(JNIEnv* env, jobject , jobject market)
{
LOGD("Java_org_opencv_engine_BinderConnector_Init");
@ -58,7 +58,7 @@ JNIEXPORT jboolean JNICALL Java_org_opencv_engine_BinderConnector_Init(JNIEnv* e
}
}
JNIEXPORT void JNICALL Java_org_opencv_engine_BinderConnector_Final(JNIEnv *, jobject)
JNIEXPORT void JNICALL Java_org_opencv_engine3_BinderConnector_Final(JNIEnv *, jobject)
{
LOGD("Java_org_opencv_engine_BinderConnector_Final");

View File

@ -12,7 +12,7 @@ extern "C" {
* Method: Connect
* Signature: ()Landroid/os/IBinder;
*/
JNIEXPORT jobject JNICALL Java_org_opencv_engine_BinderConnector_Connect
JNIEXPORT jobject JNICALL Java_org_opencv_engine3_BinderConnector_Connect
(JNIEnv *, jobject);
/*
@ -20,7 +20,7 @@ JNIEXPORT jobject JNICALL Java_org_opencv_engine_BinderConnector_Connect
* Method: Init
* Signature: (Lorg/opencv/engine/MarketConnector;)Z
*/
JNIEXPORT jboolean JNICALL Java_org_opencv_engine_BinderConnector_Init
JNIEXPORT jboolean JNICALL Java_org_opencv_engine3_BinderConnector_Init
(JNIEnv *, jobject, jobject);
/*
@ -28,7 +28,7 @@ JNIEXPORT jboolean JNICALL Java_org_opencv_engine_BinderConnector_Init
* Method: Final
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_org_opencv_engine_BinderConnector_Final
JNIEXPORT void JNICALL Java_org_opencv_engine3_BinderConnector_Final
(JNIEnv *, jobject);
#ifdef __cplusplus

View File

@ -3,7 +3,7 @@
#include <utils/Log.h>
#include <dlfcn.h>
JNIEXPORT jlong JNICALL Java_org_opencv_engine_OpenCVLibraryInfo_open
JNIEXPORT jlong JNICALL Java_org_opencv_engine3_OpenCVLibraryInfo_open
(JNIEnv * env, jobject, jstring str)
{
const char* infoLibPath = env->GetStringUTFChars(str, NULL);
@ -21,7 +21,7 @@ JNIEXPORT jlong JNICALL Java_org_opencv_engine_OpenCVLibraryInfo_open
return (jlong)handle;
}
JNIEXPORT jstring JNICALL Java_org_opencv_engine_OpenCVLibraryInfo_getPackageName
JNIEXPORT jstring JNICALL Java_org_opencv_engine3_OpenCVLibraryInfo_getPackageName
(JNIEnv* env, jobject, jlong handle)
{
InfoFunctionType info_func;
@ -41,7 +41,7 @@ JNIEXPORT jstring JNICALL Java_org_opencv_engine_OpenCVLibraryInfo_getPackageNam
return env->NewStringUTF(result);
}
JNIEXPORT jstring JNICALL Java_org_opencv_engine_OpenCVLibraryInfo_getLibraryList
JNIEXPORT jstring JNICALL Java_org_opencv_engine3_OpenCVLibraryInfo_getLibraryList
(JNIEnv* env, jobject, jlong handle)
{
InfoFunctionType info_func;
@ -61,7 +61,7 @@ JNIEXPORT jstring JNICALL Java_org_opencv_engine_OpenCVLibraryInfo_getLibraryLis
return env->NewStringUTF(result);
}
JNIEXPORT jstring JNICALL Java_org_opencv_engine_OpenCVLibraryInfo_getVersionName
JNIEXPORT jstring JNICALL Java_org_opencv_engine3_OpenCVLibraryInfo_getVersionName
(JNIEnv* env, jobject, jlong handle)
{
InfoFunctionType info_func;
@ -81,7 +81,7 @@ JNIEXPORT jstring JNICALL Java_org_opencv_engine_OpenCVLibraryInfo_getVersionNam
return env->NewStringUTF(result);
}
JNIEXPORT void JNICALL Java_org_opencv_engine_OpenCVLibraryInfo_close
JNIEXPORT void JNICALL Java_org_opencv_engine3_OpenCVLibraryInfo_close
(JNIEnv*, jobject, jlong handle)
{
dlclose((void*)handle);

View File

@ -6,19 +6,19 @@
extern "C" {
#endif
JNIEXPORT jlong JNICALL Java_org_opencv_engine_OpenCVLibraryInfo_open
JNIEXPORT jlong JNICALL Java_org_opencv_engine3_OpenCVLibraryInfo_open
(JNIEnv *, jobject, jstring);
JNIEXPORT jstring JNICALL Java_org_opencv_engine_OpenCVLibraryInfo_getPackageName
JNIEXPORT jstring JNICALL Java_org_opencv_engine3_OpenCVLibraryInfo_getPackageName
(JNIEnv *, jobject, jlong);
JNIEXPORT jstring JNICALL Java_org_opencv_engine_OpenCVLibraryInfo_getLibraryList
JNIEXPORT jstring JNICALL Java_org_opencv_engine3_OpenCVLibraryInfo_getLibraryList
(JNIEnv *, jobject, jlong);
JNIEXPORT jstring JNICALL Java_org_opencv_engine_OpenCVLibraryInfo_getVersionName
JNIEXPORT jstring JNICALL Java_org_opencv_engine3_OpenCVLibraryInfo_getVersionName
(JNIEnv *, jobject, jlong);
JNIEXPORT void JNICALL Java_org_opencv_engine_OpenCVLibraryInfo_close
JNIEXPORT void JNICALL Java_org_opencv_engine3_OpenCVLibraryInfo_close
(JNIEnv *, jobject, jlong);
#ifdef __cplusplus

View File

@ -27,7 +27,7 @@ map<int, string> PackageInfo::InitPlatformNameMap()
const map<int, string> PackageInfo::PlatformNameMap = InitPlatformNameMap();
const string PackageInfo::BasePackageName = "org.opencv.lib";
const string DEFAULT_ENGINE_INSTALL_PATH = "/data/data/org.opencv.engine";
const string DEFAULT_ENGINE_INSTALL_PATH = "/data/data/org.opencv.engine3";
inline string JoinARMFeatures(int cpu_id)
{

View File

@ -13,9 +13,9 @@
#define LIB_OPENCV_INFO_NAME "libopencv_info.so"
// OpenCV Manager package name
#define OPENCV_ENGINE_PACKAGE "org.opencv.engine"
#define OPENCV_ENGINE_PACKAGE "org.opencv.engine3"
// Class name of OpenCV engine binder object. Is needned for connection to service
#define OPECV_ENGINE_CLASSNAME "org.opencv.engine.OpenCVEngineInterface"
#define OPECV_ENGINE_CLASSNAME "org.opencv.engine3.OpenCVEngineInterface"
typedef const char* (*InfoFunctionType)();

View File

@ -1,4 +1,4 @@
package org.opencv.engine;
package org.opencv.engine3;
import android.os.IBinder;

View File

@ -1,4 +1,4 @@
package org.opencv.engine;
package org.opencv.engine3;
public class HardwareDetector
{

View File

@ -1,4 +1,4 @@
package org.opencv.engine;
package org.opencv.engine3;
import java.util.ArrayList;
import java.util.Iterator;
@ -99,7 +99,7 @@ public class MarketConnector
List<PackageInfo> AllPackages = mContext.getPackageManager().getInstalledPackages(PackageManager.GET_CONFIGURATIONS);
List<PackageInfo> OpenCVPackages = new ArrayList<PackageInfo>();
try {
OpenCVPackages.add(mContext.getPackageManager().getPackageInfo("org.opencv.engine", PackageManager.GET_CONFIGURATIONS));
OpenCVPackages.add(mContext.getPackageManager().getPackageInfo("org.opencv.engine3", PackageManager.GET_CONFIGURATIONS));
} catch (NameNotFoundException e) {
Log.e(TAG, "OpenCV Manager package info was not found!");
e.printStackTrace();

View File

@ -1,4 +1,4 @@
package org.opencv.engine;
package org.opencv.engine3;
/**
* Class provides Java interface to OpenCV Engine Service. Is synchronious with native OpenCVEngine class.

View File

@ -1,4 +1,4 @@
package org.opencv.engine;
package org.opencv.engine3;
import android.app.Service;
import android.content.Intent;

View File

@ -1,4 +1,4 @@
package org.opencv.engine;
package org.opencv.engine3;
public class OpenCVLibraryInfo {
public OpenCVLibraryInfo(String packagePath) {

View File

@ -1,15 +1,15 @@
package org.opencv.engine.manager;
package org.opencv.engine3.manager;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.StringTokenizer;
import org.opencv.engine.HardwareDetector;
import org.opencv.engine.MarketConnector;
import org.opencv.engine.OpenCVEngineInterface;
import org.opencv.engine.OpenCVEngineService;
import org.opencv.engine.OpenCVLibraryInfo;
import org.opencv.engine.R;
import org.opencv.engine3.HardwareDetector;
import org.opencv.engine3.MarketConnector;
import org.opencv.engine3.OpenCVEngineInterface;
import org.opencv.engine3.OpenCVEngineService;
import org.opencv.engine3.OpenCVLibraryInfo;
import org.opencv.engine3.R;
import android.annotation.TargetApi;
import android.app.Activity;
import android.app.AlertDialog;
@ -161,7 +161,7 @@ public class ManagerActivity extends Activity
mUpdateEngineButton.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
if (!mMarket.InstallAppFromMarket("org.opencv.engine"))
if (!mMarket.InstallAppFromMarket("org.opencv.engine3"))
{
Toast toast = Toast.makeText(getApplicationContext(), "Google Play is not avaliable", Toast.LENGTH_SHORT);
toast.show();
@ -207,7 +207,7 @@ public class ManagerActivity extends Activity
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.engine3"))
{
mInstalledPackageView.setTag(Integer.valueOf((int)id));
mActionDialog.show();
@ -221,7 +221,7 @@ public class ManagerActivity extends Activity
public void onReceive(Context context, Intent intent) {
Log.d("OpenCVManager/Receiver", "Broadcast message " + intent.getAction() + " receiver");
Log.d("OpenCVManager/Receiver", "Filling package list on broadcast message");
if (!bindService(new Intent("org.opencv.engine.BIND"),
if (!bindService(new Intent("org.opencv.engine3.BIND"),
new OpenCVEngineServiceConnection(), Context.BIND_AUTO_CREATE))
{
TextView EngineVersionView = (TextView)findViewById(R.id.EngineVersionValue);
@ -350,7 +350,7 @@ public class ManagerActivity extends Activity
else
NativeLibDir = "/data/data/" + mInstalledPackageInfo[i].packageName + "/lib";
if (PackageName.equals("org.opencv.engine"))
if (PackageName.equals("org.opencv.engine3"))
{
OpenCVLibraryInfo NativeInfo = new OpenCVLibraryInfo(NativeLibDir);
if (NativeInfo.status())

View File

@ -1,4 +1,4 @@
package org.opencv.engine.manager;
package org.opencv.engine3.manager;
import java.util.List;
import java.util.Map;

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.opencv.engine.test"
package="org.opencv.engine3.test"
android:versionCode="1"
android:versionName="1.0" >
@ -8,7 +8,7 @@
<instrumentation
android:name="android.test.InstrumentationTestRunner"
android:targetPackage="org.opencv.engine" />
android:targetPackage="org.opencv.engine3" />
<application
android:icon="@drawable/ic_launcher"
@ -17,4 +17,4 @@
</application>
</manifest>
</manifest>

View File

@ -1,7 +1,7 @@
package org.opencv.engine.test;
package org.opencv.engine3.test;
import org.opencv.engine.OpenCVEngineInterface;
import org.opencv.engine.OpenCVEngineService;
import org.opencv.engine3.OpenCVEngineInterface;
import org.opencv.engine3.OpenCVEngineService;
import android.content.Intent;
import android.os.IBinder;
@ -18,7 +18,7 @@ public class EngineInterfaceTest extends ServiceTestCase<OpenCVEngineService>
public void testVersion() throws RemoteException
{
IBinder ServiceBinder = bindService(new Intent("org.opencv.engine.BIND"));
IBinder ServiceBinder = bindService(new Intent("org.opencv.engine3.BIND"));
assertNotNull(ServiceBinder);
OpenCVEngineInterface ServiceObj = OpenCVEngineInterface.Stub.asInterface(ServiceBinder);
assertNotNull(ServiceObj);
@ -28,7 +28,7 @@ public class EngineInterfaceTest extends ServiceTestCase<OpenCVEngineService>
public void testInstallVersion() throws RemoteException
{
IBinder ServiceBinder = bindService(new Intent("org.opencv.engine"));
IBinder ServiceBinder = bindService(new Intent("org.opencv.engine3"));
assertNotNull(ServiceBinder);
OpenCVEngineInterface ServiceObj = OpenCVEngineInterface.Stub.asInterface(ServiceBinder);
assertNotNull(ServiceObj);
@ -37,7 +37,7 @@ public class EngineInterfaceTest extends ServiceTestCase<OpenCVEngineService>
public void testGetPathForExistVersion() throws RemoteException
{
IBinder ServiceBinder = bindService(new Intent("org.opencv.engine"));
IBinder ServiceBinder = bindService(new Intent("org.opencv.engine3"));
assertNotNull(ServiceBinder);
OpenCVEngineInterface ServiceObj = OpenCVEngineInterface.Stub.asInterface(ServiceBinder);
assertNotNull(ServiceObj);
@ -46,7 +46,7 @@ public class EngineInterfaceTest extends ServiceTestCase<OpenCVEngineService>
public void testGetPathForUnExistVersion() throws RemoteException
{
IBinder ServiceBinder = bindService(new Intent("org.opencv.engine"));
IBinder ServiceBinder = bindService(new Intent("org.opencv.engine3"));
assertNotNull(ServiceBinder);
OpenCVEngineInterface ServiceObj = OpenCVEngineInterface.Stub.asInterface(ServiceBinder);
assertNotNull(ServiceObj);
@ -55,7 +55,7 @@ public class EngineInterfaceTest extends ServiceTestCase<OpenCVEngineService>
public void testInstallAndGetVersion() throws RemoteException
{
IBinder ServiceBinder = bindService(new Intent("org.opencv.engine"));
IBinder ServiceBinder = bindService(new Intent("org.opencv.engine3"));
assertNotNull(ServiceBinder);
OpenCVEngineInterface ServiceObj = OpenCVEngineInterface.Stub.asInterface(ServiceBinder);
assertNotNull(ServiceObj);