Loading build.gradle +1 −1 Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ buildscript { ext.kotlin_version = "1.6.10" ext.orbot_version = "orbot-16.6.2" ext.advanced_privacy_version = "1.2.0" ext.advanced_privacy_version = "1.3.0" repositories { google() Loading privacymoduletor/src/main/java/foundation/e/privacymodules/ipscramblermodule/IpScramblerModule.kt +10 −3 Original line number Diff line number Diff line Loading @@ -32,8 +32,8 @@ import foundation.e.privacymodules.ipscramblermodule.IIpScramblerModule import foundation.e.privacymodules.ipscramblermodule.IIpScramblerModule.Listener import foundation.e.privacymodules.ipscramblermodule.IIpScramblerModule.Status import java.security.InvalidParameterException import java.util.* import org.torproject.android.service.OrbotConstants import org.torproject.android.service.OrbotConstants.ACTION_STOP_FOREGROUND_TASK import org.torproject.android.service.OrbotService import org.torproject.android.service.util.Prefs Loading Loading @@ -218,12 +218,19 @@ class IpScramblerModule(private val context: Context): IIpScramblerModule { } override fun stop() { updateStatus(Status.STOPPING) Prefs.putUseVpn(false) Prefs.putStartOnBoot(false) sendIntentToService(OrbotConstants.ACTION_STOP_VPN) sendIntentToService(OrbotConstants.ACTION_STOP) context.stopService(Intent(context, OrbotService::class.java)) sendIntentToService( action = OrbotConstants.ACTION_STOP, extra = Bundle().apply { putBoolean(ACTION_STOP_FOREGROUND_TASK, true) } ) Handler(Looper.getMainLooper()).postDelayed({ requestStatus() }, 1000) } override fun requestStatus() { Loading Loading
build.gradle +1 −1 Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ buildscript { ext.kotlin_version = "1.6.10" ext.orbot_version = "orbot-16.6.2" ext.advanced_privacy_version = "1.2.0" ext.advanced_privacy_version = "1.3.0" repositories { google() Loading
privacymoduletor/src/main/java/foundation/e/privacymodules/ipscramblermodule/IpScramblerModule.kt +10 −3 Original line number Diff line number Diff line Loading @@ -32,8 +32,8 @@ import foundation.e.privacymodules.ipscramblermodule.IIpScramblerModule import foundation.e.privacymodules.ipscramblermodule.IIpScramblerModule.Listener import foundation.e.privacymodules.ipscramblermodule.IIpScramblerModule.Status import java.security.InvalidParameterException import java.util.* import org.torproject.android.service.OrbotConstants import org.torproject.android.service.OrbotConstants.ACTION_STOP_FOREGROUND_TASK import org.torproject.android.service.OrbotService import org.torproject.android.service.util.Prefs Loading Loading @@ -218,12 +218,19 @@ class IpScramblerModule(private val context: Context): IIpScramblerModule { } override fun stop() { updateStatus(Status.STOPPING) Prefs.putUseVpn(false) Prefs.putStartOnBoot(false) sendIntentToService(OrbotConstants.ACTION_STOP_VPN) sendIntentToService(OrbotConstants.ACTION_STOP) context.stopService(Intent(context, OrbotService::class.java)) sendIntentToService( action = OrbotConstants.ACTION_STOP, extra = Bundle().apply { putBoolean(ACTION_STOP_FOREGROUND_TASK, true) } ) Handler(Looper.getMainLooper()).postDelayed({ requestStatus() }, 1000) } override fun requestStatus() { Loading