You should use Thread.start()
to start any new thread.
As far as I know calling run()
directly will not cause the system to actually launch a new thread, hence your blocking UI.
Change your startThread()
method to the following and it should then work:
public class SyncManager extends Thread {
public void startThread() {
if((State == PAUSED || State == STOPPED) && !this.isAlive()) {
State = RUNNING;
start(); // use start() instead of run()
}
}
}
Read here for more specific information from the Java revisited blog.