<table><tr><td style="">mtijink created this revision.<br />mtijink added a reviewer: KDE Connect.<br />Herald added a project: KDE Connect.<br />Herald added a subscriber: kdeconnect.<br />mtijink requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D17841">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>On both devices I tested, the bluetooth InputStream did not notice end-of-stream and thus the transfer hanged.</p>

<p>Using this workaround, if we know the size of the payload, we notice this condition and prevent reading too much.</p>

<p>If this happens on all devices, we could possibly cancel the transfer immediately instead of only logging.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Transferring files or media art now works correctly.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R225 KDE Connect - Android application</div></div></div><br /><div><strong>BRANCH</strong><div><div>bluetooth-android-download-workaround</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D17841">https://phabricator.kde.org/D17841</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/org/kde/kdeconnect/Backends/BluetoothBackend/BluetoothLink.java<br />
src/org/kde/kdeconnect/Helpers/LimitedInputStream.java</div></div></div><br /><div><strong>To: </strong>mtijink, KDE Connect<br /><strong>Cc: </strong>kdeconnect, mschroeder, varunp, shivanshukantprasad, skymoore, brute4s99, wistak, anoopv, dvalencia, rmenezes, julioc, Leptopoda, timothyc, Danial0_0, johnq, Pitel, adeen-s, SemperPeritus, daniel.z.tg, jeanv, seebauer, bugzy, MayeulC, menasshock, mikesomov, tctara, apol<br /></div>