mirror of
https://github.com/revanced/Apktool.git
synced 2024-12-11 13:27:47 +01:00
fix: remove unused smali builder methods
This commit is contained in:
parent
bddf575318
commit
d2288ef921
@ -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 {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user