diff --git a/platform/android/AndroidManifest.xml b/platform/android/AndroidManifest.xml index ca675914..ea684696 100644 --- a/platform/android/AndroidManifest.xml +++ b/platform/android/AndroidManifest.xml @@ -1,8 +1,8 @@ diff --git a/platform/android/src/com/cgogolin/penandpdf/MuPDFCore.java b/platform/android/src/com/cgogolin/penandpdf/MuPDFCore.java index 84911911..0f705236 100644 --- a/platform/android/src/com/cgogolin/penandpdf/MuPDFCore.java +++ b/platform/android/src/com/cgogolin/penandpdf/MuPDFCore.java @@ -110,13 +110,13 @@ private native void updatePageInternal(Bitmap bitmap, private native void abortCookie(long cookie); private native boolean cookieAborted(long cookie); - - public native void setInkThickness(float inkThickness); - public native void setInkColor(float r, float g, float b); - public native void setHighlightColor(float r, float g, float b); - public native void setUnderlineColor(float r, float g, float b); - public native void setStrikeoutColor(float r, float g, float b); - public native void setTextAnnotIconColor(float r, float g, float b); + /* making these non synchronized probably lead to a hard to debug crash in native code */ + public synchronized native void setInkThickness(float inkThickness); + public synchronized native void setInkColor(float r, float g, float b); + public synchronized native void setHighlightColor(float r, float g, float b); + public synchronized native void setUnderlineColor(float r, float g, float b); + public synchronized native void setStrikeoutColor(float r, float g, float b); + public synchronized native void setTextAnnotIconColor(float r, float g, float b); public synchronized native int insertBlankPageBeforeInternal(int position); public synchronized native boolean javascriptSupported();