Refactor security logging

Bump version number
This commit is contained in:
BinTianqi
2025-10-14 23:35:28 +08:00
parent 9e1d18b8e7
commit 9c796690e3
14 changed files with 603 additions and 347 deletions

View File

@@ -4,12 +4,15 @@ import android.content.Context
import android.database.sqlite.SQLiteDatabase
import android.database.sqlite.SQLiteOpenHelper
class MyDbHelper(context: Context): SQLiteOpenHelper(context, "data", null, 1) {
class MyDbHelper(context: Context): SQLiteOpenHelper(context, "data", null, 2) {
override fun onCreate(db: SQLiteDatabase) {
db.execSQL("CREATE TABLE dhizuku_clients (uid INTEGER PRIMARY KEY," +
"signature TEXT, permissions TEXT)")
}
override fun onUpgrade(db: SQLiteDatabase?, oldVersion: Int, newVersion: Int) {
override fun onUpgrade(db: SQLiteDatabase, oldVersion: Int, newVersion: Int) {
if (oldVersion < 2) {
db.execSQL("CREATE TABLE security_logs (id INTEGER, tag INTEGER, level INTEGER," +
"time INTEGER, data TEXT)")
}
}
}