Handle receiving an empty file
ClosedPublic

Authored by eduisters on Nov 29 2018, 1:42 PM.

Details

Summary

When an empty file is send from the desktop SharePlugin onPacketReceived
does not see a payload so the packet is discarded

Test Plan

Send an empty file from the desktop
Verify that a notification is shown notifying the user that a file was received and that file has been created in the filesystem

Diff Detail

Repository
R225 KDE Connect - Android application
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
eduisters created this revision.Nov 29 2018, 1:42 PM
Restricted Application added a project: KDE Connect. · View Herald TranscriptNov 29 2018, 1:42 PM
Restricted Application added a subscriber: kdeconnect. · View Herald Transcript
eduisters requested review of this revision.Nov 29 2018, 1:42 PM
albertvaka accepted this revision.Nov 29 2018, 1:45 PM
This revision is now accepted and ready to land.Nov 29 2018, 1:45 PM
nicolasfella added inline comments.
src/org/kde/kdeconnect/Plugins/SharePlugin/SharePlugin.java
130

I think checking for payload is unnecessary now

albertvaka added inline comments.Nov 29 2018, 1:52 PM
src/org/kde/kdeconnect/Plugins/SharePlugin/SharePlugin.java
246

On the desktop side this checks hasPayload() instead. I don't think it changes anything but better to be consistent.

eduisters planned changes to this revision.Nov 29 2018, 4:43 PM

Waiting for D17236 so requested change by albertvaka can be implemented

eduisters updated this revision to Diff 46579.Nov 30 2018, 5:02 PM
  • Rebased onto masters
  • add assert back
This revision is now accepted and ready to land.Nov 30 2018, 5:02 PM
eduisters planned changes to this revision.Nov 30 2018, 5:03 PM

Forgot to remove a string

eduisters requested review of this revision.Nov 30 2018, 5:06 PM
This revision is now accepted and ready to land.Nov 30 2018, 5:06 PM
albertvaka accepted this revision.Dec 2 2018, 5:00 PM
albertvaka added inline comments.
src/org/kde/kdeconnect/Plugins/SharePlugin/SharePlugin.java
131

Remove log?

eduisters marked an inline comment as done.Dec 2 2018, 6:34 PM
eduisters updated this revision to Diff 46737.Dec 2 2018, 6:34 PM
  • Removed log statement
This revision was automatically updated to reflect the committed changes.