summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2015-03-30 23:05:27 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2015-03-30 23:05:27 -0700
commit75b8670f6c3d36d4cb289b2fc58cdcf596007465 (patch)
treee3e6e33136024e684c77c68b3d8802f3647bc038
parent53092a936d354ed5c4e67136c6c535512a3d6599 (diff)
parent6793597161676e452c2a09dc59a5aae816cddfde (diff)
downloadandroid_packages_apps_Gallery2-75b8670f6c3d36d4cb289b2fc58cdcf596007465.tar.gz
android_packages_apps_Gallery2-75b8670f6c3d36d4cb289b2fc58cdcf596007465.tar.bz2
android_packages_apps_Gallery2-75b8670f6c3d36d4cb289b2fc58cdcf596007465.zip
Merge "Gallery2: Modify the action of rewind and forward button" into LA.BR.1.2.3
-rw-r--r--src/com/android/gallery3d/app/MovieControllerOverlay.java16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/com/android/gallery3d/app/MovieControllerOverlay.java b/src/com/android/gallery3d/app/MovieControllerOverlay.java
index bb25882c8..168cbe102 100644
--- a/src/com/android/gallery3d/app/MovieControllerOverlay.java
+++ b/src/com/android/gallery3d/app/MovieControllerOverlay.java
@@ -22,6 +22,7 @@ import android.graphics.BitmapFactory;
import android.graphics.Color;
import android.graphics.Rect;
import android.os.Handler;
+import android.text.TextUtils;
import android.util.DisplayMetrics;
import android.view.Gravity;
import android.view.KeyEvent;
@@ -50,6 +51,7 @@ import org.codeaurora.gallery3d.video.ExtensionHelper;
import org.codeaurora.gallery3d.video.ScreenModeManager;
import org.codeaurora.gallery3d.video.ScreenModeManager.ScreenModeListener;
+import java.util.Locale;
/**
* The playback controller for the Movie Player.
@@ -840,10 +842,20 @@ public class MovieControllerOverlay extends CommonControllerOverlay implements
mListenerForRewind.onStopVideo();
} else if (v == mRewind) {
Log.v(TAG, "ControllerRewindAndForwardExt onClick mRewind");
- mListenerForRewind.onRewind();
+ if (TextUtils.getLayoutDirectionFromLocale(Locale.getDefault())
+ == View.LAYOUT_DIRECTION_RTL) {
+ mListenerForRewind.onForward();
+ } else {
+ mListenerForRewind.onRewind();
+ }
} else if (v == mForward) {
Log.v(TAG, "ControllerRewindAndForwardExt onClick mForward");
- mListenerForRewind.onForward();
+ if (TextUtils.getLayoutDirectionFromLocale(Locale.getDefault())
+ == View.LAYOUT_DIRECTION_RTL) {
+ mListenerForRewind.onRewind();
+ } else {
+ mListenerForRewind.onForward();
+ }
}
}