Commit e30f06ac authored by Matthew Finkel's avatar Matthew Finkel
Browse files

Bug 30380 - Add patch for canceling Dormant by startup

parent 2d3807e3
......@@ -18,6 +18,7 @@ tar -C /var/tmp/build -xf [% project %]-[% c('version') %].tar.gz
# Patch projects
cd /var/tmp/build/[% project %]-[% c('version') %]
patch -p1 < $rootdir/gradle.patch
patch -p1 < $rootdir/canceldormant.patch
# Build Android Libraries and Apps
$GRADLE_HOME/gradle-4.10.2/bin/gradle --offline --no-daemon -P androidplugin=3.1.0 -Dmaven.repo.local=$gradle_repo assembleRelease -x lint
......
diff --git a/universal/src/main/java/com/msopentech/thali/toronionproxy/DefaultSettings.java b/universal/src/main/java/com/msopentech/thali/toronionproxy/DefaultSettings.java
index 5f5adac..da6747f 100644
--- a/universal/src/main/java/com/msopentech/thali/toronionproxy/DefaultSettings.java
+++ b/universal/src/main/java/com/msopentech/thali/toronionproxy/DefaultSettings.java
@@ -187,4 +187,9 @@ public class DefaultSettings implements TorSettings {
public boolean useSocks5() {
return false;
}
+
+ @Override
+ public boolean hasDormantCanceledByStartup() {
+ return false;
+ }
}
diff --git a/universal/src/main/java/com/msopentech/thali/toronionproxy/TorConfigBuilder.java b/universal/src/main/java/com/msopentech/thali/toronionproxy/TorConfigBuilder.java
index e324d9f..99e5693 100644
--- a/universal/src/main/java/com/msopentech/thali/toronionproxy/TorConfigBuilder.java
+++ b/universal/src/main/java/com/msopentech/thali/toronionproxy/TorConfigBuilder.java
@@ -503,6 +503,16 @@ public final class TorConfigBuilder {
return virtualAddressNetwork(settings.getVirtualAddressNetwork());
}
+ public TorConfigBuilder dormantCanceledByStartup() {
+ buffer.append("DormantCanceledByStartup 1").append('\n');
+ return this;
+ }
+
+ @SettingsConfig
+ public TorConfigBuilder domantCanceledByStartupFromSettings() {
+ return settings.hasDormantCanceledByStartup() ? dormantCanceledByStartup() : this;
+ }
+
/**
* Adds bridges from a resource stream. This relies on the TorInstaller to know how to obtain this stream.
* These entries may be type-specified like:
diff --git a/universal/src/main/java/com/msopentech/thali/toronionproxy/TorSettings.java b/universal/src/main/java/com/msopentech/thali/toronionproxy/TorSettings.java
index 2d515d1..43f01ef 100644
--- a/universal/src/main/java/com/msopentech/thali/toronionproxy/TorSettings.java
+++ b/universal/src/main/java/com/msopentech/thali/toronionproxy/TorSettings.java
@@ -77,4 +77,6 @@ public interface TorSettings {
String transPort();
boolean useSocks5();
+
+ boolean hasDormantCanceledByStartup();
}
......@@ -29,3 +29,4 @@ input_files:
name: gradle-dependencies
exec: '[% INCLUDE "fetch-gradle-dependencies" %]'
- filename: gradle.patch
- filename: canceldormant.patch
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment