Remove unused access to Android application's external asset path.

This commit is contained in:
folecr 2013-02-21 14:24:52 -08:00
parent 82ae5f62fd
commit 8408fc6d1b
4 changed files with 0 additions and 26 deletions

View File

@ -69,7 +69,6 @@ public class Cocos2dxHelper {
Cocos2dxHelper.sPackageName = applicationInfo.packageName;
Cocos2dxHelper.sFileDirectory = pContext.getFilesDir().getAbsolutePath();
Cocos2dxHelper.nativeSetApkPath(applicationInfo.sourceDir);
Cocos2dxHelper.nativeSetExternalAssetPath(Cocos2dxHelper.getAbsolutePathOnExternalStorage(applicationInfo, "assets/"));
Cocos2dxHelper.sCocos2dxAccelerometer = new Cocos2dxAccelerometer(pContext);
Cocos2dxHelper.sCocos2dMusic = new Cocos2dxMusic(pContext);
@ -92,8 +91,6 @@ public class Cocos2dxHelper {
private static native void nativeSetApkPath(final String pApkPath);
private static native void nativeSetExternalAssetPath(final String pExternalAssetPath);
private static native void nativeSetEditTextDialogResult(final byte[] pBytes);
public static String getCocos2dxPackageName() {
@ -255,10 +252,6 @@ public class Cocos2dxHelper {
}
}
private static String getAbsolutePathOnExternalStorage(final ApplicationInfo pApplicationInfo, final String pPath) {
return Environment.getExternalStorageDirectory() + "/Android/data/" + pApplicationInfo.packageName + "/files/" + pPath;
}
public static int getDPI()
{
if (sContext != null)

View File

@ -29,12 +29,6 @@ extern "C" {
return g_apkPath.c_str();
}
JNIEXPORT void JNICALL Java_org_cocos2dx_lib_Cocos2dxHelper_nativeSetExternalAssetPath(JNIEnv* env, jobject thiz, jstring externalAssetPath) {
const char* externalAssetPathChars = env->GetStringUTFChars(externalAssetPath, NULL);
cocos2d::JniHelper::setExternalAssetPath(externalAssetPathChars);
env->ReleaseStringUTFChars(externalAssetPath, externalAssetPathChars);
}
void showDialogJNI(const char * pszMsg, const char * pszTitle) {
if (!pszMsg) {
return;

View File

@ -193,16 +193,6 @@ void JniHelper::setJavaVM(JavaVM *javaVM)
m_psJavaVM = javaVM;
}
string JniHelper::m_externalAssetPath;
const char* JniHelper::getExternalAssetPath() {
return m_externalAssetPath.c_str();
}
void JniHelper::setExternalAssetPath(const char * externalAssetPath) {
m_externalAssetPath = externalAssetPath;
}
jclass JniHelper::getClassID(const char *className, JNIEnv *env)
{
return getClassID_(className, env);

View File

@ -42,8 +42,6 @@ class CC_DLL JniHelper
public:
static JavaVM* getJavaVM();
static void setJavaVM(JavaVM *javaVM);
static const char* getExternalAssetPath();
static void setExternalAssetPath(const char* externalAssetPath);
static jclass getClassID(const char *className, JNIEnv *env=0);
static bool getStaticMethodInfo(JniMethodInfo &methodinfo, const char *className, const char *methodName, const char *paramCode);
static bool getMethodInfo(JniMethodInfo &methodinfo, const char *className, const char *methodName, const char *paramCode);
@ -51,7 +49,6 @@ public:
private:
static JavaVM *m_psJavaVM;
static std::string m_externalAssetPath;
};
NS_CC_END