mirror of
https://github.com/M66B/NetGuard.git
synced 2024-12-22 07:43:15 +00:00
Refactoring
This commit is contained in:
parent
8f37af42d7
commit
f55425e3a7
1 changed files with 3 additions and 1 deletions
|
@ -62,6 +62,8 @@ public class DatabaseHelper extends SQLiteOpenHelper {
|
||||||
private final static int MSG_ACCESS = 2;
|
private final static int MSG_ACCESS = 2;
|
||||||
private final static int MSG_FORWARD = 3;
|
private final static int MSG_FORWARD = 3;
|
||||||
|
|
||||||
|
private final static long SYN_SNI_DELAY = 5000L;
|
||||||
|
|
||||||
private SharedPreferences prefs;
|
private SharedPreferences prefs;
|
||||||
private ReentrantReadWriteLock lock = new ReentrantReadWriteLock(true);
|
private ReentrantReadWriteLock lock = new ReentrantReadWriteLock(true);
|
||||||
|
|
||||||
|
@ -382,7 +384,7 @@ public class DatabaseHelper extends SQLiteOpenHelper {
|
||||||
" AND dport = ?" +
|
" AND dport = ?" +
|
||||||
" AND uid = ?",
|
" AND uid = ?",
|
||||||
new String[]{
|
new String[]{
|
||||||
Long.toString(packet.time - 2000L),
|
Long.toString(packet.time - SYN_SNI_DELAY),
|
||||||
Integer.toString(packet.protocol),
|
Integer.toString(packet.protocol),
|
||||||
Integer.toString(packet.version),
|
Integer.toString(packet.version),
|
||||||
"S", // SYN
|
"S", // SYN
|
||||||
|
|
Loading…
Reference in a new issue