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 {