refactor: Move code out of use block

This commit is contained in:
oSumAtrIX 2024-02-24 01:10:23 +01:00
parent 9c0ad4604a
commit de63cfa426
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4

View File

@ -273,8 +273,7 @@ internal object PatchCommand : Runnable {
}
// endregion
Patcher(
val (packageName, patcherResult) = Patcher(
PatcherConfig(
apk,
temporaryFilesPath,
@ -296,8 +295,7 @@ internal object PatchCommand : Runnable {
// region Patch
val patcherResult =
patcher.apply {
patcher.context.packageMetadata.packageName to patcher.apply {
acceptIntegrations(integrations)
acceptPatches(filteredPatches)
@ -313,8 +311,8 @@ internal object PatchCommand : Runnable {
}
}
}.get()
// endregion
}
// region Save
@ -342,10 +340,9 @@ internal object PatchCommand : Runnable {
deviceSerial?.let { serial ->
AdbManager.getAdbManager(deviceSerial = serial.ifEmpty { null }, mount)
}?.install(AdbManager.Apk(outputFilePath, patcher.context.packageMetadata.packageName))
}?.install(AdbManager.Apk(outputFilePath, packageName))
// endregion
}
if (purge) {
logger.info("Purging temporary files")