[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [orbot/master] updating to tor-0.3.5.8-rc to add support for Android Q
commit 455757726d519ac56cd53eaed29c3abef25707d4
Author: n8fr8 <nathan@xxxxxxxxxxxxxxxxxxxx>
Date: Fri Mar 22 12:19:27 2019 -0400
updating to tor-0.3.5.8-rc to add support for Android Q
---
.../org/torproject/android/OrbotMainActivity.java | 4 ++--
orbotservice/build.gradle | 2 +-
.../org/torproject/android/service/TorService.java | 23 +++++++++-------------
3 files changed, 12 insertions(+), 17 deletions(-)
diff --git a/app/src/main/java/org/torproject/android/OrbotMainActivity.java b/app/src/main/java/org/torproject/android/OrbotMainActivity.java
index e18711b1..9676abc9 100644
--- a/app/src/main/java/org/torproject/android/OrbotMainActivity.java
+++ b/app/src/main/java/org/torproject/android/OrbotMainActivity.java
@@ -523,7 +523,7 @@ public class OrbotMainActivity extends AppCompatActivity
String version = "";
try {
- version = getPackageManager().getPackageInfo(getPackageName(), 0).versionName + " (Tor " + TorService.TOR_VERSION + ")";
+ version = getPackageManager().getPackageInfo(getPackageName(), 0).versionName + " (Tor " + TorService.BINARY_TOR_VERSION + ")";
} catch (NameNotFoundException e) {
version = "Version Not Found";
}
@@ -1203,7 +1203,7 @@ public class OrbotMainActivity extends AppCompatActivity
} else if (torStatus == TorServiceConstants.STATUS_OFF) {
imgStatus.setImageResource(R.drawable.toroff);
- lblStatus.setText("Tor v" + TorService.TOR_VERSION);
+ lblStatus.setText("Tor v" + TorService.BINARY_TOR_VERSION);
mBtnStart.setText(R.string.menu_start);
mPulsator.start();
diff --git a/orbotservice/build.gradle b/orbotservice/build.gradle
index cebbd502..c9f0e8a4 100644
--- a/orbotservice/build.gradle
+++ b/orbotservice/build.gradle
@@ -27,7 +27,7 @@ android {
dependencies {
implementation project(':jsocksAndroid')
- implementation 'org.torproject:tor-android-binary:0.3.5.6-rc'
+ implementation 'org.torproject:tor-android-binary:0.3.5.8-rc'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.jrummyapps:android-shell:1.0.1'
implementation fileTree(dir: 'libs', include: ['.so'])
diff --git a/orbotservice/src/main/java/org/torproject/android/service/TorService.java b/orbotservice/src/main/java/org/torproject/android/service/TorService.java
index 47da56c3..f87c0a10 100644
--- a/orbotservice/src/main/java/org/torproject/android/service/TorService.java
+++ b/orbotservice/src/main/java/org/torproject/android/service/TorService.java
@@ -78,12 +78,10 @@ import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeoutException;
-import static org.torproject.android.binary.TorServiceConstants.BINARY_TOR_VERSION;
-
public class TorService extends Service implements TorServiceConstants, OrbotConstants
{
- public final static String TOR_VERSION = org.torproject.android.binary.TorServiceConstants.BINARY_TOR_VERSION;
+ public final static String BINARY_TOR_VERSION = org.torproject.android.binary.TorServiceConstants.BINARY_TOR_VERSION;
private String mCurrentStatus = STATUS_OFF;
private final static int CONTROL_SOCKET_TIMEOUT = 0;
@@ -124,7 +122,6 @@ public class TorService extends Service implements TorServiceConstants, OrbotCon
public static File appCacheHome;
public static File fileTor;
- // public static File filePolipo;
public static File fileObfsclient;
public static File fileTorRc;
private File mHSBasePath;
@@ -591,17 +588,15 @@ public class TorService extends Service implements TorServiceConstants, OrbotCon
logNotice("checking binary version: " + version);
TorResourceInstaller installer = new TorResourceInstaller(this, appBinHome);
-
- if (version == null || (!version.equals(BINARY_TOR_VERSION)) || (!fileTor.exists()))
- {
- logNotice("upgrading binaries to latest version: " + BINARY_TOR_VERSION);
-
- boolean success = installer.installResources();
-
- if (success)
- prefs.edit().putString(PREF_BINARY_TOR_VERSION_INSTALLED,BINARY_TOR_VERSION).apply();
- }
+ logNotice("upgrading binaries to latest version: " + BINARY_TOR_VERSION);
+
+ fileTor = installer.installResources();
+
+ if (fileTor != null && fileTor.canExecute())
+ prefs.edit().putString(PREF_BINARY_TOR_VERSION_INSTALLED,BINARY_TOR_VERSION).apply();
+
+ fileTorRc = installer.getTorrcFile();
OtherResourceInstaller oInstaller = new OtherResourceInstaller(this, appBinHome);
oInstaller.installResources();
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits