diff --git a/app/build.gradle b/app/build.gradle
index 3532b9e..50065ba 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -14,9 +14,9 @@ android {
applicationId "org.purplei2p.i2pd"
targetSdkVersion 29
minSdkVersion 16
- versionCode 24101
+ versionCode 2410001
versionName "2.41.0.1"
- setProperty("archivesBaseName", archivesBaseName + "-" + versionName)
+ archivesBaseName += "-$versionName"
ndkVersion "21.4.7075529"
ndk {
@@ -83,7 +83,7 @@ android.applicationVariants.all { variant ->
def baseAbiVersionCode = project.ext.abiCodes.get(output.getFilter(OutputFile.ABI))
if (baseAbiVersionCode != null) {
- output.versionCodeOverride = baseAbiVersionCode + variant.versionCode
+ output.versionCodeOverride = baseAbiVersionCode * 10 + variant.versionCode
}
}
}
diff --git a/app/src/main/java/org/purplei2p/i2pd/DaemonWrapper.java b/app/src/main/java/org/purplei2p/i2pd/DaemonWrapper.java
index 930ff2d..5ad2ac0 100644
--- a/app/src/main/java/org/purplei2p/i2pd/DaemonWrapper.java
+++ b/app/src/main/java/org/purplei2p/i2pd/DaemonWrapper.java
@@ -128,7 +128,7 @@ public class DaemonWrapper {
private String daemonStartResult = "N/A";
private void fireStateUpdate1(State oldValue, State newValue) {
- Log.i(TAG, "daemon state change: " + state);
+ Log.d(TAG, "daemon state change: " + state);
for (StateUpdateListener listener : stateUpdateListeners) {
try {
listener.daemonStateUpdate(oldValue, newValue);
@@ -186,7 +186,7 @@ public class DaemonWrapper {
synchronized (DaemonWrapper.this) {
I2PD_JNI.setDataDir(i2pdpath); // (Environment.getExternalStorageDirectory().getAbsolutePath() + "/i2pd");
- Log.d(TAG, "setting webconsole language to " + appLocale);
+ Log.i(TAG, "setting webconsole language to " + appLocale);
I2PD_JNI.setLanguage(appLocale);
daemonStartResult = I2PD_JNI.startDaemon();
@@ -351,7 +351,7 @@ public class DaemonWrapper {
}
boolean deleteResult = fileOrDirectory.delete();
if (!deleteResult)
- Log.e(TAG, "fileOrDirectory.delete() returned " + deleteResult + ", absolute path='" + fileOrDirectory.getAbsolutePath() + "'");
+ Log.d(TAG, "fileOrDirectory.delete() returned " + deleteResult + ", absolute path='" + fileOrDirectory.getAbsolutePath() + "'");
}
private void registerNetworkCallback(){
@@ -373,14 +373,14 @@ public class DaemonWrapper {
public void onAvailable(Network network) {
super.onAvailable(network);
I2PD_JNI.onNetworkStateChanged(true);
- Log.i(TAG, "NetworkCallback.onAvailable");
+ Log.d(TAG, "NetworkCallback.onAvailable");
}
@Override
public void onLost(Network network) {
super.onLost(network);
I2PD_JNI.onNetworkStateChanged(false);
- Log.i(TAG, " NetworkCallback.onLost");
+ Log.d(TAG, " NetworkCallback.onLost");
}
}
}
diff --git a/app/src/main/java/org/purplei2p/i2pd/ForegroundService.java b/app/src/main/java/org/purplei2p/i2pd/ForegroundService.java
index c530ed1..17bab87 100644
--- a/app/src/main/java/org/purplei2p/i2pd/ForegroundService.java
+++ b/app/src/main/java/org/purplei2p/i2pd/ForegroundService.java
@@ -84,7 +84,7 @@ public class ForegroundService extends Service {
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
- Log.i("ForegroundService", "Received start id " + startId + ": " + intent);
+ Log.d("ForegroundService", "Received start id " + startId + ": " + intent);
return START_STICKY;
}
diff --git a/app/src/main/java/org/purplei2p/i2pd/I2PDActivity.java b/app/src/main/java/org/purplei2p/i2pd/I2PDActivity.java
index be6a8eb..41a8579 100644
--- a/app/src/main/java/org/purplei2p/i2pd/I2PDActivity.java
+++ b/app/src/main/java/org/purplei2p/i2pd/I2PDActivity.java
@@ -107,7 +107,7 @@ public class I2PDActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
- Log.i(TAG, "onCreate");
+ Log.d(TAG, "onCreate");
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
@@ -173,11 +173,10 @@ public class I2PDActivity extends Activity {
{
if (requestCode == MY_PERMISSION_REQUEST_WRITE_EXTERNAL_STORAGE) {
if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED)
- Log.e(TAG, "WR_EXT_STORAGE perm granted");
+ Log.w(TAG, "WR_EXT_STORAGE perm granted");
else {
Log.e(TAG, "WR_EXT_STORAGE perm declined, stopping i2pd");
i2pdStop();
- //TODO must work w/o this perm, ask orignal
}
}
}
@@ -318,14 +317,14 @@ public class I2PDActivity extends Activity {
}
private void onReloadTunnelsConfig() {
- Log.d(TAG, "reloading tunnels");
+ Log.i(TAG, "reloading tunnels");
daemon.reloadTunnelsConfigs();
Toast.makeText(this, R.string.tunnels_reloading, Toast.LENGTH_SHORT).show();
}
private void i2pdStop() {
cancelGracefulStop0();
- Log.d(TAG, "stopping");
+ Log.i(TAG, "stopping");
textView.setText(getText(R.string.stopping));
new Thread(() -> {
try {
@@ -351,7 +350,7 @@ public class I2PDActivity extends Activity {
Toast.makeText(this, R.string.graceful_stop_is_in_progress, Toast.LENGTH_SHORT).show();
new Thread(() -> {
try {
- Log.d(TAG, "graceful stopping");
+ Log.i(TAG, "graceful stopping");
if (daemon.isStartedOkay()) {
daemon.stopAcceptingTunnels();
long gracefulStopAtMillis;
@@ -373,7 +372,7 @@ public class I2PDActivity extends Activity {
cancelGracefulStop0();
new Thread(() -> {
try {
- Log.d(TAG, "canceling graceful stop");
+ Log.i(TAG, "canceling graceful stop");
if (daemon.isStartedOkay()) {
daemon.startAcceptingTunnels();
runOnUiThread(() -> Toast.makeText(this, R.string.shutdown_canceled, Toast.LENGTH_SHORT).show());
@@ -390,7 +389,7 @@ public class I2PDActivity extends Activity {
gracefulQuitTimerOld.cancel();
if (daemon.getTransitTunnelsCount() <= 0) { // no tunnels left
- Log.d(TAG, "no transit tunnels left, stopping");
+ Log.i(TAG, "no transit tunnels left, stopping");
i2pdStop();
return;
}
@@ -436,7 +435,7 @@ public class I2PDActivity extends Activity {
@SuppressLint("BatteryLife")
private void openBatteryOptimizationDialogIfNeeded() {
boolean questionEnabled = getPreferences().getBoolean(getBatteryOptimizationPreferenceKey(), true);
- Log.i(TAG, "BATT_OPTIM_questionEnabled==" + questionEnabled);
+ Log.d(TAG, "BATT_OPTIM_questionEnabled==" + questionEnabled);
if (!isKnownIgnoringBatteryOptimizations()
&& android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M
&& questionEnabled) {
@@ -466,14 +465,14 @@ public class I2PDActivity extends Activity {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
final PowerManager pm = (PowerManager) getSystemService(POWER_SERVICE);
if (pm == null) {
- Log.i(TAG, "BATT_OPTIM: POWER_SERVICE==null");
+ Log.d(TAG, "BATT_OPTIM: POWER_SERVICE==null");
return false;
}
boolean ignoring = pm.isIgnoringBatteryOptimizations(getPackageName());
- Log.i(TAG, "BATT_OPTIM: ignoring==" + ignoring);
+ Log.d(TAG, "BATT_OPTIM: ignoring==" + ignoring);
return ignoring;
} else {
- Log.i(TAG, "BATT_OPTIM: old SDK version==" + Build.VERSION.SDK_INT);
+ Log.d(TAG, "BATT_OPTIM: old SDK version==" + Build.VERSION.SDK_INT);
return false;
}
}
diff --git a/app/src/main/java/org/purplei2p/i2pd/NetworkStateChangeReceiver.java b/app/src/main/java/org/purplei2p/i2pd/NetworkStateChangeReceiver.java
index c4ff623..35975a0 100644
--- a/app/src/main/java/org/purplei2p/i2pd/NetworkStateChangeReceiver.java
+++ b/app/src/main/java/org/purplei2p/i2pd/NetworkStateChangeReceiver.java
@@ -21,7 +21,7 @@ public class NetworkStateChangeReceiver extends BroadcastReceiver {
I2PD_JNI.onNetworkStateChanged(isConnected);
} catch (Throwable tr) {
- Log.d(TAG, "", tr);
+ Log.e(TAG, "", tr);
}
}
}
diff --git a/app/src/main/java/org/purplei2p/i2pd/SettingsActivity.java b/app/src/main/java/org/purplei2p/i2pd/SettingsActivity.java
index 5bc1f29..43d9b1a 100644
--- a/app/src/main/java/org/purplei2p/i2pd/SettingsActivity.java
+++ b/app/src/main/java/org/purplei2p/i2pd/SettingsActivity.java
@@ -78,7 +78,7 @@ public class SettingsActivity extends Activity {
}
public void onCreate(Bundle savedInstanceState) {
- Log.i(TAG, "onCreate");
+ Log.d(TAG, "onCreate");
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_settings);
Objects.requireNonNull(getActionBar()).setDisplayHomeAsUpEnabled(true);
@@ -99,7 +99,7 @@ public class SettingsActivity extends Activity {
if (!onBoot.createNewFile())
Log.d(TAG, "Cant create new wile on: "+onBoot.getAbsolutePath());
} catch (Exception e) {
- Log.d(TAG, "error: " + e.toString());
+ Log.e(TAG, "error: " + e.toString());
}
}
} else {
diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml
index b5225ad..cf1d0ec 100644
--- a/app/src/main/res/values-ru/strings.xml
+++ b/app/src/main/res/values-ru/strings.xml
@@ -56,5 +56,5 @@
Внутренние сервисы
HTTP Прокси
SOCKS5 Прокси
- Остановка приложения
+ Остановка приложения...
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 4bc839c..6a4ce78 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -24,7 +24,7 @@
Application started
Start failed
Application stopped
- Application stopping
+ Application stopping...
remaining
OK