diff options
author | kaiyiz <kaiyiz@codeaurora.org> | 2015-03-06 10:56:23 +0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2015-03-11 00:01:09 -0700 |
commit | 7e23452f005201ee01f84de4a82da61996bd7da9 (patch) | |
tree | 8885b6da2aa891c2970a5ce92a697a7b323b2c8f /src/com | |
parent | 7b94131b05cc1d2846c747beb71b5a29136bf873 (diff) | |
download | android_packages_apps_Gallery2-7e23452f005201ee01f84de4a82da61996bd7da9.tar.gz android_packages_apps_Gallery2-7e23452f005201ee01f84de4a82da61996bd7da9.tar.bz2 android_packages_apps_Gallery2-7e23452f005201ee01f84de4a82da61996bd7da9.zip |
Gallery2: Pause video when dialog shows
The live stream will be pause by server timeout dialog but start by
surface change callback later.
Check whether the dialog shows before start media player.
Change-Id: I77e8e2b6f84cb0957571d86d9eef2cfb997f1074
CRs-Fixed: 802294
Diffstat (limited to 'src/com')
-rwxr-xr-x | src/com/android/gallery3d/app/MoviePlayer.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/app/MoviePlayer.java b/src/com/android/gallery3d/app/MoviePlayer.java index 4c0df84cc..509201640 100755 --- a/src/com/android/gallery3d/app/MoviePlayer.java +++ b/src/com/android/gallery3d/app/MoviePlayer.java @@ -1356,6 +1356,12 @@ public class MoviePlayer implements } }) + .setOnCancelListener(new OnCancelListener() { + public void onCancel(DialogInterface dialog) { + mController.showEnded(); + onCompletion(); + } + }) .create(); mServerTimeoutDialog.setOnDismissListener(new OnDismissListener() { @@ -1363,6 +1369,7 @@ public class MoviePlayer implements if (LOG) { Log.v(TAG, "mServerTimeoutDialog.onDismiss()"); } + mVideoView.setDialogShowState(false); mIsShowDialog = false; } @@ -1373,6 +1380,7 @@ public class MoviePlayer implements if (LOG) { Log.v(TAG, "mServerTimeoutDialog.onShow()"); } + mVideoView.setDialogShowState(true); mIsShowDialog = true; } |