From 7f8e9b80bec33eba45a2d787152992db0cede8a4 Mon Sep 17 00:00:00 2001 From: Nathan Freitas Date: Fri, 27 Jun 2014 13:02:41 -0400 Subject: [PATCH] remove test/diag option --- src/org/torproject/android/Orbot.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/org/torproject/android/Orbot.java b/src/org/torproject/android/Orbot.java index 5e6a9550..83d8e427 100644 --- a/src/org/torproject/android/Orbot.java +++ b/src/org/torproject/android/Orbot.java @@ -396,11 +396,6 @@ public class Orbot extends ActionBarActivity implements TorConstants, OnLongClic doExit(); - } - else if (item.getItemId() == R.id.menu_diag) - { - startActivity(new Intent(getApplicationContext(), OrbotDiagnosticsActivity.class)); - } else if (item.getItemId() == R.id.menu_about) { @@ -437,6 +432,8 @@ public class Orbot extends ActionBarActivity implements TorConstants, OnLongClic NotificationManager mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); mNotificationManager.cancelAll(); + mConnection = null; + mService = null; } catch (RemoteException e) { Log.w(TAG, e); @@ -953,11 +950,13 @@ public class Orbot extends ActionBarActivity implements TorConstants, OnLongClic } } - torStatus = newTorStatus; - + + torStatus = newTorStatus; } + + } // guess what? this start's Tor! actually no it just requests via the local ITorService to the remote TorService instance @@ -1260,7 +1259,8 @@ public class Orbot extends ActionBarActivity implements TorConstants, OnLongClic protected void onDestroy() { super.onDestroy(); - unbindService(mConnection); + if (mConnection != null) + unbindService(mConnection); } public class DataCount {