Skip to content

Commit 8847229

Browse files
committed
Cleanup unused code
1 parent 67a8bab commit 8847229

File tree

2 files changed

+1
-24
lines changed

2 files changed

+1
-24
lines changed

src/com/belluxx/java2smali/Main.java

+1-3
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,7 @@ private void convertAndClean(String providedPath, boolean optimize) {
7070
// Convert to smali
7171
convert(providedFile, optimize);
7272

73-
// Extract and clean
74-
//print("[I] Extracting smali files...");
75-
//ConversionManager.extractSmaliFiles(new File(providedFile.getParentFile().getAbsolutePath() + SEPARATOR + OUT_SMALI_FOLDER));
73+
// Cleanup
7674
print("[I] Cleaning...");
7775
ConversionManager.clean(providedFile.getParentFile(), compiledJava);
7876
print("[I] Done.");

src/com/belluxx/java2smali/util/ConversionManager.java

-21
Original file line numberDiff line numberDiff line change
@@ -107,28 +107,7 @@ public static void baksmaliDex(File dexFile) {
107107
ToolsManager.runBaksmali(dexFile.getAbsolutePath());
108108
}
109109

110-
public static void extractSmaliFiles(File smaliFolder) {
111-
File absSmaliFolder = smaliFolder.getAbsoluteFile();
112-
File absParentFolder = absSmaliFolder.getParentFile().getAbsoluteFile();
113-
114-
try {
115-
File[] smaliFiles = smaliFolder.listFiles();
116-
if (smaliFiles != null) {
117-
for (File smaliFile : smaliFiles) {
118-
Files.move(smaliFile.toPath(), Paths.get(absParentFolder.getAbsolutePath() + SEPARATOR + smaliFile.getName()), StandardCopyOption.REPLACE_EXISTING);
119-
}
120-
} else {
121-
throw new IOException("smaliFiles is null");
122-
}
123-
} catch (IOException e) {
124-
print("[E] Error during extraction.");
125-
e.printStackTrace();
126-
System.exit(1);
127-
}
128-
}
129-
130110
public static void clean(File folderFile, File compiledJava) {
131-
//deleteFile(folderFile.getAbsolutePath() + SEPARATOR + OUT_SMALI_FOLDER);
132111
deleteFile(folderFile.getAbsolutePath() + SEPARATOR + "FilesList.txt");
133112
deleteFile(folderFile.getAbsolutePath() + SEPARATOR + "classes.dex");
134113
deleteFile(compiledJava.getAbsoluteFile());

0 commit comments

Comments
 (0)