diff --git a/jni/Android.mk b/jni/Android.mk index 3543d75cc..a67beb1d6 100644 --- a/jni/Android.mk +++ b/jni/Android.mk @@ -14,3 +14,10 @@ LOCAL_MODULE := LineBreak-v2 LOCAL_SRC_FILES := LineBreak/LineBreaker.cpp LineBreak/liblinebreak-2.0/linebreak.c LineBreak/liblinebreak-2.0/linebreakdata.c LineBreak/liblinebreak-2.0/linebreakdef.c include $(BUILD_SHARED_LIBRARY) + +include $(CLEAR_VARS) + +LOCAL_MODULE := NativeFormats-v1 +LOCAL_SRC_FILES := NativeFormats/*.cpp + +include $(BUILD_SHARED_LIBRARY) diff --git a/jni/NativeFormats/JavaNativeFormatPlugin.cpp b/jni/NativeFormats/JavaNativeFormatPlugin.cpp new file mode 100644 index 000000000..b191840a9 --- /dev/null +++ b/jni/NativeFormats/JavaNativeFormatPlugin.cpp @@ -0,0 +1,20 @@ +/* + * Copyright (C) 2011-2012 Geometer Plus + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301, USA. + */ + +#include diff --git a/src/org/geometerplus/fbreader/formats/PluginCollection.java b/src/org/geometerplus/fbreader/formats/PluginCollection.java index 6d71d934a..059fec6c9 100644 --- a/src/org/geometerplus/fbreader/formats/PluginCollection.java +++ b/src/org/geometerplus/fbreader/formats/PluginCollection.java @@ -30,6 +30,10 @@ import org.geometerplus.fbreader.formats.pdb.MobipocketPlugin; import org.geometerplus.fbreader.filetype.*; public class PluginCollection { + static { + System.loadLibrary("NativeFormats-v1"); + } + private static PluginCollection ourInstance; private final Map> myPlugins =