From d2288ef9212c59f7c291385364f6a5c345b07aa5 Mon Sep 17 00:00:00 2001 From: Connor Tumbleson Date: Sun, 28 Mar 2021 17:26:19 -0400 Subject: [PATCH] fix: remove unused smali builder methods --- .../main/java/brut/androlib/mod/SmaliMod.java | 23 ------------------- 1 file changed, 23 deletions(-) diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/mod/SmaliMod.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/mod/SmaliMod.java index 93ac1a0f..8f80112f 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/mod/SmaliMod.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/mod/SmaliMod.java @@ -21,7 +21,6 @@ import org.antlr.runtime.RecognitionException; import org.antlr.runtime.Token; import org.antlr.runtime.tree.CommonTree; import org.antlr.runtime.tree.CommonTreeNodeStream; -import org.apache.commons.io.IOUtils; import org.jf.dexlib2.writer.builder.DexBuilder; import org.jf.smali.smaliFlexLexer; import org.jf.smali.smaliParser; @@ -31,28 +30,6 @@ import java.io.*; import java.nio.charset.StandardCharsets; public class SmaliMod { - - public static boolean assembleSmaliFile(String smali, DexBuilder dexBuilder, int apiLevel, boolean verboseErrors, - boolean printTokens, File smaliFile) throws IOException, RuntimeException, RecognitionException { - - InputStream is = new ByteArrayInputStream(smali.getBytes()); - return assembleSmaliFile(is, dexBuilder, apiLevel, verboseErrors, printTokens, smaliFile); - } - - public static boolean assembleSmaliFile(InputStream is,DexBuilder dexBuilder, int apiLevel, boolean verboseErrors, - boolean printTokens, File smaliFile) throws IOException, RecognitionException { - - // copy our filestream into a tmp file, so we don't overwrite - File tmp = File.createTempFile("BRUT",".bak"); - tmp.deleteOnExit(); - - OutputStream os = new FileOutputStream(tmp); - IOUtils.copy(is, os); - os.close(); - - return assembleSmaliFile(tmp,dexBuilder, apiLevel, verboseErrors, printTokens); - } - public static boolean assembleSmaliFile(File smaliFile,DexBuilder dexBuilder, int apiLevel, boolean verboseErrors, boolean printTokens) throws IOException, RecognitionException {