Always notify for unknown (new) uids

This commit is contained in:
M66B 2017-07-25 18:29:09 +02:00
parent ef0d1e3f37
commit 55e35cacbb
1 changed files with 3 additions and 5 deletions

View File

@ -713,7 +713,7 @@ public class ServiceSinkhole extends VpnService implements SharedPreferences.OnS
packet.dport = 0;
if (dh.updateAccess(packet, dname, -1)) {
lock.readLock().lock();
if (mapNotify.containsKey(packet.uid) && mapNotify.get(packet.uid))
if (!mapNotify.containsKey(packet.uid) || mapNotify.get(packet.uid))
showAccessNotification(packet.uid);
lock.readLock().unlock();
}
@ -1587,10 +1587,8 @@ public class ServiceSinkhole extends VpnService implements SharedPreferences.OnS
lock.writeLock().lock();
mapNotify.clear();
if (notify)
for (Rule rule : listRule)
if (rule.notify && (system || !rule.system))
mapNotify.put(rule.info.applicationInfo.uid, true);
for (Rule rule : listRule)
mapNotify.put(rule.info.applicationInfo.uid, notify && rule.notify && (system || !rule.system));
lock.writeLock().unlock();
}