mirror of https://github.com/termux/termux-app
Fix issue where TermuxService was stopped and Termux notification canceled, if background tasks were still running but all sessions had been closed.
This commit is contained in:
parent
24a5493ea5
commit
f888f35e35
|
@ -555,13 +555,7 @@ public final class TermuxService extends Service implements TermuxTask.TermuxTas
|
|||
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();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue