mirror of
https://github.com/PurpleI2P/i2pd-android.git
synced 2024-12-06 19:27:28 +01:00
@@ -10,6 +10,7 @@ import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.Locale;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.content.res.AssetManager;
|
||||
@@ -31,6 +32,8 @@ public class DaemonWrapper {
|
||||
private String i2pdpath = Environment.getExternalStorageDirectory().getAbsolutePath() + "/i2pd/";
|
||||
private boolean assetsCopied;
|
||||
|
||||
private static final String appLocale = Locale.getDefault().getDisplayLanguage(Locale.ENGLISH).toLowerCase(); // lower-case system language (like "english")
|
||||
|
||||
public interface StateUpdateListener {
|
||||
void daemonStateUpdate(State oldValue, State newValue);
|
||||
}
|
||||
@@ -184,7 +187,11 @@ public class DaemonWrapper {
|
||||
}
|
||||
try {
|
||||
synchronized (DaemonWrapper.this) {
|
||||
I2PD_JNI.setDataDir(i2pdpath);//(Environment.getExternalStorageDirectory().getAbsolutePath() + "/i2pd");
|
||||
I2PD_JNI.setDataDir(i2pdpath); // (Environment.getExternalStorageDirectory().getAbsolutePath() + "/i2pd");
|
||||
|
||||
Log.d(TAG, "setting webconsole language to " + appLocale);
|
||||
I2PD_JNI.setLanguage(appLocale);
|
||||
|
||||
daemonStartResult = I2PD_JNI.startDaemon();
|
||||
if ("ok".equals(daemonStartResult)) {
|
||||
setState(State.startedOkay);
|
||||
|
||||
@@ -26,6 +26,8 @@ public class I2PD_JNI {
|
||||
|
||||
public static native String getWebConsAddr();
|
||||
|
||||
public static native void setLanguage(String jlanguage);
|
||||
|
||||
public static void loadLibraries() {
|
||||
//System.loadLibrary("c++_shared");
|
||||
System.loadLibrary("i2pd");
|
||||
|
||||
Reference in New Issue
Block a user