mirror of https://github.com/M66B/NetGuard.git
Group addresses for access notifications
This commit is contained in:
parent
a2c1f1c5eb
commit
11dadcf93f
|
@ -454,9 +454,13 @@ public class DatabaseHelper extends SQLiteOpenHelper {
|
||||||
|
|
||||||
public Cursor getAccessUnset(int uid) {
|
public Cursor getAccessUnset(int uid) {
|
||||||
SQLiteDatabase db = this.getReadableDatabase();
|
SQLiteDatabase db = this.getReadableDatabase();
|
||||||
return db.query("access", null,
|
String query = "SELECT MAX(time) AS time, daddr, allowed";
|
||||||
"uid = ? AND block < 0", new String[]{Integer.toString(uid)},
|
query += " FROM access";
|
||||||
null, null, "time DESC");
|
query += " WHERE uid = ?";
|
||||||
|
query += " AND block < 0";
|
||||||
|
query += " GROUP BY daddr, allowed";
|
||||||
|
query += " ORDER BY time DESC";
|
||||||
|
return db.rawQuery(query, new String[]{Integer.toString(uid)});
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getRuleCount(int uid) {
|
public long getRuleCount(int uid) {
|
||||||
|
|
Loading…
Reference in New Issue