diff options
author | Li Sun <sunli@codeaurora.org> | 2014-01-16 11:07:46 +0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2015-01-12 00:26:25 -0800 |
commit | c4213e017d54db39f3b5285224cec98460c73de4 (patch) | |
tree | 5ef52437a01564323c94e43f19305f65248871e9 /src/com | |
parent | 1a260764f4442a3e6c3277ff9e882f160a10334d (diff) | |
download | android_packages_apps_Gallery2-c4213e017d54db39f3b5285224cec98460c73de4.tar.gz android_packages_apps_Gallery2-c4213e017d54db39f3b5285224cec98460c73de4.tar.bz2 android_packages_apps_Gallery2-c4213e017d54db39f3b5285224cec98460c73de4.zip |
Gallery2: fix the video playback after system language changed
- 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.
Change-Id: I8dc011216bb5bcee8903ba3873ce37582927af45
CRs-Fixed: 597934
Diffstat (limited to 'src/com')
-rwxr-xr-x | src/com/android/gallery3d/app/MoviePlayer.java | 3 |
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 e5874fd1c..3e882ef58 100755 --- a/src/com/android/gallery3d/app/MoviePlayer.java +++ b/src/com/android/gallery3d/app/MoviePlayer.java @@ -297,6 +297,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; |