[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [orbot/master] Removed another small & uneeded method from OrbotService related to notifications



commit 39a5ceb611d52f9abc624bfb233359913b4e9714
Author: bim <dsnake@xxxxxxxxxxxxxx>
Date:   Fri Oct 16 15:37:49 2020 -0400

    Removed another small & uneeded method from OrbotService related to notifications
---
 .../src/main/java/org/torproject/android/service/OrbotService.java | 7 ++-----
 .../main/java/org/torproject/android/service/TorEventHandler.java  | 2 +-
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/orbotservice/src/main/java/org/torproject/android/service/OrbotService.java b/orbotservice/src/main/java/org/torproject/android/service/OrbotService.java
index a7f75577..b9175543 100644
--- a/orbotservice/src/main/java/org/torproject/android/service/OrbotService.java
+++ b/orbotservice/src/main/java/org/torproject/android/service/OrbotService.java
@@ -86,7 +86,7 @@ public class OrbotService extends VpnService implements TorServiceConstants, Orb
 
     public final static String BINARY_TOR_VERSION = org.torproject.android.binary.TorServiceConstants.BINARY_TOR_VERSION;
     private final static int CONTROL_SOCKET_TIMEOUT = 60000;
-    private static final int NOTIFY_ID = 1;
+    static final int NOTIFY_ID = 1;
     private static final int ERROR_NOTIFY_ID = 3;
     private static final int HS_NOTIFY_ID = 4;
     private static final Uri HS_CONTENT_URI = Uri.parse("content://org.torproject.android.ui.hiddenservices.providers/hs");
@@ -1162,7 +1162,7 @@ public class OrbotService extends VpnService implements TorServiceConstants, Orb
                         int iconId = R.drawable.ic_stat_tor;
 
                         if (conn != null && mCurrentStatus == STATUS_ON && Prefs.expandedNotifications())
-                            showToolbarNotification(getString(R.string.newnym), getNotifyId(), iconId);
+                            showToolbarNotification(getString(R.string.newnym), NOTIFY_ID, iconId);
 
                         conn.signal(TorControlCommands.SIGNAL_NEWNYM);
 
@@ -1660,9 +1660,6 @@ public class OrbotService extends VpnService implements TorServiceConstants, Orb
 
     }
 
-    public int getNotifyId() {
-        return NOTIFY_ID;
-    }
     private void loadBridgeDefaults() {
         if (alBridges == null) {
             alBridges = new ArrayList<>();
diff --git a/orbotservice/src/main/java/org/torproject/android/service/TorEventHandler.java b/orbotservice/src/main/java/org/torproject/android/service/TorEventHandler.java
index bd8f2bc8..5d204f70 100644
--- a/orbotservice/src/main/java/org/torproject/android/service/TorEventHandler.java
+++ b/orbotservice/src/main/java/org/torproject/android/service/TorEventHandler.java
@@ -99,7 +99,7 @@ public class TorEventHandler implements EventHandler, TorServiceConstants {
                     " / " +
                     formatCount(written) +
                     " \u2191";
-            mService.showToolbarNotification(sb, mService.getNotifyId(), iconId);
+            mService.showToolbarNotification(sb, OrbotService.NOTIFY_ID, iconId);
 
             mTotalTrafficWritten += written;
             mTotalTrafficRead += read;



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits