[Android] Do not show Error dialog if activity is finishing

Geoffrey Métais git at videolan.org
Tue Mar 17 14:15:00 CET 2015


vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Mar 17 14:11:23 2015 +0100| [3a199560699fc11ee2e5ea7e065783ed815b506c] | committer: Geoffrey Métais

Do not show Error dialog if activity is finishing

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=3a199560699fc11ee2e5ea7e065783ed815b506c
---

 vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
index 3b0e299..32a2f32 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -1434,6 +1434,8 @@ public class VideoPlayerActivity extends ActionBarActivity implements IVideoPlay
     }
 
     private void encounteredError() {
+        if (isFinishing())
+            return;
         /* Encountered Error, exit player with a message */
         AlertDialog dialog = new AlertDialog.Builder(VideoPlayerActivity.this)
         .setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {



More information about the Android mailing list