[Android] Avoid BadTokens exception when displaying a dialog
Jean-Baptiste Kempf
git at videolan.org
Sun Apr 13 18:13:50 CEST 2014
vlc-ports/android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun Apr 13 18:10:28 2014 +0200| [c8b899394bd999304370abcf623eb0119ba333aa] | committer: Jean-Baptiste Kempf
Avoid BadTokens exception when displaying a dialog
If the application is dying, you cannot display an alert...
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=c8b899394bd999304370abcf623eb0119ba333aa
---
vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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 a5c2637..6c78a55 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -945,7 +945,8 @@ public class VideoPlayerActivity extends Activity implements IVideoPlayer {
.setTitle(R.string.hardware_acceleration_error_title)
.setMessage(R.string.hardware_acceleration_error_message)
.create();
- dialog.show();
+ if(!isFinishing())
+ dialog.show();
}
private void handleVout(Message msg) {
More information about the Android
mailing list