Skip to content

Commit

Permalink
style: fix more redundancy
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorEisberg committed Sep 20, 2024
1 parent 556628a commit 6457442
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -211,24 +211,23 @@ private boolean copySourcesRaw(File outDir, String fileName) throws AndrolibExce
return true;
}

private void buildSourcesSmali(File outDir, String dirName, String fileName)
throws AndrolibException {
private void buildSourcesSmali(File outDir, String dirName, String fileName) throws AndrolibException {
if (mWorker != null) {
mWorker.submit(() -> {
if (mBuildError.get() == null) {
try {
buildSourcesSmali(outDir, dirName, fileName);
buildSourcesSmaliJob(outDir, dirName, fileName);
} catch (AndrolibException ex) {
mBuildError.compareAndSet(null, ex);
}
}
});
} else {
buildSourcesSmali(outDir, dirName, fileName);
buildSourcesSmaliJob(outDir, dirName, fileName);
}
}

private void buildSourcesSmali(File outDir, String dirName, String fileName) throws AndrolibException {
private void buildSourcesSmaliJob(File outDir, String dirName, String fileName) throws AndrolibException {
File smaliDir = new File(mApkDir, dirName);
if (!smaliDir.isDirectory()) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,18 +173,18 @@ private void decodeSourcesSmali(File outDir, String fileName) throws AndrolibExc
mWorker.submit(() -> {
if (mBuildError.get() == null) {
try {
decodeSourcesSmali(outDir, fileName);
decodeSourcesSmaliJob(outDir, fileName);
} catch (AndrolibException ex) {
mBuildError.compareAndSet(null, ex);
}
}
});
} else {
decodeSourcesSmali(outDir, fileName);
decodeSourcesSmaliJob(outDir, fileName);
}
}

private void decodeSourcesSmali(File outDir, String fileName) throws AndrolibException {
private void decodeSourcesSmaliJob(File outDir, String fileName) throws AndrolibException {
File smaliDir;
if (fileName.equals("classes.dex")) {
smaliDir = new File(outDir, "smali");
Expand Down

0 comments on commit 6457442

Please sign in to comment.