Skip to content

Commit

Permalink
possible fix for mysterious crash in native code
Browse files Browse the repository at this point in the history
  • Loading branch information
cgogolin committed Dec 20, 2017
1 parent 192d04c commit ccbffb8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions platform/android/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.cgogolin.penandpdf"
android:versionCode="66"
android:versionName="1.3.5"
android:versionCode="67"
android:versionName="1.3.6"
android:installLocation="auto">
<permission android:name="com.cgogolin.penandpdf.LAUNCH_PEN_AND_PDF_FILE_CHOOSER" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
Expand Down
14 changes: 7 additions & 7 deletions platform/android/src/com/cgogolin/penandpdf/MuPDFCore.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit ccbffb8

Please sign in to comment.