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.
This commit is contained in:
parent
3580cbe05d
commit
4d8a9dab27
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue