Move su logs out of magiskdb

This commit is contained in:
topjohnwu
2019-11-14 00:01:06 -05:00
parent a7f0510a3e
commit 576efbdc1b
11 changed files with 81 additions and 105 deletions
@@ -18,7 +18,6 @@ import com.topjohnwu.magisk.model.entity.toPolicy
import com.topjohnwu.magisk.ui.surequest.SuRequestActivity
import com.topjohnwu.superuser.Shell
import timber.log.Timber
import java.util.*
object SuHandler : ProviderCallHandler {
@@ -101,12 +100,11 @@ object SuHandler : ProviderCallHandler {
val log = policy.toLog(
toUid = toUid,
fromPid = pid,
command = command,
date = Date()
command = command
)
val logRepo = get<LogRepository>()
logRepo.put(log).subscribeK(onError = { Timber.e(it) })
logRepo.insert(log).subscribeK(onError = { Timber.e(it) })
}
private fun handleNotify(context: Context, data: Bundle) {