mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-22 14:26:00 +00:00
fix: disconnect desktop download on session cancel
This commit is contained in:
1 parent
4e4a731221
commit
c02832ac59
6 files changed
+84
-7
No files matched your search
@@ -1733,6 +1733,7 @@ class SessionService : Service() {
|
||||
fun stop(context: Context) {
|
||||
if (!SessionState.running) {
|
||||
SessionState.stopRequested = true
|
||||
SessionState.installCancellation?.cancel()
|
||||
return
|
||||
}
|
||||
context.startService(Intent(context, SessionService::class.java).setAction(ACTION_STOP))
|
||||
|
||||
@@ -36,6 +36,9 @@ object SessionState {
|
||||
@Volatile
|
||||
var installing: String? = null
|
||||
|
||||
@Volatile
|
||||
var installCancellation: com.droiddeck.launcher.core.Downloader.Cancellation? = null
|
||||
|
||||
@Volatile
|
||||
var stopRequested = false
|
||||
|
||||
|
||||
Reference in new issue
Block a user