commit 6ed7ab0d6dc7e4e74ec1cb520bff09bb9339dec8 Author: Nathan Freitas nathan@freitas.net Date: Sat Jul 19 20:39:42 2014 -0400
onBoot perm should default to true --- src/org/torproject/android/OnBootReceiver.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/org/torproject/android/OnBootReceiver.java b/src/org/torproject/android/OnBootReceiver.java index 8185129..652e5c9 100644 --- a/src/org/torproject/android/OnBootReceiver.java +++ b/src/org/torproject/android/OnBootReceiver.java @@ -7,19 +7,27 @@ import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; +import android.util.Log;
public class OnBootReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) {
+ //Log.i(TorService.TAG,"got boot receiver event"); + if (intent.getAction() != null && Intent.ACTION_BOOT_COMPLETED.equals(intent.getAction())) { + + //Log.i(TorService.TAG,"boot is completed"); SharedPreferences prefs = TorServiceUtils.getSharedPrefs(context.getApplicationContext()); - boolean startOnBoot = prefs.getBoolean("pref_start_boot",false); + boolean startOnBoot = prefs.getBoolean("pref_start_boot",true); + + // Log.i(TorService.TAG,"start on boot: " + startOnBoot); + if (startOnBoot) {
tor-commits@lists.torproject.org