From 610abf5b79d80a37e4dbc705085f1fa69429aab8 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Mon, 26 Sep 2016 21:06:12 +0200 Subject: [PATCH 1/2] fix ant builds by using frozen SDK legacy! This uses a copy of the Android SDK that is frozen to the last version that works with ant builds. --- jenkins-build | 6 ++++-- make-release-build | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/jenkins-build b/jenkins-build index 0bc0b6f1..3c8546d4 100755 --- a/jenkins-build +++ b/jenkins-build @@ -1,11 +1,13 @@ #!/bin/bash +# bash is required because we need bash's printf to guarantee a cross-platform +# timestamp format. set -e set -x if [ -z $ANDROID_HOME ]; then - if [ -e ~/.android/bashrc ]; then - . ~/.android/bashrc + if [ -e ~/.android/bashrc-ant-build ]; then + . ~/.android/bashrc-ant-build else echo "ANDROID_HOME must be set!" exit diff --git a/make-release-build b/make-release-build index 41166c4a..33980f86 100755 --- a/make-release-build +++ b/make-release-build @@ -27,8 +27,8 @@ fi if [ -z $ANDROID_HOME ]; then - if [ -e ~/.android/bashrc ]; then - . ~/.android/bashrc + if [ -e ~/.android/bashrc-ant-build ]; then + . ~/.android/bashrc-ant-build else echo "ANDROID_HOME must be set!" exit From 1e93ef46062d393b1ccccfcd482d7451f688cba1 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Fri, 3 Jun 2016 11:30:08 +0200 Subject: [PATCH 2/2] improved javadoc of start process --- src/org/torproject/android/service/TorService.java | 4 +++- src/org/torproject/android/service/TorServiceConstants.java | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/org/torproject/android/service/TorService.java b/src/org/torproject/android/service/TorService.java index b90442ba..147ca780 100644 --- a/src/org/torproject/android/service/TorService.java +++ b/src/org/torproject/android/service/TorService.java @@ -698,7 +698,9 @@ public class TorService extends VpnService implements TorServiceConstants, Orbot /** * Send Orbot's status in reply to an * {@link TorServiceConstants#ACTION_START} {@link Intent}, targeted only to - * the app that sent the initial request. + * the app that sent the initial request. If the user has disabled auto- + * starts, the reply {@code ACTION_START Intent} will include the extra + * {@link TorServiceConstants#STATUS_STARTS_DISABLED} */ private void replyWithStatus(Intent startRequest) { String packageName = startRequest.getStringExtra(EXTRA_PACKAGE_NAME); diff --git a/src/org/torproject/android/service/TorServiceConstants.java b/src/org/torproject/android/service/TorServiceConstants.java index e2f09641..86c6a64b 100644 --- a/src/org/torproject/android/service/TorServiceConstants.java +++ b/src/org/torproject/android/service/TorServiceConstants.java @@ -117,9 +117,11 @@ public interface TorServiceConstants { public final static String STATUS_ON = "ON"; public final static String STATUS_STARTING = "STARTING"; public final static String STATUS_STOPPING = "STOPPING"; + /** * The user has disabled the ability for background starts triggered by - * apps. Fallback to the old Intent that brings up Orbot. + * apps. Fallback to the old {@link Intent} action that brings up Orbot: + * {@link org.torproject.android.OrbotMainActivity#INTENT_ACTION_REQUEST_START_TOR} */ public final static String STATUS_STARTS_DISABLED = "STARTS_DISABLED";