<div dir="ltr">You're in the UI thread, you shouldn't have to do that. Other access to setProgress() should also be done in the UI thread.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 18, 2015 at 11:13 AM, Geoffrey Métais <span dir="ltr"><<a href="mailto:git@videolan.org" target="_blank">git@videolan.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">vlc-ports/android | branch: master | Geoffrey Métais <<a href="mailto:geoffrey.metais@gmail.com">geoffrey.metais@gmail.com</a>> | Wed Feb 18 10:58:20 2015 +0100| [0d6164aa63212f15d68c07173dba0e8daf77379d] | committer: Geoffrey Métais<br>
<br>
Atomic update for progress value<br>
<br>
CID #1226287<br>
<br>
> <a href="http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=0d6164aa63212f15d68c07173dba0e8daf77379d" target="_blank">http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=0d6164aa63212f15d68c07173dba0e8daf77379d</a><br>
---<br>
<br>
 vlc-android/src/org/videolan/vlc/widget/VerticalSeekBar.java |    8 +++++---<br>
 1 file changed, 5 insertions(+), 3 deletions(-)<br>
<br>
diff --git a/vlc-android/src/org/videolan/vlc/widget/VerticalSeekBar.java b/vlc-android/src/org/videolan/vlc/widget/VerticalSeekBar.java<br>
index 360cd64..6dc2806 100644<br>
--- a/vlc-android/src/org/videolan/vlc/widget/VerticalSeekBar.java<br>
+++ b/vlc-android/src/org/videolan/vlc/widget/VerticalSeekBar.java<br>
@@ -99,9 +99,11 @@ public class VerticalSeekBar extends SeekBar {<br>
                 break;<br>
             case MotionEvent.ACTION_MOVE:<br>
                 if (mIsMovingThumb) {<br>
-                    final int max = getMax();<br>
-                    final int progress = max - (int) (max* event.getY() / getHeight());<br>
-                    setProgress(progress);<br>
+                    synchronized (this) {<br>
+                        final int max = getMax();<br>
+                        final int progress = max - (int) (max* event.getY() / getHeight());<br>
+                        setProgress(progress);<br>
+                    }<br>
                     handled = true;<br>
                 }<br>
                 break;<br>
<br>
_______________________________________________<br>
Android mailing list<br>
<a href="mailto:Android@videolan.org">Android@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/android" target="_blank">https://mailman.videolan.org/listinfo/android</a><br>
</blockquote></div><br></div>