don't manually call onDestroy, just call finish()

This commit is contained in:
Nathan Freitas 2014-08-29 00:16:31 -04:00
parent d1b08ee4e8
commit a0b32ba068
1 changed files with 13 additions and 6 deletions

View File

@ -432,7 +432,8 @@ public class Orbot extends ActionBarActivity implements TorConstants, OnLongClic
//terminology but also making sure there are clear distinctions in control //terminology but also making sure there are clear distinctions in control
stopTor(); stopTor();
onDestroy(); //onDestroy();
} catch (RemoteException e) { } catch (RemoteException e) {
Log.w(TAG, e); Log.w(TAG, e);
@ -448,11 +449,17 @@ public class Orbot extends ActionBarActivity implements TorConstants, OnLongClic
* @see android.app.Activity#onPause() * @see android.app.Activity#onPause()
*/ */
protected void onPause() { protected void onPause() {
super.onPause(); try
{
if (aDialog != null) super.onPause();
aDialog.dismiss();
if (aDialog != null)
aDialog.dismiss();
}
catch (IllegalStateException ise)
{
//can happen on exit/shutdown
}
} }
private void doTorCheck () private void doTorCheck ()