Skip to content

Commit

Permalink
Merge branch 'FCL-Team:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangjing-GitHub-Code authored Apr 8, 2023
2 parents eea6cf6 + 1c469f1 commit 6b85417
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions FCL/src/main/java/com/tungsten/fcl/activity/ShellActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,7 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
editText = findViewById(R.id.shell_input);
logWindow.appendLog("Welcome to use Fold Craft Launcher!\n");
logWindow.appendLog("Here is the shell command line!\n");
shellUtil = new ShellUtil(new File(FCLPath.FILES_DIR).getParent(), new ShellUtil.Callback() {
@Override
public void output(String output) {
logWindow.appendLog("\t" + output + "\n");
}
});
shellUtil = new ShellUtil(new File(FCLPath.FILES_DIR).getParent(), output -> logWindow.appendLog("\t" + output + "\n"));
shellUtil.start();
editText.addTextChangedListener(new TextWatcher() {
@Override
Expand Down Expand Up @@ -77,4 +72,10 @@ public void afterTextChanged(Editable editable) {
}
});
}

@Override
protected void onDestroy() {
super.onDestroy();
shellUtil.interrupt();
}
}

0 comments on commit 6b85417

Please sign in to comment.