[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [orbot/master] make sure notification is shown immediately while starting up
commit ba212a447cd2873d806029992594b605c56ddc16
Author: Nathan Freitas <nathan@xxxxxxxxxxx>
Date: Thu Nov 3 12:45:00 2016 -0400
make sure notification is shown immediately while starting up
---
.../main/java/org/torproject/android/service/TorService.java | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/orbotservice/src/main/java/org/torproject/android/service/TorService.java b/orbotservice/src/main/java/org/torproject/android/service/TorService.java
index 47af4ac..d55e1cf 100644
--- a/orbotservice/src/main/java/org/torproject/android/service/TorService.java
+++ b/orbotservice/src/main/java/org/torproject/android/service/TorService.java
@@ -163,6 +163,8 @@ public class TorService extends Service implements TorServiceConstants, OrbotCon
if (mLastProcessId != -1 && conn != null) {
sendCallbackLogMessage(getString(R.string.found_existing_tor_process));
sendCallbackStatus(STATUS_ON);
+ showToolbarNotification(getString(R.string.status_activated),NOTIFY_ID,R.drawable.ic_stat_tor);
+
return true;
}
} catch (Exception e) {
@@ -335,6 +337,13 @@ public class TorService extends Service implements TorServiceConstants, OrbotCon
}
public void run() {
+
+ while (!isTorUpgradeAndConfigComplete)
+ {
+ try { Thread.sleep (500);}
+ catch (Exception e){}
+ }
+
String action = mIntent.getAction();
if (action != null) {
@@ -775,6 +784,7 @@ public class TorService extends Service implements TorServiceConstants, OrbotCon
// killAllDaemons();
sendCallbackStatus(STATUS_STARTING);
+ showToolbarNotification(getString(R.string.status_starting_up),NOTIFY_ID,R.drawable.ic_stat_tor);
sendCallbackLogMessage(getString(R.string.status_starting_up));
logNotice(getString(R.string.status_starting_up));
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits