[Android] Remember length/remaining time display choice
Geoffrey Métais
git at videolan.org
Mon Jun 27 17:30:45 CEST 2016
vlc-android | branch: 2.0.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Jun 27 17:24:55 2016 +0200| [71a559cdc6132f3c5ae5404a5d21c453b8fb55d1] | committer: Geoffrey Métais
Remember length/remaining time display choice
(cherry picked from commit bbd936435d9c43f887619f281bc448fc5d77813e)
> https://code.videolan.org/videolan/vlc-android/commit/71a559cdc6132f3c5ae5404a5d21c453b8fb55d1
---
vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
index 0a6179c..d48d1a8 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -242,11 +242,12 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
private View mObjectFocused;
private boolean mEnableBrightnessGesture;
private boolean mEnableCloneMode;
- private boolean mDisplayRemainingTime = false;
+ private boolean mDisplayRemainingTime;
private int mScreenOrientation;
private int mScreenOrientationLock;
private ImageView mLock;
private ImageView mSize;
+ private String KEY_REMAINING_TIME_DISPLAY = "remaining_time_display";;
@Override
public boolean onGenericMotionEvent(MotionEvent event) {
@@ -463,6 +464,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
mHardwareAccelerationError = false;
mAskResume = mSettings.getBoolean("dialog_confirm_resume", false);
+ mDisplayRemainingTime = mSettings.getBoolean(KEY_REMAINING_TIME_DISPLAY, false);
// Clear the resume time, since it is only used for resumes in external
// videos.
SharedPreferences.Editor editor = mSettings.edit();
@@ -2304,6 +2306,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
case R.id.player_overlay_time:
mDisplayRemainingTime = !mDisplayRemainingTime;
showOverlay();
+ Util.commitPreferences(mSettings.edit().putBoolean(KEY_REMAINING_TIME_DISPLAY, mDisplayRemainingTime));
break;
case R.id.player_delay_minus:
if (mPlaybackSetting == DelayState.AUDIO)
More information about the Android
mailing list