[Android] Do not block main thread
Geoffrey Métais
git at videolan.org
Wed Feb 18 19:10:16 CET 2015
vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Feb 18 19:10:04 2015 +0100| [8031491c90395b026d60aaa06ee7cba8edbb6bdb] | committer: Geoffrey Métais
Do not block main thread
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=8031491c90395b026d60aaa06ee7cba8edbb6bdb
---
vlc-android/src/org/videolan/vlc/widget/VerticalSeekBar.java | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/widget/VerticalSeekBar.java b/vlc-android/src/org/videolan/vlc/widget/VerticalSeekBar.java
index 6dc2806..4de0483 100644
--- a/vlc-android/src/org/videolan/vlc/widget/VerticalSeekBar.java
+++ b/vlc-android/src/org/videolan/vlc/widget/VerticalSeekBar.java
@@ -63,7 +63,7 @@ public class VerticalSeekBar extends SeekBar {
}
@Override
- public synchronized void setProgress(int progress) {
+ public void setProgress(int progress) {
super.setProgress(progress);
onSizeChanged(getWidth(), getHeight(), 0, 0);
}
@@ -99,11 +99,8 @@ public class VerticalSeekBar extends SeekBar {
break;
case MotionEvent.ACTION_MOVE:
if (mIsMovingThumb) {
- synchronized (this) {
- final int max = getMax();
- final int progress = max - (int) (max* event.getY() / getHeight());
- setProgress(progress);
- }
+ final int max = getMax();
+ setProgress(max - (int) (max* event.getY() / getHeight()));
handled = true;
}
break;
More information about the Android
mailing list