non perfect but better option to start/stop

This commit is contained in:
arrase 2016-11-28 22:06:09 +01:00
parent 9ffb0b3915
commit 7a9ad4720b
2 changed files with 9 additions and 1 deletions

View File

@ -602,7 +602,14 @@ public class OrbotMainActivity extends AppCompatActivity
hsutils.restoreKeyBackup(hsPort, hsKeyPath); hsutils.restoreKeyBackup(hsPort, hsKeyPath);
} }
startTor(); if (torStatus.equals(TorServiceConstants.STATUS_OFF)) {
startTor();
} else {
stopTor();
Toast.makeText(
this, R.string.start_tor_again_for_finish_the_process, Toast.LENGTH_LONG
).show();
}
new Thread() { new Thread() {

View File

@ -351,4 +351,5 @@
<string name="restore_backup">Restore Backup</string> <string name="restore_backup">Restore Backup</string>
<string name="create_a_backup_first">Create a backup first</string> <string name="create_a_backup_first">Create a backup first</string>
<string name="name_can_t_be_empty">Name can\'t be empty</string> <string name="name_can_t_be_empty">Name can\'t be empty</string>
<string name="start_tor_again_for_finish_the_process">Start Tor again for finish the process</string>
</resources> </resources>