[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [orbot/master] don't destroy service each time you stop Tor - causes memory issues and crashes in libtor
commit c0b09bffc61302ff3e3cad2be9248762304217d1
Author: n8fr8 <nathan@xxxxxxxxxxxxxxxxxxxx>
Date: Fri Jul 2 14:09:30 2021 -0400
don't destroy service each time you stop Tor - causes memory issues and crashes in libtor
---
app/src/main/java/org/torproject/android/OrbotMainActivity.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/app/src/main/java/org/torproject/android/OrbotMainActivity.java b/app/src/main/java/org/torproject/android/OrbotMainActivity.java
index aff0f2b2..4f0143d3 100644
--- a/app/src/main/java/org/torproject/android/OrbotMainActivity.java
+++ b/app/src/main/java/org/torproject/android/OrbotMainActivity.java
@@ -89,6 +89,7 @@ import pl.bclogic.pulsator4droid.library.PulsatorLayout;
import static androidx.core.content.FileProvider.getUriForFile;
import static org.torproject.android.service.TorServiceConstants.ACTION_START;
import static org.torproject.android.service.TorServiceConstants.ACTION_START_VPN;
+import static org.torproject.android.service.TorServiceConstants.ACTION_STOP;
import static org.torproject.android.service.TorServiceConstants.ACTION_STOP_VPN;
import static org.torproject.android.service.TorServiceConstants.DIRECTORY_TOR_DATA;
import static org.torproject.android.service.TorServiceConstants.STATUS_OFF;
@@ -280,8 +281,8 @@ public class OrbotMainActivity extends AppCompatActivity implements OrbotConstan
private void stopTor() {
if (mBtnVPN.isChecked()) sendIntentToService(ACTION_STOP_VPN);
- Intent intent = new Intent(OrbotMainActivity.this, OrbotService.class);
- stopService(intent);
+ sendIntentToService(ACTION_STOP);
+
}
private void doLayout() {
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits