[tor-commits] [orbot/master] broadcast Tor state to any app that might want to know
n8fr8 at torproject.org
n8fr8 at torproject.org
Thu Jun 25 14:59:59 UTC 2015
commit 4d8a9dab27c0ba676239ac030b083e1151aa2eae
Author: Hans-Christoph Steiner <hans at eds.org>
Date: Tue Jun 9 13:34:14 2015 -0400
broadcast Tor state to any app that might want to know
In order for apps to follow the current state of Tor, this broadcasts the
state both locally, since global broadcasts are insecure, and globally, for
any app to receive. The internal workings of Orbot need to use a local
broadcast, otherwise any app could trigger stop, start, etc or DoS in other
ways.
---
src/org/torproject/android/service/TorService.java | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/org/torproject/android/service/TorService.java b/src/org/torproject/android/service/TorService.java
index a345e54..58aa9ce 100644
--- a/src/org/torproject/android/service/TorService.java
+++ b/src/org/torproject/android/service/TorService.java
@@ -1882,7 +1882,10 @@ public class TorService extends Service implements TorServiceConstants, OrbotCon
Intent intent = new Intent(ACTION_STATUS);
intent.putExtra(EXTRA_STATUS, currentStatus);
+ // send for Orbot internals, using secure local broadcast
LocalBroadcastManager.getInstance(this).sendBroadcast(intent);
+ // send for any apps that are interested
+ sendBroadcast(intent);
}
/*
More information about the tor-commits
mailing list