MCPcopy Create free account
hub / github.com/KuhakuPixel/AceTheGame / Patcher

Method Patcher

Modder/modder/src/main/java/modder/Patcher.java:58–70  ·  view source on GitHub ↗
(String apkFilePathStr, TempManager.TaskOnExit tempFolderTaskOnExit)

Source from the content-addressed store, hash-verified

56 // ===================
57
58 public Patcher(String apkFilePathStr, TempManager.TaskOnExit tempFolderTaskOnExit) throws IOException {
59 File apkFile = new File(apkFilePathStr);
60 Assert.AssertExistAndIsFile(apkFile);
61 // make sure to get the absolute path
62 this.apkFilePathStr = apkFile.getAbsolutePath();
63
64 Path tempDir = TempManager.CreateTempDirectory("ModderDecompiledApk", tempFolderTaskOnExit);
65 // make sure we have the absolute path
66 // https://stackoverflow.com/a/17552395/14073678
67 this.decompiledApkDirStr = tempDir.toAbsolutePath().toString();
68 // =============================== decompile the apk ===========
69 ApkToolWrap.Decompile(apkFilePathStr, decompiledApkDirStr);
70 }
71
72 public Patcher(String apkFilePathStr) throws IOException {
73 this(apkFilePathStr, TempManager.TaskOnExit.clean);

Callers

nothing calls this directly

Calls 4

AssertExistAndIsFileMethod · 0.95
CreateTempDirectoryMethod · 0.95
DecompileMethod · 0.95
toStringMethod · 0.45

Tested by

no test coverage detected