Will this make the current UI thread to sleep?
try { Thread.sleep(20); onProgressUpdate(i); } catch (InterruptedException e) { e.printStackTrace
Only if called from the UI thread.