mirror of
https://github.com/fankes/termux-app.git
synced 2025-09-08 03:24:04 +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();
|
mTermuxSessionClient.termuxSessionListNotifyUpdated();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mTermuxSessions.isEmpty() && mWakeLock == null) {
|
updateNotification();
|
||||||
// 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();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user