mirror of
https://github.com/awfixers-stuff/OwnDroid.git
synced 2026-03-23 11:05:59 +00:00
Refactor network logging
This commit is contained in:
@@ -4,7 +4,7 @@ import android.content.Context
|
||||
import android.database.sqlite.SQLiteDatabase
|
||||
import android.database.sqlite.SQLiteOpenHelper
|
||||
|
||||
class MyDbHelper(context: Context): SQLiteOpenHelper(context, "data", null, 2) {
|
||||
class MyDbHelper(context: Context): SQLiteOpenHelper(context, "data", null, 3) {
|
||||
override fun onCreate(db: SQLiteDatabase) {
|
||||
db.execSQL("CREATE TABLE dhizuku_clients (uid INTEGER PRIMARY KEY," +
|
||||
"signature TEXT, permissions TEXT)")
|
||||
@@ -14,5 +14,12 @@ class MyDbHelper(context: Context): SQLiteOpenHelper(context, "data", null, 2) {
|
||||
db.execSQL("CREATE TABLE security_logs (id INTEGER, tag INTEGER, level INTEGER," +
|
||||
"time INTEGER, data TEXT)")
|
||||
}
|
||||
if (oldVersion < 3) {
|
||||
db.execSQL(
|
||||
"CREATE TABLE network_logs (id INTEGER, package INTEGER, time INTEGER," +
|
||||
"type TEXT, host TEXT, count INTEGER, addresses TEXT, address TEXT," +
|
||||
"port INTEGER)"
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user