Loading build.gradle +1 −1 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ configure(project(':orbotservice')) { groupId 'foundation.e' //You can either define these here or get them from project conf elsewhere artifactId 'orbotservice' version '0.2.0-orbot.16.4.1' version '0.2.1-orbot.16.4.1' artifact "$buildDir/outputs/aar/orbotservice-release.aar" //aar artifact you want to publish //generate pom nodes for dependencies Loading orbotservice @ 9075c529 Compare 5ed9da74 to 9075c529 Original line number Diff line number Diff line Subproject commit 5ed9da74785e3764563a67114e339cd51414453b Subproject commit 9075c52977ef98350923ed6de2ea58764faf6746 privacymoduletor/build.gradle +2 −2 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ android { targetSdkVersion 30 versionCode 7 versionName "0.2.0" versionName "0.2.1" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles "consumer-rules.pro" Loading @@ -53,7 +53,7 @@ dependencies { implementation 'androidx.core:core-ktx:1.6.0' implementation "androidx.localbroadcastmanager:localbroadcastmanager:1.0.0" implementation 'foundation.e:orbotservice:0.2.0-orbot.16.4.1' implementation 'foundation.e:orbotservice:0.2.1-orbot.16.4.1' //implementation project(':orbotservice') } Loading privacymoduletor/src/main/java/foundation/e/privacymodules/ipscramblermodule/IpScramblerModule.kt +21 −3 Original line number Diff line number Diff line Loading @@ -65,6 +65,18 @@ class IpScramblerModule(private val context: Context): IIpScramblerModule { private val localBroadcastReceiver: BroadcastReceiver = object : BroadcastReceiver() { override fun onReceive(context: Context, intent: Intent) { val action = intent.action ?: return if (action == TorServiceConstants.ACTION_RUNNING_SYNC) { try { intent.getStringExtra(TorServiceConstants.EXTRA_STATUS)?.let { val newStatus = Status.valueOf(it) currentStatus = newStatus } } catch (e: Exception) { Log.e(TAG, "Can't parse Orbot service status.") } return } val msg = messageHandler.obtainMessage() msg.obj = action msg.data = intent.extras Loading Loading @@ -135,6 +147,10 @@ class IpScramblerModule(private val context: Context): IIpScramblerModule { localBroadcastReceiver, IntentFilter(TorServiceConstants.LOCAL_ACTION_PORTS) ) lbm.registerReceiver( localBroadcastReceiver, IntentFilter(TorServiceConstants.ACTION_RUNNING_SYNC) ) Prefs.getSharedPrefs(context).edit() .putInt(VpnPrefs.PREFS_DNS_PORT, TorServiceConstants.TOR_DNS_PORT_DEFAULT) Loading @@ -151,9 +167,11 @@ class IpScramblerModule(private val context: Context): IIpScramblerModule { } private fun isServiceRunning(): Boolean { // Check if the service is working, by looking at the presence of the notification val notificationManager = context.getSystemService(NOTIFICATION_SERVICE) as NotificationManager? return notificationManager?.activeNotifications?.find { it.id == ORBOT_SERVICE_NOTIFY_ID_COPY } != null // Reset status, and then ask to refresh it synchronously. currentStatus = Status.OFF LocalBroadcastManager.getInstance(context) .sendBroadcastSync(Intent(TorServiceConstants.ACTION_CHECK_RUNNING_SYNC)) return currentStatus != Status.OFF } private fun newLog(message: String) { Loading Loading
build.gradle +1 −1 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ configure(project(':orbotservice')) { groupId 'foundation.e' //You can either define these here or get them from project conf elsewhere artifactId 'orbotservice' version '0.2.0-orbot.16.4.1' version '0.2.1-orbot.16.4.1' artifact "$buildDir/outputs/aar/orbotservice-release.aar" //aar artifact you want to publish //generate pom nodes for dependencies Loading
orbotservice @ 9075c529 Compare 5ed9da74 to 9075c529 Original line number Diff line number Diff line Subproject commit 5ed9da74785e3764563a67114e339cd51414453b Subproject commit 9075c52977ef98350923ed6de2ea58764faf6746
privacymoduletor/build.gradle +2 −2 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ android { targetSdkVersion 30 versionCode 7 versionName "0.2.0" versionName "0.2.1" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles "consumer-rules.pro" Loading @@ -53,7 +53,7 @@ dependencies { implementation 'androidx.core:core-ktx:1.6.0' implementation "androidx.localbroadcastmanager:localbroadcastmanager:1.0.0" implementation 'foundation.e:orbotservice:0.2.0-orbot.16.4.1' implementation 'foundation.e:orbotservice:0.2.1-orbot.16.4.1' //implementation project(':orbotservice') } Loading
privacymoduletor/src/main/java/foundation/e/privacymodules/ipscramblermodule/IpScramblerModule.kt +21 −3 Original line number Diff line number Diff line Loading @@ -65,6 +65,18 @@ class IpScramblerModule(private val context: Context): IIpScramblerModule { private val localBroadcastReceiver: BroadcastReceiver = object : BroadcastReceiver() { override fun onReceive(context: Context, intent: Intent) { val action = intent.action ?: return if (action == TorServiceConstants.ACTION_RUNNING_SYNC) { try { intent.getStringExtra(TorServiceConstants.EXTRA_STATUS)?.let { val newStatus = Status.valueOf(it) currentStatus = newStatus } } catch (e: Exception) { Log.e(TAG, "Can't parse Orbot service status.") } return } val msg = messageHandler.obtainMessage() msg.obj = action msg.data = intent.extras Loading Loading @@ -135,6 +147,10 @@ class IpScramblerModule(private val context: Context): IIpScramblerModule { localBroadcastReceiver, IntentFilter(TorServiceConstants.LOCAL_ACTION_PORTS) ) lbm.registerReceiver( localBroadcastReceiver, IntentFilter(TorServiceConstants.ACTION_RUNNING_SYNC) ) Prefs.getSharedPrefs(context).edit() .putInt(VpnPrefs.PREFS_DNS_PORT, TorServiceConstants.TOR_DNS_PORT_DEFAULT) Loading @@ -151,9 +167,11 @@ class IpScramblerModule(private val context: Context): IIpScramblerModule { } private fun isServiceRunning(): Boolean { // Check if the service is working, by looking at the presence of the notification val notificationManager = context.getSystemService(NOTIFICATION_SERVICE) as NotificationManager? return notificationManager?.activeNotifications?.find { it.id == ORBOT_SERVICE_NOTIFY_ID_COPY } != null // Reset status, and then ask to refresh it synchronously. currentStatus = Status.OFF LocalBroadcastManager.getInstance(context) .sendBroadcastSync(Intent(TorServiceConstants.ACTION_CHECK_RUNNING_SYNC)) return currentStatus != Status.OFF } private fun newLog(message: String) { Loading