mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-03 17:59:33 +02:00
SystemInfo in plugins
This commit is contained in:
parent
8121d5c6f8
commit
cf13daad1c
46 changed files with 210 additions and 157 deletions
|
@ -25,7 +25,7 @@
|
|||
#include "fbreader/src/formats/FormatPlugin.h"
|
||||
|
||||
extern "C"
|
||||
JNIEXPORT jobjectArray JNICALL Java_org_geometerplus_fbreader_formats_PluginCollection_nativePlugins(JNIEnv* env, jobject thiz) {
|
||||
JNIEXPORT jobjectArray JNICALL Java_org_geometerplus_fbreader_formats_PluginCollection_nativePlugins(JNIEnv* env, jobject thiz, jobject systemInfo) {
|
||||
const std::vector<shared_ptr<FormatPlugin> > plugins = PluginCollection::Instance().plugins();
|
||||
const std::size_t size = plugins.size();
|
||||
jclass cls = AndroidUtil::Class_NativeFormatPlugin.j();
|
||||
|
@ -34,7 +34,7 @@ JNIEXPORT jobjectArray JNICALL Java_org_geometerplus_fbreader_formats_PluginColl
|
|||
|
||||
for (std::size_t i = 0; i < size; ++i) {
|
||||
jstring fileType = AndroidUtil::createJavaString(env, plugins[i]->supportedFileType());
|
||||
jobject p = AndroidUtil::StaticMethod_NativeFormatPlugin_create->call(fileType);
|
||||
jobject p = AndroidUtil::StaticMethod_NativeFormatPlugin_create->call(systemInfo, fileType);
|
||||
env->SetObjectArrayElement(javaPlugins, i, p);
|
||||
env->DeleteLocalRef(p);
|
||||
env->DeleteLocalRef(fileType);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue