setup Tor at app start, and config immediately when pref is changed
This adds an Application subclass to get the onCreate() method, which is called once at the first start up of the app, before any Activity starts. Tor is configured there to ensure it is setup before anything happens. This also moves the "Use Tor" pref listener to a more appropriate place.
This commit is contained in:
parent
6bd2468d44
commit
d3879a0398
6 changed files with 54 additions and 29 deletions
|
|
@ -7,6 +7,7 @@
|
|||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
||||
<application
|
||||
android:name=".App"
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:logo="@mipmap/ic_launcher"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue