mirror of
https://github.com/revanced/revanced-manager.git
synced 2025-04-30 05:54:26 +02:00
fix: close before returning
This commit is contained in:
parent
45fae3f0fd
commit
64a96fc3ce
@ -266,6 +266,7 @@ class MainActivity : FlutterActivity() {
|
|||||||
|
|
||||||
if (cancel) {
|
if (cancel) {
|
||||||
handler.post { stopResult!!.success(null) }
|
handler.post { stopResult!!.success(null) }
|
||||||
|
patcher.close()
|
||||||
return@Thread
|
return@Thread
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -279,8 +280,10 @@ class MainActivity : FlutterActivity() {
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
val res = patcher.get()
|
val res = patcher.get()
|
||||||
patcher.close()
|
patcher.close()
|
||||||
|
|
||||||
ZipFile(patchedFile).use { file ->
|
ZipFile(patchedFile).use { file ->
|
||||||
res.dexFiles.forEach {
|
res.dexFiles.forEach {
|
||||||
if (cancel) {
|
if (cancel) {
|
||||||
@ -303,10 +306,12 @@ class MainActivity : FlutterActivity() {
|
|||||||
ZipAligner::getEntryAlignment
|
ZipAligner::getEntryAlignment
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cancel) {
|
if (cancel) {
|
||||||
handler.post { stopResult!!.success(null) }
|
handler.post { stopResult!!.success(null) }
|
||||||
return@Thread
|
return@Thread
|
||||||
}
|
}
|
||||||
|
|
||||||
handler.post {
|
handler.post {
|
||||||
installerChannel.invokeMethod(
|
installerChannel.invokeMethod(
|
||||||
"update",
|
"update",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user