Prevent crashes

This commit is contained in:
M66B 2017-10-28 16:08:06 +02:00
parent b1aecac20a
commit 6b625e5634
3 changed files with 11 additions and 4 deletions

View File

@ -36,7 +36,11 @@ public class ActivityForwardApproval extends Activity {
private static final String ACTION_STOP_PORT_FORWARD = "eu.faircode.netguard.STOP_PORT_FORWARD";
static {
System.loadLibrary("netguard");
try {
System.loadLibrary("netguard");
} catch (UnsatisfiedLinkError ignored) {
System.exit(1);
}
}
@Override

View File

@ -47,8 +47,7 @@ public class ApplicationEx extends Application {
@Override
public void uncaughtException(Thread thread, Throwable ex) {
Log.e(TAG, ex.toString() + "\n" + Log.getStackTraceString(ex));
//if (mPrevHandler != null)
// mPrevHandler.uncaughtException(thread, ex);
System.exit(1);
}
});
}

View File

@ -127,7 +127,11 @@ public class Util {
private static native boolean is_numeric_address(String ip);
static {
System.loadLibrary("netguard");
try {
System.loadLibrary("netguard");
} catch (UnsatisfiedLinkError ignored) {
System.exit(1);
}
}
public static String getSelfVersionName(Context context) {