summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLi Sun <sunli@codeaurora.org>2014-01-16 11:07:46 +0800
committeremancebo <emancebo@cyngn.com>2014-09-04 10:40:19 -0700
commit6eb045a6fc562a345d4f553ef065e4bf412cf4f6 (patch)
tree403705d1a7df54bbe930d2cd7778f6903678b750
parent67a88f5e57f367a0e1a5741f8a5513e0a5048749 (diff)
downloadandroid_packages_apps_Gallery2-6eb045a6fc562a345d4f553ef065e4bf412cf4f6.tar.gz
android_packages_apps_Gallery2-6eb045a6fc562a345d4f553ef065e4bf412cf4f6.tar.bz2
android_packages_apps_Gallery2-6eb045a6fc562a345d4f553ef065e4bf412cf4f6.zip
Gallery2: fix video playback after system language change
- when system language changed, the activity would be destroyed and recreated. The subobject MoviePlayer would be also recreated. But in this case, MoviePlayer doesn't set some parameters like the URI, duration and etc. It cause the video playback failed. - add the related function calls to restart the video playback. (cherry picked from commit 59890ad484be36860f9ad326cdcda292111e3513) Change-Id: Ie9c46ddbea2b9826988c1fa7e8e7c1c99e2606f7
-rw-r--r--src/com/android/gallery3d/app/MoviePlayer.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/app/MoviePlayer.java b/src/com/android/gallery3d/app/MoviePlayer.java
index 310840143..368e2431f 100644
--- a/src/com/android/gallery3d/app/MoviePlayer.java
+++ b/src/com/android/gallery3d/app/MoviePlayer.java
@@ -308,6 +308,9 @@ public class MoviePlayer implements
mResumeableTime = savedInstance.getLong(KEY_RESUMEABLE_TIME, Long.MAX_VALUE);
onRestoreInstanceState(savedInstance);
mHasPaused = true;
+ doStartVideo(true, mVideoPosition, mVideoLastDuration,false);
+ mVideoView.start();
+ mActivityContext.initEffects(mVideoView.getAudioSessionId());
} else {
mTState = TState.PLAYING;
mFirstBePlayed = true;