summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsrc/com/android/gallery3d/app/MoviePlayer.java8
-rwxr-xr-xsrc/org/codeaurora/gallery3d/video/CodeauroraVideoView.java6
2 files changed, 14 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/app/MoviePlayer.java b/src/com/android/gallery3d/app/MoviePlayer.java
index 4c0df84..5092016 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;
}
diff --git a/src/org/codeaurora/gallery3d/video/CodeauroraVideoView.java b/src/org/codeaurora/gallery3d/video/CodeauroraVideoView.java
index 20d14f9..41fd09c 100755
--- a/src/org/codeaurora/gallery3d/video/CodeauroraVideoView.java
+++ b/src/org/codeaurora/gallery3d/video/CodeauroraVideoView.java
@@ -94,6 +94,7 @@ public class CodeauroraVideoView extends SurfaceView implements MediaPlayerContr
private boolean mNeedWaitLayout = false;
private boolean mHasGotMetaData = false;
private boolean mOnResumed;
+ private boolean mIsShowDialog = false;
private final Handler mHandler = new Handler() {
public void handleMessage(final Message msg) {
@@ -746,8 +747,13 @@ public class CodeauroraVideoView extends SurfaceView implements MediaPlayerContr
}
}
+ public void setDialogShowState(boolean isDialogShow) {
+ mIsShowDialog = isDialogShow;
+ }
+
@Override
public void start() {
+ if (mIsShowDialog) return;
if (isInPlaybackState()) {
mMediaPlayer.start();
mCurrentState = STATE_PLAYING;