improved root detect and binary installation
This commit is contained in:
parent
c23c7b5217
commit
f14ca9a2d9
|
@ -249,9 +249,6 @@ public class TorBinaryInstaller implements TorServiceConstants {
|
|||
}
|
||||
*/
|
||||
|
||||
if (changed) {
|
||||
Toast.makeText(ctx, R.string.status_install_success, Toast.LENGTH_LONG).show();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -206,6 +206,12 @@ public class TorService extends Service implements TorServiceConstants, TorConst
|
|||
|
||||
Log.i(TAG, "service started: " + intent.getAction());
|
||||
|
||||
|
||||
Thread thread = new Thread ()
|
||||
{
|
||||
|
||||
public void run ()
|
||||
{
|
||||
try {
|
||||
checkTorBinaries (false);
|
||||
} catch (Exception e) {
|
||||
|
@ -215,14 +221,17 @@ public class TorService extends Service implements TorServiceConstants, TorConst
|
|||
|
||||
Log.e(TAG, "error checking tor binaries", e);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
thread.start();
|
||||
|
||||
if (intent.getAction()!=null && intent.getAction().equals("onboot"))
|
||||
{
|
||||
|
||||
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
|
||||
boolean startOnBoot = prefs.getBoolean("pref_start_boot",true);
|
||||
boolean startOnBoot = prefs.getBoolean("pref_start_boot",false);
|
||||
|
||||
if (startOnBoot)
|
||||
{
|
||||
|
@ -474,8 +483,7 @@ public class TorService extends Service implements TorServiceConstants, TorConst
|
|||
|
||||
logNotice(getString(R.string.status_install_success));
|
||||
|
||||
showToolbarNotification(getString(R.string.status_install_success), NOTIFY_ID, R.drawable.tornotification);
|
||||
|
||||
//showToolbarNotification(getString(R.string.status_install_success), NOTIFY_ID, R.drawable.tornotification);
|
||||
|
||||
torBinaryPath = fileTor.getAbsolutePath();
|
||||
privoxyPath = filePrivoxy.getAbsolutePath();
|
||||
|
|
Loading…
Reference in New Issue