clean VPN proxy settings before startup
This commit is contained in:
parent
5cb6cb930d
commit
9467d7db27
|
@ -368,6 +368,7 @@ public class TorService extends Service implements TorServiceConstants, TorConst
|
||||||
|
|
||||||
if (action!=null){
|
if (action!=null){
|
||||||
if(action.equals(Intent.ACTION_BOOT_COMPLETED)||action.equals(CMD_START)){
|
if(action.equals(Intent.ACTION_BOOT_COMPLETED)||action.equals(CMD_START)){
|
||||||
|
clearVpnProxy();
|
||||||
setTorProfile(STATUS_ON);
|
setTorProfile(STATUS_ON);
|
||||||
}else if (action.equals(CMD_STOP)){
|
}else if (action.equals(CMD_STOP)){
|
||||||
setTorProfile(STATUS_OFF);
|
setTorProfile(STATUS_OFF);
|
||||||
|
@ -1441,7 +1442,6 @@ public class TorService extends Service implements TorServiceConstants, TorConst
|
||||||
{
|
{
|
||||||
SharedPreferences prefs = TorServiceUtils.getSharedPrefs(getApplicationContext());
|
SharedPreferences prefs = TorServiceUtils.getSharedPrefs(getApplicationContext());
|
||||||
Editor ePrefs = prefs.edit();
|
Editor ePrefs = prefs.edit();
|
||||||
|
|
||||||
ePrefs.remove("pref_proxy_type");
|
ePrefs.remove("pref_proxy_type");
|
||||||
ePrefs.remove("pref_proxy_host");
|
ePrefs.remove("pref_proxy_host");
|
||||||
ePrefs.remove("pref_proxy_port");
|
ePrefs.remove("pref_proxy_port");
|
||||||
|
|
Loading…
Reference in New Issue