remove some unused method
This commit is contained in:
parent
531c85e065
commit
324608d49a
@ -289,8 +289,6 @@ public class Cocos2dxHelper {
|
|||||||
|
|
||||||
private static native void nativeSetApkPath(final String pApkPath);
|
private static native void nativeSetApkPath(final String pApkPath);
|
||||||
|
|
||||||
private static native void nativeSetEditTextDialogResult(final byte[] pBytes);
|
|
||||||
|
|
||||||
private static native void nativeSetContext(final Context pContext, final AssetManager pAssetManager);
|
private static native void nativeSetContext(final Context pContext, final AssetManager pAssetManager);
|
||||||
|
|
||||||
private static native void nativeSetAudioDeviceInfo(boolean isSupportLowLatency, int deviceSampleRate, int audioBufferSizeInFames);
|
private static native void nativeSetAudioDeviceInfo(boolean isSupportLowLatency, int deviceSampleRate, int audioBufferSizeInFames);
|
||||||
@ -458,20 +456,7 @@ public class Cocos2dxHelper {
|
|||||||
Cocos2dxHelper.sCocos2dxHelperListener.showDialog(pTitle, pMessage);
|
Cocos2dxHelper.sCocos2dxHelperListener.showDialog(pTitle, pMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setEditTextDialogResult(final String pResult) {
|
|
||||||
try {
|
|
||||||
final byte[] bytesUTF8 = pResult.getBytes("UTF8");
|
|
||||||
|
|
||||||
Cocos2dxHelper.sCocos2dxHelperListener.runOnGLThread(new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
Cocos2dxHelper.nativeSetEditTextDialogResult(bytesUTF8);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} catch (UnsupportedEncodingException pUnsupportedEncodingException) {
|
|
||||||
/* Nothing. */
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static int displayMetricsToDPI(DisplayMetrics metrics)
|
private static int displayMetricsToDPI(DisplayMetrics metrics)
|
||||||
{
|
{
|
||||||
|
@ -493,32 +493,6 @@ extern "C"
|
|||||||
LOGD("nativeSetAudioDeviceInfo: sampleRate: %d, bufferSizeInFrames: %d", g_deviceSampleRate, g_deviceAudioBufferSizeInFrames);
|
LOGD("nativeSetAudioDeviceInfo: sampleRate: %d, bufferSizeInFrames: %d", g_deviceSampleRate, g_deviceAudioBufferSizeInFrames);
|
||||||
}
|
}
|
||||||
|
|
||||||
JNIEXPORT void JNICALL JNI_HELPER(nativeSetEditTextDialogResult)(JNIEnv *env, jclass obj, jbyteArray text)
|
|
||||||
{
|
|
||||||
jsize size = env->GetArrayLength(text);
|
|
||||||
|
|
||||||
if (size > 0)
|
|
||||||
{
|
|
||||||
jbyte *data = (jbyte *)env->GetByteArrayElements(text, 0);
|
|
||||||
char *buffer = (char *)malloc(size + 1);
|
|
||||||
if (buffer != nullptr)
|
|
||||||
{
|
|
||||||
memcpy(buffer, data, size);
|
|
||||||
buffer[size] = '\0';
|
|
||||||
// pass data to edittext's delegate
|
|
||||||
if (s_editTextCallback)
|
|
||||||
s_editTextCallback(buffer, s_ctx);
|
|
||||||
free(buffer);
|
|
||||||
}
|
|
||||||
env->ReleaseByteArrayElements(text, data, 0);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (s_editTextCallback)
|
|
||||||
s_editTextCallback("", s_ctx);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/***********************************************************
|
/***********************************************************
|
||||||
* Cocos2dxAudioFocusManager native functions implementation.
|
* Cocos2dxAudioFocusManager native functions implementation.
|
||||||
***********************************************************/
|
***********************************************************/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user