mirror of
https://github.com/nix-community/nix-on-droid-app.git
synced 2025-12-06 17:11:09 +01:00
terminal emulator: flush remaining process output data when terminating session
This commit is contained in:
parent
619552ec5c
commit
5a70be1523
1 changed files with 7 additions and 7 deletions
|
|
@ -110,13 +110,13 @@ public final class TerminalSession extends TerminalOutput {
|
|||
|
||||
@Override
|
||||
public void handleMessage(Message msg) {
|
||||
if (msg.what == MSG_NEW_INPUT && isRunning()) {
|
||||
int bytesRead = mProcessToTerminalIOQueue.read(mReceiveBuffer, false);
|
||||
if (bytesRead > 0) {
|
||||
mEmulator.append(mReceiveBuffer, bytesRead);
|
||||
notifyScreenUpdate();
|
||||
}
|
||||
} else if (msg.what == MSG_PROCESS_EXITED) {
|
||||
int bytesRead = mProcessToTerminalIOQueue.read(mReceiveBuffer, false);
|
||||
if (bytesRead > 0) {
|
||||
mEmulator.append(mReceiveBuffer, bytesRead);
|
||||
notifyScreenUpdate();
|
||||
}
|
||||
|
||||
if (msg.what == MSG_PROCESS_EXITED) {
|
||||
int exitCode = (Integer) msg.obj;
|
||||
cleanupResources(exitCode);
|
||||
mChangeCallback.onSessionFinished(TerminalSession.this);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue