Update ShellActivity.java
This commit is contained in:
parent
4abd2a0c25
commit
1c469f1001
|
@ -29,12 +29,7 @@ public class ShellActivity extends AppCompatActivity {
|
||||||
editText = findViewById(R.id.shell_input);
|
editText = findViewById(R.id.shell_input);
|
||||||
logWindow.appendLog("Welcome to use Fold Craft Launcher!\n");
|
logWindow.appendLog("Welcome to use Fold Craft Launcher!\n");
|
||||||
logWindow.appendLog("Here is the shell command line!\n");
|
logWindow.appendLog("Here is the shell command line!\n");
|
||||||
shellUtil = new ShellUtil(new File(FCLPath.FILES_DIR).getParent(), new ShellUtil.Callback() {
|
shellUtil = new ShellUtil(new File(FCLPath.FILES_DIR).getParent(), output -> logWindow.appendLog("\t" + output + "\n"));
|
||||||
@Override
|
|
||||||
public void output(String output) {
|
|
||||||
logWindow.appendLog("\t" + output + "\n");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
shellUtil.start();
|
shellUtil.start();
|
||||||
editText.addTextChangedListener(new TextWatcher() {
|
editText.addTextChangedListener(new TextWatcher() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -77,4 +72,10 @@ public class ShellActivity extends AppCompatActivity {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onDestroy() {
|
||||||
|
super.onDestroy();
|
||||||
|
shellUtil.interrupt();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue