<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/121980/">https://git.reviewboard.kde.org/r/121980/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On January 11th, 2015, 9:22 p.m. UTC, <b>Albert Vaca Cintora</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">The issue I'm experiencing might be related to what you commented about setProgress being called after sendSuccesfull.</p></pre>
</blockquote>
<p>On January 12th, 2015, 2:52 a.m. UTC, <b>Vineet Garg</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">And I am not able to figure out why sendSuccessful is called in midway during sendPayload, thats why I attached the logcat output where sendSuccessful is in midway between the progress, can you please look at it? cause I didn't changed any other segment of code about sending packages except making functions to accept correct arguements.</p></pre>
</blockquote>
<p>On January 12th, 2015, 4:55 a.m. UTC, <b>Albert Vaca Cintora</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">As I said in a comment in the code I think the problem is not that progressChanged is called after sendSuccesful, but since you are starting a new thread in there with runOnUiThread, the threads can execute in any order.</p></pre>
</blockquote>
</blockquote>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I think you are not getting the point. In sendPayload i called progressChanged as payload is being sent and progress is changed in notification from UI thread.
The payload is sent through another thread, but the thread from which originates later wait for it to finish and then later on sendSuccessful is called. So sendSuccessful should be called in last.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I wrote an error log in progressChanged which displays current sent data and total data, and in sendSuccessful there is another line saying about sendSucceesful.
In all respect, sendSuccesful should be called at last, but it is still called in midway and thats what I am not able to find why?
Also that why I attached logcat output to show you how sendSecussful is called in midway.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">So I think UI thread is not related to sendSuccessful and progressChanged and also in all respect sendSuccessful should be called after payload is fully sent.</p></pre>
<br />
<p>- Vineet</p>
<br />
<p>On January 11th, 2015, 9:42 a.m. UTC, Vineet Garg wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
<div>Review request for kdeconnect and Albert Vaca Cintora.</div>
<div>By Vineet Garg.</div>
<p style="color: grey;"><i>Updated Jan. 11, 2015, 9:42 a.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kdeconnect-android
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Added progress bar in notification while sending file.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Current changes:
<em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;"> Renamed SendPackageFinishedCallback -> SendPackageStatusCallback and added progressChanged to it.
</em> Made necessary changes so that the callback instance can reach to sendPayload for getting progress.
* Made changes in ShareToReceiver to show progress.</p></pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Testing done for both file and content.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Current issues:
<em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;"> sendSuccessful is called much before during file is being sent.
</em> Exception in onNotificationPosted due to early call of sendSuccessful.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Here is logcat output : http://pastebin.com/MvznkrAd</p></pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>src/org/kde/kdeconnect/Device.java <span style="color: grey">(b9a876b)</span></li>
<li>res/values/strings.xml <span style="color: grey">(23d10dc)</span></li>
<li>src/org/kde/kdeconnect/Backends/BaseLink.java <span style="color: grey">(242ff67)</span></li>
<li>src/org/kde/kdeconnect/Backends/LanBackend/LanLink.java <span style="color: grey">(ca81c13)</span></li>
<li>src/org/kde/kdeconnect/Backends/LanBackend/LanLinkProvider.java <span style="color: grey">(19038bb)</span></li>
<li>src/org/kde/kdeconnect/Backends/LoopbackBackend/LoopbackLink.java <span style="color: grey">(0461cf1)</span></li>
<li>src/org/kde/kdeconnect/Plugins/SharePlugin/ShareToReceiver.java <span style="color: grey">(170b7eb)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/121980/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>