[Android] VideoPlayer: also exit activity when error dialog is canceled
Thomas Guillem
git at videolan.org
Wed Jul 22 18:49:01 CEST 2015
vlc-ports/android | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Jul 22 18:48:37 2015 +0200| [fc60869c0961982b45c38a787d32d7b864396b6d] | committer: Thomas Guillem
VideoPlayer: also exit activity when error dialog is canceled
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=fc60869c0961982b45c38a787d32d7b864396b6d
---
.../src/org/videolan/vlc/gui/video/VideoPlayerActivity.java | 6 ++++++
1 file changed, 6 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 c7a6e67..aa46516 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -1425,6 +1425,12 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
return;
/* Encountered Error, exit player with a message */
mAlertDialog = new AlertDialog.Builder(VideoPlayerActivity.this)
+ .setOnCancelListener(new DialogInterface.OnCancelListener() {
+ @Override
+ public void onCancel(DialogInterface dialog) {
+ exit(RESULT_PLAYBACK_ERROR);
+ }
+ })
.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int id) {
More information about the Android
mailing list