mirror of
https://github.com/fankes/termux-app.git
synced 2025-09-05 02:05:25 +08:00
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:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user