public synchronized void setProgress(final int progress) {
        this.progress = progress;
        if (isShowing()) {
            dialog.setProgress(progress);
        }
    }
progress dialog wrapper for easier management of resources
main/src/main/java/cgeo/geocaching/activity/Progress.java