aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2013-02-19 21:16:21 -0800
committerScott Jackson <daneren2005@gmail.com>2013-02-19 21:16:21 -0800
commite5e48a73998db6b4546e41e80f558cb4792176ab (patch)
tree9aa8009a7e4d17ee1d86169f0590fb885adbfcf9
parentff7e20cf6481cf4d0c302650e7434a1a918ea0e8 (diff)
downloaddsub-e5e48a73998db6b4546e41e80f558cb4792176ab.tar.gz
dsub-e5e48a73998db6b4546e41e80f558cb4792176ab.tar.bz2
dsub-e5e48a73998db6b4546e41e80f558cb4792176ab.zip
Fix "java.lang.IllegalArgumentException: View not attached to window manager"
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/util/ModalBackgroundTask.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/util/ModalBackgroundTask.java b/subsonic-android/src/github/daneren2005/dsub/util/ModalBackgroundTask.java
index 973f4ead..1954c474 100644
--- a/subsonic-android/src/github/daneren2005/dsub/util/ModalBackgroundTask.java
+++ b/subsonic-android/src/github/daneren2005/dsub/util/ModalBackgroundTask.java
@@ -129,11 +129,13 @@ public abstract class ModalBackgroundTask<T> extends BackgroundTask<T> {
@Override
public void updateProgress(final String message) {
- getHandler().post(new Runnable() {
- @Override
- public void run() {
- progressDialog.setMessage(message);
- }
- });
+ if(!cancelled) {
+ getHandler().post(new Runnable() {
+ @Override
+ public void run() {
+ progressDialog.setMessage(message);
+ }
+ });
+ }
}
}