style: cleanup formatting from ApkInvoker introduction

This commit is contained in:
Connor Tumbleson 2023-07-03 18:46:47 -04:00
parent a7e2e3e5e1
commit f42ce82f0d
No known key found for this signature in database
GPG Key ID: C3CC0A201EC7DA75
8 changed files with 10 additions and 22 deletions

View File

@ -32,17 +32,14 @@ import java.util.Objects;
import java.util.logging.Logger; import java.util.logging.Logger;
public class AaptInvoker { public class AaptInvoker {
private final Config mConfig; private final Config mConfig;
private final ApkInfo mApkInfo; private final ApkInfo mApkInfo;
private final File mApkDir;
private final static Logger LOGGER = Logger.getLogger(AaptInvoker.class.getName()); private final static Logger LOGGER = Logger.getLogger(AaptInvoker.class.getName());
public AaptInvoker(Config config, ApkInfo apkInfo, File apkDir) { public AaptInvoker(Config config, ApkInfo apkInfo) {
mConfig = config; mConfig = config;
mApkInfo = apkInfo; mApkInfo = apkInfo;
mApkDir = apkDir;
} }
private File getAaptBinaryFile() throws AndrolibException { private File getAaptBinaryFile() throws AndrolibException {
@ -386,5 +383,4 @@ public class AaptInvoker {
} }
invokeAapt1(apkFile, manifest, resDir, rawDir, assetDir, include, cmd, customAapt); invokeAapt1(apkFile, manifest, resDir, rawDir, assetDir, include, cmd, customAapt);
} }
} }

View File

@ -177,7 +177,7 @@ public class ApkBuilder {
} }
} }
} }
} catch(DirectoryException ex) { } catch (DirectoryException ex) {
throw new AndrolibException(ex); throw new AndrolibException(ex);
} }
} }
@ -302,7 +302,7 @@ public class ApkBuilder {
if (!ninePatch.exists()) { if (!ninePatch.exists()) {
ninePatch = null; ninePatch = null;
} }
AaptInvoker invoker = new AaptInvoker(mConfig, mApkInfo, apkDir); AaptInvoker invoker = new AaptInvoker(mConfig, mApkInfo);
invoker.invokeAapt(apkFile, new File(appDir, invoker.invokeAapt(apkFile, new File(appDir,
"AndroidManifest.xml"), new File(appDir, "res"), "AndroidManifest.xml"), new File(appDir, "res"),
ninePatch, null, parseUsesFramework(usesFramework)); ninePatch, null, parseUsesFramework(usesFramework));
@ -370,7 +370,7 @@ public class ApkBuilder {
ninePatch = null; ninePatch = null;
} }
AaptInvoker invoker = new AaptInvoker(mConfig, mApkInfo, apkDir); AaptInvoker invoker = new AaptInvoker(mConfig, mApkInfo);
invoker.invokeAapt(apkFile, new File(appDir, invoker.invokeAapt(apkFile, new File(appDir,
"AndroidManifest.xml"), null, ninePatch, null, "AndroidManifest.xml"), null, ninePatch, null,
parseUsesFramework(usesFramework)); parseUsesFramework(usesFramework));

View File

@ -38,7 +38,6 @@ import java.util.logging.Logger;
import java.util.regex.Pattern; import java.util.regex.Pattern;
public class ApkDecoder { public class ApkDecoder {
private final static Logger LOGGER = Logger.getLogger(ApkDecoder.class.getName()); private final static Logger LOGGER = Logger.getLogger(ApkDecoder.class.getName());
private final Config mConfig; private final Config mConfig;
@ -46,7 +45,6 @@ public class ApkDecoder {
protected final ResUnknownFiles mResUnknownFiles; protected final ResUnknownFiles mResUnknownFiles;
private int mMinSdkVersion = 0; private int mMinSdkVersion = 0;
private final static String SMALI_DIRNAME = "smali"; private final static String SMALI_DIRNAME = "smali";
private final static String UNK_DIRNAME = "unknown"; private final static String UNK_DIRNAME = "unknown";
private final static String[] APK_STANDARD_ALL_FILENAMES = new String[] { private final static String[] APK_STANDARD_ALL_FILENAMES = new String[] {

View File

@ -22,6 +22,10 @@ import java.util.Properties;
import java.util.logging.Logger; import java.util.logging.Logger;
public class ApktoolProperties { public class ApktoolProperties {
private static final Logger LOGGER = Logger.getLogger(ApktoolProperties.class.getName());
private static Properties sProps;
public static String get(String key) { public static String get(String key) {
return get().getProperty(key); return get().getProperty(key);
} }
@ -83,8 +87,4 @@ public class ApktoolProperties {
} }
sProps.put("smaliVersion", version); sProps.put("smaliVersion", version);
} }
private static Properties sProps;
private static final Logger LOGGER = Logger.getLogger(ApktoolProperties.class.getName());
} }

View File

@ -23,7 +23,6 @@ import java.io.File;
import java.util.logging.Logger; import java.util.logging.Logger;
public class Config { public class Config {
private final static Logger LOGGER = Logger.getLogger(Config.class.getName()); private final static Logger LOGGER = Logger.getLogger(Config.class.getName());
public final static short DECODE_SOURCES_NONE = 0x0000; public final static short DECODE_SOURCES_NONE = 0x0000;

View File

@ -41,7 +41,6 @@ import java.util.Map;
import java.util.logging.Logger; import java.util.logging.Logger;
public class ResourcesDecoder { public class ResourcesDecoder {
private final static Logger LOGGER = Logger.getLogger(ResourcesDecoder.class.getName()); private final static Logger LOGGER = Logger.getLogger(ResourcesDecoder.class.getName());
private final Config mConfig; private final Config mConfig;
@ -355,5 +354,4 @@ public class ResourcesDecoder {
throw new AndrolibException("Could not generate public.xml file", ex); throw new AndrolibException("Could not generate public.xml file", ex);
} }
} }
} }

View File

@ -19,8 +19,7 @@ package brut.androlib.res.data.ninepatch;
import brut.util.ExtDataInput; import brut.util.ExtDataInput;
import java.io.IOException; import java.io.IOException;
public class NinePatchData public class NinePatchData {
{
public final int padLeft, padRight, padTop, padBottom; public final int padLeft, padRight, padTop, padBottom;
public final int[] xDivs, yDivs; public final int[] xDivs, yDivs;

View File

@ -25,9 +25,7 @@ import org.xmlpull.v1.XmlSerializer;
import java.io.IOException; import java.io.IOException;
import java.util.Arrays; import java.util.Arrays;
public class ResArrayValue extends ResBagValue implements public class ResArrayValue extends ResBagValue implements ResValuesXmlSerializable {
ResValuesXmlSerializable {
ResArrayValue(ResReferenceValue parent, Duo<Integer, ResScalarValue>[] items) { ResArrayValue(ResReferenceValue parent, Duo<Integer, ResScalarValue>[] items) {
super(parent); super(parent);