mirror of
https://github.com/nix-community/nix-on-droid-app.git
synced 2025-11-08 19:46:10 +01: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:
parent
24a5493ea5
commit
f888f35e35
1 changed files with 1 additions and 7 deletions
|
|
@ -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();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue