[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [orbot/master] VpnConstants file isn't needed, redirects to another file
commit 9cca3d0fba2a99a0369090b6e38f91a7bb976b6c
Author: bim <dsnake@xxxxxxxxxxxxxx>
Date: Thu Sep 10 10:42:32 2020 -0400
VpnConstants file isn't needed, redirects to another file
---
.../java/org/torproject/android/mini/MiniMainActivity.java | 6 ++----
.../java/org/torproject/android/OrbotMainActivity.java | 3 +--
.../org/torproject/android/service/vpn/VpnConstants.java | 14 --------------
.../java/org/torproject/android/service/vpn/VpnPrefs.java | 9 +--------
4 files changed, 4 insertions(+), 28 deletions(-)
diff --git a/app-mini/src/main/java/org/torproject/android/mini/MiniMainActivity.java b/app-mini/src/main/java/org/torproject/android/mini/MiniMainActivity.java
index f697bcea..4566031d 100644
--- a/app-mini/src/main/java/org/torproject/android/mini/MiniMainActivity.java
+++ b/app-mini/src/main/java/org/torproject/android/mini/MiniMainActivity.java
@@ -62,7 +62,6 @@ import org.torproject.android.service.OrbotService;
import org.torproject.android.service.TorServiceConstants;
import org.torproject.android.service.util.Prefs;
import org.torproject.android.service.vpn.TorifiedApp;
-import org.torproject.android.service.vpn.VpnConstants;
import org.torproject.android.service.vpn.VpnPrefs;
import java.io.BufferedReader;
@@ -76,7 +75,6 @@ import java.util.StringTokenizer;
import static org.torproject.android.mini.MainConstants.RESULT_CLOSE_ALL;
import static org.torproject.android.service.vpn.VpnPrefs.PREFS_KEY_TORIFIED;
-import static org.torproject.android.service.vpn.VpnUtils.getSharedPrefs;
public class MiniMainActivity extends AppCompatActivity
implements OrbotConstants, OnLongClickListener {
@@ -157,8 +155,8 @@ public class MiniMainActivity extends AppCompatActivity
/**
* Resets previous DNS Port to the default
*/
- getSharedPrefs(getApplicationContext()).edit().putInt(VpnPrefs.PREFS_DNS_PORT,
- VpnConstants.TOR_DNS_PORT_DEFAULT).apply();
+ mPrefs.edit().putInt(VpnPrefs.PREFS_DNS_PORT,
+ TorServiceConstants.TOR_DNS_PORT_DEFAULT).apply();
}
diff --git a/app/src/main/java/org/torproject/android/OrbotMainActivity.java b/app/src/main/java/org/torproject/android/OrbotMainActivity.java
index 11c5d408..81631e9f 100644
--- a/app/src/main/java/org/torproject/android/OrbotMainActivity.java
+++ b/app/src/main/java/org/torproject/android/OrbotMainActivity.java
@@ -59,7 +59,6 @@ import org.torproject.android.service.OrbotService;
import org.torproject.android.service.TorServiceConstants;
import org.torproject.android.service.util.Prefs;
import org.torproject.android.service.util.Utils;
-import org.torproject.android.service.vpn.VpnConstants;
import org.torproject.android.service.vpn.VpnPrefs;
import org.torproject.android.settings.Languages;
import org.torproject.android.settings.LocaleHelper;
@@ -202,7 +201,7 @@ public class OrbotMainActivity extends AppCompatActivity implements OrbotConstan
// Resets previous DNS Port to the default.
Prefs.getSharedPrefs(getApplicationContext()).edit().putInt(VpnPrefs.PREFS_DNS_PORT,
- VpnConstants.TOR_DNS_PORT_DEFAULT).apply();
+ TorServiceConstants.TOR_DNS_PORT_DEFAULT).apply();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
if (Prefs.useDebugLogging())
diff --git a/orbotservice/src/main/java/org/torproject/android/service/vpn/VpnConstants.java b/orbotservice/src/main/java/org/torproject/android/service/vpn/VpnConstants.java
deleted file mode 100644
index 01ac5eea..00000000
--- a/orbotservice/src/main/java/org/torproject/android/service/vpn/VpnConstants.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package org.torproject.android.service.vpn;
-
-import org.torproject.android.service.TorServiceConstants;
-
-public interface VpnConstants {
-
- int FILE_WRITE_BUFFER_SIZE = 2048;
-
- String SHELL_CMD_PS = "toolbox ps";
-
- //Keep Aligned with TorServiceContants,
- int TOR_DNS_PORT_DEFAULT = TorServiceConstants.TOR_DNS_PORT_DEFAULT;
-
-}
diff --git a/orbotservice/src/main/java/org/torproject/android/service/vpn/VpnPrefs.java b/orbotservice/src/main/java/org/torproject/android/service/vpn/VpnPrefs.java
index beba5bee..4945241a 100644
--- a/orbotservice/src/main/java/org/torproject/android/service/vpn/VpnPrefs.java
+++ b/orbotservice/src/main/java/org/torproject/android/service/vpn/VpnPrefs.java
@@ -2,14 +2,7 @@ package org.torproject.android.service.vpn;
public interface VpnPrefs {
- String PREFS_DNS_PORT= "PREFS_DNS_PORT";
+ String PREFS_DNS_PORT = "PREFS_DNS_PORT";
String PREFS_KEY_TORIFIED = "PrefTord";
-
- /**
- * Keep this in sync with the one in TorServiceUtils
- */
- String PREF_TOR_SHARED_PREFS = "org.torproject.android_preferences";
-
-
}
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits