[Android] Prevent dialog dismiss if fragment is paused

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


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

Prevent dialog dismiss if fragment is paused

> https://code.videolan.org/videolan/vlc-android/commit/5d2a62f353b2d17e15e6355b806e1f77ab1caad3
---

 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