Skip to content

Commit

Permalink
Logs to debug issue with temporary unblock
Browse files Browse the repository at this point in the history
See #390
  • Loading branch information
emanuele-f committed Dec 25, 2023
1 parent 6942b25 commit e0112ea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1130,8 +1130,10 @@ private void connUpdateWork() {
continue;
}

if(item.first == null) // termination request
if(item.first == null) { // termination request
Log.i(TAG, "Connection update thread exit requested");
break;
}

ConnectionDescriptor[] new_conns = item.first;
ConnectionUpdate[] conns_updates = item.second;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public Blocklist(Context ctx) {

public synchronized boolean unblockAppForMinutes(int uid, int minutes) {
Long old_val = mUidToGrace.put(uid, SystemClock.uptimeMillis() + (minutes * 60_000L));
Log.d(TAG, "Grace app: " + uid + " for " + minutes + " minutes (old: " + old_val + ")");
Log.i(TAG, "Grace app: " + uid + " for " + minutes + " minutes (old: " + old_val + ")");
return (old_val == null);
}

Expand All @@ -36,7 +36,7 @@ public synchronized boolean checkGracePeriods() {
Map.Entry<Integer, Long> entry = iter.next();

if(now >= entry.getValue()) {
Log.d(TAG, "Grace period ended for app: " + entry.getKey());
Log.i(TAG, "Grace period ended for app: " + entry.getKey());
iter.remove();
changed = true;
}
Expand Down

0 comments on commit e0112ea

Please sign in to comment.