mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-03 17:59:33 +02:00
unused method
This commit is contained in:
parent
ab83e1a79a
commit
3f2836844e
2 changed files with 0 additions and 15 deletions
|
@ -310,20 +310,6 @@ jbyteArray AndroidUtil::createJavaByteArray(JNIEnv *env, const std::vector<jbyte
|
||||||
return array;
|
return array;
|
||||||
}
|
}
|
||||||
|
|
||||||
jobjectArray AndroidUtil::createJavaStringArray(JNIEnv *env, const std::vector<std::string> &data) {
|
|
||||||
size_t size = data.size();
|
|
||||||
jobjectArray array = env->NewObjectArray(size, Class_java_lang_String->j(), 0);
|
|
||||||
for (size_t i = 0; i < size; ++i) {
|
|
||||||
const std::string &str = data[i];
|
|
||||||
if (str.length() > 0) {
|
|
||||||
jstring javaStr = env->NewStringUTF(str.c_str());
|
|
||||||
env->SetObjectArrayElement(array, i, javaStr);
|
|
||||||
env->DeleteLocalRef(javaStr);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return array;
|
|
||||||
}
|
|
||||||
|
|
||||||
void AndroidUtil::throwRuntimeException(JNIEnv *env, const std::string &message) {
|
void AndroidUtil::throwRuntimeException(JNIEnv *env, const std::string &message) {
|
||||||
// TODO: possible memory leak
|
// TODO: possible memory leak
|
||||||
jclass cls = env->FindClass("java/lang/RuntimeException");
|
jclass cls = env->FindClass("java/lang/RuntimeException");
|
||||||
|
|
|
@ -143,7 +143,6 @@ public:
|
||||||
|
|
||||||
static jintArray createJavaIntArray(JNIEnv *env, const std::vector<jint> &data);
|
static jintArray createJavaIntArray(JNIEnv *env, const std::vector<jint> &data);
|
||||||
static jbyteArray createJavaByteArray(JNIEnv *env, const std::vector<jbyte> &data);
|
static jbyteArray createJavaByteArray(JNIEnv *env, const std::vector<jbyte> &data);
|
||||||
static jobjectArray createJavaStringArray(JNIEnv *env, const std::vector<std::string> &data);
|
|
||||||
|
|
||||||
static void throwRuntimeException(JNIEnv *env, const std::string &message);
|
static void throwRuntimeException(JNIEnv *env, const std::string &message);
|
||||||
//static void throwBookReadingException(const std::string &resourceId, const ZLFile &file);
|
//static void throwBookReadingException(const std::string &resourceId, const ZLFile &file);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue