Skip to content

Commit

Permalink
Fix issue where TermuxService was stopped and Termux notification can…
Browse files Browse the repository at this point in the history
…celed, if background tasks were still running but all sessions had been closed.
  • Loading branch information
agnostic-apollo committed Apr 12, 2021
1 parent 24a5493 commit f888f35
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions app/src/main/java/com/termux/app/TermuxService.java
Original file line number Diff line number Diff line change
Expand Up @@ -555,13 +555,7 @@ public void onTermuxSessionExited(final TermuxSession termuxSession) {
mTermuxSessionClient.termuxSessionListNotifyUpdated();
}

if (mTermuxSessions.isEmpty() && mWakeLock == null) {
// Finish if there are no TermuxSessions left and the wake lock is not held, otherwise keep the service alive if
// holding wake lock since there may be daemon processes (e.g. sshd) running.
requestStopService();
} else {
updateNotification();
}
updateNotification();
}


Expand Down

0 comments on commit f888f35

Please sign in to comment.