mirror of
https://github.com/nix-community/nix-on-droid-app.git
synced 2025-12-01 22:51:08 +01:00
Fixed: Use android.util.Log for terminal-emulator logging if TerminalSessionClient is null like when running tests
This commit is contained in:
parent
4faf2b9d28
commit
79980a07a8
3 changed files with 94 additions and 14 deletions
|
|
@ -236,7 +236,7 @@ public final class TerminalSession extends TerminalOutput {
|
|||
try {
|
||||
Os.kill(mShellPid, OsConstants.SIGKILL);
|
||||
} catch (ErrnoException e) {
|
||||
mClient.logWarn(LOG_TAG, "Failed sending SIGKILL: " + e.getMessage());
|
||||
Logger.logWarn(mClient, LOG_TAG, "Failed sending SIGKILL: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -308,7 +308,7 @@ public final class TerminalSession extends TerminalOutput {
|
|||
return outputPath;
|
||||
}
|
||||
} catch (IOException | SecurityException e) {
|
||||
mClient.logStackTraceWithMessage(LOG_TAG, "Error getting current directory", e);
|
||||
Logger.logStackTraceWithMessage(mClient, LOG_TAG, "Error getting current directory", e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
@ -326,7 +326,7 @@ public final class TerminalSession extends TerminalOutput {
|
|||
descriptorField.setAccessible(true);
|
||||
descriptorField.set(result, fileDescriptor);
|
||||
} catch (NoSuchFieldException | IllegalAccessException | IllegalArgumentException e) {
|
||||
client.logStackTraceWithMessage(LOG_TAG, "Error accessing FileDescriptor#descriptor private field", e);
|
||||
Logger.logStackTraceWithMessage(client, LOG_TAG, "Error accessing FileDescriptor#descriptor private field", e);
|
||||
System.exit(1);
|
||||
}
|
||||
return result;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue