Browse Source

gpgme log level in function of build type

JNI-44
Hussein Kasem 9 years ago
parent
commit
629394b105
  1. 26
      android/src/org/pEp/jniadapter/AndroidHelper.java

26
android/src/org/pEp/jniadapter/AndroidHelper.java

@ -1,23 +1,14 @@
package org.pEp.jniadapter; package org.pEp.jniadapter;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.util.Scanner;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
import android.content.Context; import android.content.Context;
import android.content.res.AssetManager; import android.content.res.AssetManager;
import android.util.Log; import android.util.Log;
import android.content.Intent; import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
import java.lang.reflect.InvocationTargetException; import java.io.*;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.util.Scanner;
public class AndroidHelper { public class AndroidHelper {
static { static {
@ -145,11 +136,14 @@ public class AndroidHelper {
System.loadLibrary("assuan"); System.loadLibrary("assuan");
System.loadLibrary("gpgme"); System.loadLibrary("gpgme");
if (BuildConfig.DEBUG) {
// With lots of log // With lots of log
nativeSetup( "9:"+new File(c.getFilesDir(), "gpgme.log").getAbsolutePath()); nativeSetup("9:" + new File(c.getFilesDir(), "gpgme.log").getAbsolutePath());
} else {
// With almost no log // With almost no log
//nativeSetup( "0:"+new File(c.getFilesDir(), "gpgme.log").getAbsolutePath()); nativeSetup("0:" + new File(c.getFilesDir(), "gpgme.log").getAbsolutePath());
}
} }
public static void setup(Context c) { public static void setup(Context c) {

Loading…
Cancel
Save