From 91b9c09c328bf3dbb281943c03843eb850310b59 Mon Sep 17 00:00:00 2001 From: Nathan Freitas Date: Thu, 23 Sep 2010 19:47:25 +0000 Subject: [PATCH] fixes #1947 bug; adds Start on Boot option; v1.0.4-RC5 svn:r23290 --- AndroidManifest.xml | 14 +- AndroidManifest.xml.debug | 2 +- CHANGELOG | 4 + res/layout/layout_log.xml | 2 +- res/layout/layout_main.xml | 4 +- res/values/strings.xml | 9 +- res/xml/preferences.xml | 9 + src/org/torproject/android/Orbot.java | 58 ++++--- .../android/SettingsPreferences.java | 23 ++- .../android/service/TorService.java | 155 ++++++++++++------ 10 files changed, 184 insertions(+), 96 deletions(-) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index cfafd2d3..8941c9a8 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1,10 +1,10 @@ + package="org.torproject.android" android:versionName="1.0.4" android:versionCode="11"> + - - + + + + + + + + diff --git a/AndroidManifest.xml.debug b/AndroidManifest.xml.debug index 215ac4d7..25f807c6 100644 --- a/AndroidManifest.xml.debug +++ b/AndroidManifest.xml.debug @@ -1,6 +1,6 @@ + package="org.torproject.android" android:versionName="1.0.4" android:versionCode="10"> diff --git a/CHANGELOG b/CHANGELOG index c3d93cd4..17fa7137 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,6 @@ NOTE: Specific #s below correspond to Trac tickets logged and maintained at https://trac.torproject.org/projects/tor/ + 1.0.4 - Added Russian, Persian, Arabic and other .po translations (see res/values-* folders) - Fixed incorrect try to clear iptables rules for non-root devices @@ -7,6 +8,9 @@ NOTE: Specific #s below correspond to Trac tickets logged and maintained at http - Added new green notification icon when Tor is connected - Fixed app selector layout in settings - Moved minSDK to 4 (Android 1.6); discontinued 1.5 support +- Fixed log screen touch disable tor bug +- Debugged issues around network status change causing FC/crash +- Added "Start on Boot" option 1.0.3 - Fixed spanish language issues with settings screen diff --git a/res/layout/layout_log.xml b/res/layout/layout_log.xml index 41cc9fe9..d3bc32a9 100644 --- a/res/layout/layout_log.xml +++ b/res/layout/layout_log.xml @@ -43,7 +43,7 @@ android:layout_width="fill_parent" android:layout_x="2px" android:layout_y="2px" - android:textSize="12px" + android:textSize="14px" android:background="#A0222222" /> diff --git a/res/layout/layout_main.xml b/res/layout/layout_main.xml index 811dbb53..f8d0c975 100644 --- a/res/layout/layout_main.xml +++ b/res/layout/layout_main.xml @@ -58,8 +58,8 @@ android:layout_gravity="center_horizontal" android:gravity="center_horizontal" android:textStyle="bold" - android:width="320px" - android:height="100px" + android:width="300px" + android:height="75px" android:textColor="#ffffff" /> diff --git a/res/values/strings.xml b/res/values/strings.xml index a03248e2..4ad29881 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -1,6 +1,5 @@ - Hidden Services Orbot 1.0.4 @@ -110,4 +109,12 @@ You\'ve successfully connected to the Tor network - but this does NOT mean your device is secure. You can use the \'Check\' option from the menu to test your browser. \n\nVisit us at https://guardianproject.info/apps/orbot or send an email to help@guardianproject.info to learn more. This will open your default web browser to https://check.torproject.org in order to see if Orbot is probably configured and you are connected to Tor. + + + Hidden Services + + General + Start Orbot on Boot + Automatically start Orbot and connect Tor when your Android device boots + diff --git a/res/xml/preferences.xml b/res/xml/preferences.xml index 39b55dbf..2c6b152c 100644 --- a/res/xml/preferences.xml +++ b/res/xml/preferences.xml @@ -1,5 +1,14 @@ + + + + callbackBuffer = new ArrayList(); + private boolean inCallbackStatus = false; + private boolean inCallbackLog = false; private void sendCallbackStatusMessage (String newStatus) { + if (mCallbacks == null) + return; + + + // Broadcast to all clients the new value. final int N = mCallbacks.beginBroadcast(); - - callbackBuffer.add(newStatus); - + inCallbackStatus = true; + if (N > 0) { - Iterator it = callbackBuffer.iterator(); - String status = null; - - while (it.hasNext()) - { - status = it.next(); - - for (int i=0; i 0) { @@ -1133,6 +1189,7 @@ public class TorService extends Service implements TorServiceConstants, Runnable } mCallbacks.finishBroadcast(); + inCallbackLog = false; } private void applyPreferences () throws RemoteException