[Android] Prevent dialog dismiss if fragment is paused

Geoffrey Métais git at videolan.org
Fri Jun 24 16:36:11 CEST 2016


vlc-android | branch: 2.0.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Jun 24 16:28:10 2016 +0200| [428b402cc856f009bcd452acab8bee5b256154aa] | committer: Geoffrey Métais

Prevent dialog dismiss if fragment is paused

(cherry picked from commit 5d2a62f353b2d17e15e6355b806e1f77ab1caad3)

> https://code.videolan.org/videolan/vlc-android/commit/428b402cc856f009bcd452acab8bee5b256154aa
---

 vlc-android/src/org/videolan/vlc/gui/dialogs/VlcDialog.java | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/dialogs/VlcDialog.java b/vlc-android/src/org/videolan/vlc/gui/dialogs/VlcDialog.java
index 180c7a7..e8e1a9c 100644
--- a/vlc-android/src/org/videolan/vlc/gui/dialogs/VlcDialog.java
+++ b/vlc-android/src/org/videolan/vlc/gui/dialogs/VlcDialog.java
@@ -76,7 +76,12 @@ public abstract class VlcDialog<T extends Dialog, B extends android.databinding.
     }
 
     public void onCancel(View v) {
+        dismiss();
+    }
+
+    @Override
+    public void dismiss() {
         if (isResumed())
-            dismiss();
+            super.dismiss();
     }
 }



More information about the Android mailing list