fix: no need to bundle assets on manager's side anymore

This commit is contained in:
Alberto Ponces
2022-08-20 11:40:53 +01:00
parent 81107970d1
commit 2abe051483
3 changed files with 20 additions and 48 deletions

View File

@@ -41,10 +41,10 @@ class MainActivity : FlutterActivity() {
mainChannel.setMethodCallHandler { call, result ->
when (call.method) {
"loadPatches" -> {
val zipPatchBundlePath = call.argument<String>("zipPatchBundlePath")
val jarPatchBundlePath = call.argument<String>("jarPatchBundlePath")
val cacheDirPath = call.argument<String>("cacheDirPath")
if (zipPatchBundlePath != null && cacheDirPath != null) {
loadPatches(result, zipPatchBundlePath, cacheDirPath)
if (jarPatchBundlePath != null && cacheDirPath != null) {
loadPatches(result, jarPatchBundlePath, cacheDirPath)
} else {
result.notImplemented()
}
@@ -103,16 +103,16 @@ class MainActivity : FlutterActivity() {
fun loadPatches(
result: MethodChannel.Result,
zipPatchBundlePath: String,
jarPatchBundlePath: String,
cacheDirPath: String
) {
Thread(
Runnable {
patches.addAll(
DexPatchBundle(
zipPatchBundlePath,
jarPatchBundlePath,
DexClassLoader(
zipPatchBundlePath,
jarPatchBundlePath,
cacheDirPath,
null,
javaClass.classLoader