Bug 349956 - Could use a way of aborting a transfer
Summary: Could use a way of aborting a transfer
Status: RESOLVED FIXED
Alias: None
Product: kdeconnect
Classification: Applications
Component: common (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR wishlist
Target Milestone: ---
Assignee: Erik Duisters
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-06 10:38 UTC by Alan Prescott
Modified: 2019-03-08 18:08 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Prescott 2015-07-06 10:38:20 UTC
Version     : 0.8b
Release     : 1.1
It would be really useful if there was some way of aborting a file transfer both from within KDE and the Android device without having to do a Force Stop on the Android device.

I recently had a transfer which 'hung' and I had to Force Stop the ap on the Android device and restart it and the transfer.

One other reason for aborting a transfer in progress would be where a very large file or a sensitive data file is accidentally selected.



Reproducible: Always
Comment 1 Erik Duisters 2018-11-20 10:06:34 UTC
For future reference:

When the inputstream is closed on Android the SslSocket is not closed (https://issuetracker.google.com/issues/37018094). Because of this the desktop side will not be able to detect a disconnect and the UploadJob will stall until the connection to android is severed by for some other reason
Comment 2 Alan Prescott 2018-11-20 11:14:47 UTC
I'm not looking for an automatic close of the stream just a Cancel button to manually interrupt and stop the ongoing transfer without having to actually kill the process.
Comment 3 Erik Duisters 2018-11-20 12:28:03 UTC
(In reply to Alan Prescott from comment #2)
> I'm not looking for an automatic close of the stream just a Cancel button to
> manually interrupt and stop the ongoing transfer without having to actually
> kill the process.

I'm working towards implementing this and I just added the comment so I will remember this issue when the time comes
Comment 4 Erik Duisters 2019-03-08 18:08:34 UTC
Git commit f2e505b8af2e5d45ba81154b48b76cf90b8750de by Erik Duisters.
Committed on 08/03/2019 at 18:08.
Pushed by eduisters into branch 'master'.

Allow shares from desktop to be canceled

Summary:
Allow in progress file transfers to be canceled

{F6373048}

{F6373050}

{F6373051}

Test Plan:
Send a large file from desktop to android
Press cancel in the progress notification

Result: the file transfer is cancelled and the cancelled file is deleted from storage

Reviewers: #kde_connect, nicolasfella, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka, nicolasfella, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D16491

M  +6    -0    AndroidManifest.xml
R  +41   -39   src/org/kde/kdeconnect/Plugins/SharePlugin/CompositeReceiveFileJob.java [from: src/org/kde/kdeconnect/Plugins/SharePlugin/CompositeReceiveFileRunnable.java - 079% similarity]
M  +0    -1    src/org/kde/kdeconnect/Plugins/SharePlugin/ShareActivity.java
A  +57   -0    src/org/kde/kdeconnect/Plugins/SharePlugin/ShareBroadcastReceiver.java
M  +18   -1    src/org/kde/kdeconnect/Plugins/SharePlugin/ShareNotification.java
M  +44   -28   src/org/kde/kdeconnect/Plugins/SharePlugin/SharePlugin.java
A  +76   -0    src/org/kde/kdeconnect/async/BackgroundJob.java
A  +170  -0    src/org/kde/kdeconnect/async/BackgroundJobHandler.java

https://invent.kde.org/kde/kdeconnect-android/commit/f2e505b8af2e5d45ba81154b48b76cf90b8750de