Skip to content

Commit

Permalink
Remove logVersion from constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
REAndroid committed May 12, 2024
1 parent 1157ca4 commit dbc609d
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/main/java/com/reandroid/apkeditor/BaseCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ public BaseCommand(T options, String logTag){
this.options = options;
this.mLogTag = logTag;
this.mEnableLog = true;
logVersion();
}
public void run() throws IOException{

Expand Down Expand Up @@ -91,8 +90,8 @@ public void logWarn(String msg) {
Logger.e(mLogTag + msg);
}

private void logVersion() {
Logger.i("Using: " + APKEditor.getName() + " version " + APKEditor.getVersion() + ", " + ARSCLib.getName() + " version " + ARSCLib.getVersion());
public void logVersion() {
logMessage("Using: " + APKEditor.getName() + " version " + APKEditor.getVersion() + ", " + ARSCLib.getName() + " version " + ARSCLib.getVersion());
}

protected static void clearMeta(ApkModule module){
Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/reandroid/apkeditor/cloner/Cloner.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public static void execute(String[] args) throws ARGException, IOException {
ClonerOptions option = new ClonerOptions();
option.parse(args);
Cloner cloner = new Cloner(option);
cloner.logVersion();
cloner.run();
}

Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/reandroid/apkeditor/compile/Builder.java
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ public static void execute(String[] args) throws ARGException, IOException {
File outDir = option.outputFile;
Util.deleteEmptyDirectories(outDir);
Builder builder = new Builder(option);
builder.logVersion();
builder.logMessage("Building ...\n" + option.toString());
if(outDir.exists()){
if(!option.force){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ public static void execute(String[] args) throws ARGException, IOException {
}
Util.deleteEmptyDirectories(outDir);
Decompiler decompiler = new Decompiler(option);
decompiler.logVersion();
decompiler.logMessage("Decompiling ...\n" + option);
if(outDir.exists()){
if(!option.force){
Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/reandroid/apkeditor/info/Info.java
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,7 @@ public static void execute(String[] args) throws ARGException, IOException {
InfoOptions option = new InfoOptions();
option.parse(args);
Info info = new Info(option);
info.logVersion();
info.run();
}

Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/reandroid/apkeditor/merge/Merger.java
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ public static void execute(String[] args) throws ARGException, IOException {
}
Util.deleteEmptyDirectories(outFile);
Merger merger = new Merger(option);
merger.logVersion();
if(outFile.exists()){
if(!option.force){
throw new ARGException("Path already exists: " + outFile);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ public static void execute(String[] args) throws ARGException, IOException {
File outFile = option.outputFile;
Util.deleteEmptyDirectories(outFile);
Protector protector = new Protector(option);
protector.logVersion();
if(outFile.exists()){
if(!option.force){
throw new ARGException("Path already exists: "+outFile);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ public static void execute(String[] args) throws ARGException, IOException {
File outFile=option.outputFile;
Util.deleteEmptyDirectories(outFile);
Refactor refactor = new Refactor(option);
refactor.logVersion();
if(outFile.exists()){
if(!option.force){
throw new ARGException("Path already exists: "+outFile);
Expand Down

0 comments on commit dbc609d

Please sign in to comment.