commit 43eac8564448933bec0d9e0c4f5b07e99cdf9374 Merge: 133922f 8b6cff0 Author: amoghbl1 amoghbl1@gmail.com Date: Fri Jun 20 02:01:17 2014 +0530
fixed merge conflicts
.classpath | 2 +- AndroidManifest.xml | 12 +- CHANGELOG | 91 +++ external/Makefile | 17 +- libs/README.md | 3 + libs/jtorctl.jar | Bin 14742 -> 0 bytes res/raw/obfsclient.mp3 | Bin 807052 -> 0 bytes res/raw/polipo.mp3 | Bin 123224 -> 0 bytes res/raw/tor.mp3 | Bin 1708250 -> 0 bytes res/raw/torpolipo.conf | 6 +- res/raw/torrc | 14 +- res/raw/torrcdiag | 21 +- res/raw/xtables.mp3 | Bin 152674 -> 0 bytes res/values/strings.xml | 21 + res/xml/preferences.xml | 30 + src/org/torproject/android/Orbot.java | 294 ++++----- .../android/OrbotDiagnosticsActivity.java | 3 +- src/org/torproject/android/TorConstants.java | 2 + .../android/service/TorResourceInstaller.java | 49 ++ src/org/torproject/android/service/TorService.java | 695 +++++++++++++------- .../android/service/TorServiceConstants.java | 13 +- .../android/service/TorServiceUtils.java | 12 +- .../torproject/android/service/TorTransProxy.java | 34 +- .../android/wizard/ChooseLocaleWizardActivity.java | 90 ++- .../android/wizard/ConfigureTransProxy.java | 39 +- src/org/torproject/android/wizard/LotsaText.java | 36 +- src/org/torproject/android/wizard/Permissions.java | 44 +- .../torproject/android/wizard/TipsAndTricks.java | 50 +- 28 files changed, 972 insertions(+), 606 deletions(-)
diff --cc .classpath index 807316f,807316f..5e3f5cc --- a/.classpath +++ b/.classpath @@@ -1,10 -1,10 +1,10 @@@ <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/> -- <classpathentry kind="lib" path="libs/jtorctl.jar"/> <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/> <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/> <classpathentry kind="src" path="src"/> <classpathentry kind="src" path="gen"/> ++ <classpathentry kind="lib" path="/home/amoghbl1/git/n8fr8/jtorctl.jar"/> <classpathentry kind="output" path="bin/classes"/> </classpath> diff --cc src/org/torproject/android/Orbot.java index 90b8e74,f7e0f95..765fae5 --- a/src/org/torproject/android/Orbot.java +++ b/src/org/torproject/android/Orbot.java @@@ -515,34 -530,8 +530,9 @@@ public class Orbot extends ActionBarAct setResult(RESULT_OK, nResult); } - - /* (non-Javadoc) - * @see android.app.Activity#onResume() - */ - protected void onResume() { - super.onResume(); - - bindService(); - updateStatus(""); - } - - - - @Override - protected void onNewIntent(Intent intent) { - - super.onNewIntent(intent); - try { - Log.d("lala", ""+mService.getStatus()); - } catch (RemoteException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - updateStatus(""); - handleIntents(); - }
- private void handleIntents () ++ + private synchronized void handleIntents () { if (getIntent() == null) return; diff --cc src/org/torproject/android/service/TorService.java index 205be24,7830a68..c2c86c0 --- a/src/org/torproject/android/service/TorService.java +++ b/src/org/torproject/android/service/TorService.java @@@ -19,13 -21,9 +21,13 @@@ import java.net.Socket import java.util.ArrayList; import java.util.Arrays; import java.util.Iterator; - import java.util.LinkedHashMap; import java.util.List; import java.util.StringTokenizer; +import java.util.Timer; +import java.util.TimerTask; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + import java.util.concurrent.TimeoutException;
import net.freehaven.tor.control.ConfigEntry; import net.freehaven.tor.control.EventHandler; @@@ -81,11 -76,9 +84,11 @@@ public class TorService extends Servic private static final int NOTIFY_ID = 1; private static final int TRANSPROXY_NOTIFY_ID = 2; private static final int ERROR_NOTIFY_ID = 3; - private static final int HS_NOTIFY_ID = 3; + private static final int HS_NOTIFY_ID = 4; private boolean prefPersistNotifications = true; + String IPADDRESS_PATTERN = + "(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)"; private static final int MAX_START_TRIES = 3;
@@@ -274,41 -238,26 +262,26 @@@ mNotifyBuilder.setLights(Color.RED, 1000, 1000); mNotifyBuilder.setSmallIcon(R.drawable.ic_stat_notifyerr); } + else + { + mNotifyBuilder.setTicker(null); //make sure to clear ticker + } + mNotification = mNotifyBuilder.build(); + mNotification.bigContentView = expandedView; + if (isOngoing) { - startForeground(notifyId, - mNotifyBuilder.build()); + startForeground(notifyId, mNotification); } else { - mNotificationManager.notify( - notifyId, - mNotifyBuilder.build()); + mNotificationManager.notify(notifyId, mNotification); } - + }
- /* (non-Javadoc) - * @see android.app.Service#onRebind(android.content.Intent) - */ - @Override - public void onRebind(Intent intent) { - super.onRebind(intent); - - try - { - sendCallbackLogMessage("Welcome back, Carter!"); - } - catch (Exception e) - { - Log.e(TAG,"unable to init Tor",e); - throw new RuntimeException("Unable to init Tor"); - } - } -
/* (non-Javadoc) * @see android.app.Service#onStart(android.content.Intent, int)
tor-commits@lists.torproject.org