Skip to content

Commit 6ad683b

Browse files
committed
[FIX] ShellResultListener reference
1 parent 32d0c26 commit 6ad683b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

library/src/main/java/ashell/workers/ShellReader.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ public void run() {
3333
String line = "";
3434
try {
3535
while ((line = reader.readLine()) != null) {
36-
if (onShellResultListener != null && line != null && line.length() != 0) {
36+
if (getOnShellResultListener() != null && line.length() != 0) {
3737
//Log.e(this.getName(), "READER: " + line); // TODO: 03/04/17 Remove this?
38-
if (!onShellResultListener.onShellResult(line)) {
38+
if (!getOnShellResultListener().onShellResult(line)) {
3939
//Log.e(this.getName(), "READER: " + line); // TODO: 03/04/17 Remove this?
4040
if (line.equals(CMD_DONE)) {
4141
setBusy(false);
@@ -57,8 +57,8 @@ public void run() {
5757
e.printStackTrace();
5858
}
5959
}
60-
if (notErrorListener && onShellResultListener != null) {
61-
onShellResultListener.onShellResult("SHELL_EXIT");
60+
if (notErrorListener && getOnShellResultListener() != null) {
61+
getOnShellResultListener().onShellResult("SHELL_EXIT");
6262
onShellStateListener.onShellStateChanged(OnShellStateListener.State.TERMINATED);
6363
}
6464
}

0 commit comments

Comments
 (0)