fix: save patched and installed apps on prefs, improve installer log, improve dashboard with real data (wip)

This commit is contained in:
Alberto Ponces
2022-08-15 18:42:09 +01:00
parent 384d593024
commit ce09a5264a
19 changed files with 180 additions and 365 deletions

View File

@@ -179,10 +179,41 @@ class MainActivity : FlutterActivity() {
return true
}
fun createPatcher(inputFilePath: String, cacheDirPath: String, resourcePatching: Boolean): Boolean {
fun createPatcher(
inputFilePath: String,
cacheDirPath: String,
resourcePatching: Boolean
): Boolean {
val inputFile = File(inputFilePath)
val aaptPath = Aapt.binary(applicationContext).absolutePath
patcher = Patcher(PatcherOptions(inputFile, cacheDirPath, resourcePatching, aaptPath, cacheDirPath))
patcher =
Patcher(
PatcherOptions(
inputFile,
cacheDirPath,
resourcePatching,
aaptPath,
cacheDirPath,
logger =
object : app.revanced.patcher.logging.Logger {
override fun error(msg: String) {
methodChannel.invokeMethod("updateInstallerLog", msg)
}
override fun warn(msg: String) {
methodChannel.invokeMethod("updateInstallerLog", msg)
}
override fun info(msg: String) {
methodChannel.invokeMethod("updateInstallerLog", msg)
}
override fun trace(msg: String) {
methodChannel.invokeMethod("updateInstallerLog", msg)
}
}
)
)
return true
}