JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *jvm, void *reserved)
{
    __android_log_print(ANDROID_LOG_DEBUG, "PDFViewer", "initializing PDFViewer JNI library based on MuPDF");
    fz_accelerate();
    atexit(closeHandler);
    NativeBitmap_getInfo = NULL;
    NativeBitmap_lockPixels = NULL;
    NativeBitmap_unlockPixels = NULL;

    handler = NativeBitmapInit();
    if(handler) present = 1;
    return JNI_VERSION_1_4;
}
Example #2
0
JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *jvm, void *reserved)
{
    __android_log_print(ANDROID_LOG_DEBUG, "EBookDroid",
        "initializing EBookDroid JNI library based on MuPDF and DjVuLibre");
#ifndef __mips__
     atexit(closeHandler);
#endif
    NativeBitmap_getInfo = NULL;
    NativeBitmap_lockPixels = NULL;
    NativeBitmap_unlockPixels = NULL;

    handler = NativeBitmapInit();
    if (handler)
        present = 1;
    return JNI_VERSION_1_4;
}