[Android] Do not save playback rate by default

Geoffrey Métais git at videolan.org
Thu Feb 21 09:36:19 CET 2019


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Feb 21 09:24:46 2019 +0100| [26ede215884e02fbd7d9143dadaac5d7a8a01851] | committer: Geoffrey Métais

Do not save playback rate by default

> https://code.videolan.org/videolan/vlc-android/commit/26ede215884e02fbd7d9143dadaac5d7a8a01851
---

 vlc-android/res/xml/preferences_ui.xml                     | 2 +-
 vlc-android/src/org/videolan/vlc/media/PlayerController.kt | 4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/vlc-android/res/xml/preferences_ui.xml b/vlc-android/res/xml/preferences_ui.xml
index bff4eabea..c2d60db3e 100644
--- a/vlc-android/res/xml/preferences_ui.xml
+++ b/vlc-android/res/xml/preferences_ui.xml
@@ -24,7 +24,7 @@
         android:title="@string/tv_ui_title" />
 
     <CheckBoxPreference
-        android:defaultValue="true"
+        android:defaultValue="false"
         android:key="playback_speed"
         android:summary="@string/playback_speed_summary"
         android:title="@string/playback_speed_title" />
diff --git a/vlc-android/src/org/videolan/vlc/media/PlayerController.kt b/vlc-android/src/org/videolan/vlc/media/PlayerController.kt
index e73ea2a07..04f7f1c04 100644
--- a/vlc-android/src/org/videolan/vlc/media/PlayerController.kt
+++ b/vlc-android/src/org/videolan/vlc/media/PlayerController.kt
@@ -82,8 +82,6 @@ class PlayerController(val context: Context) : IVLCVout.Callback, MediaPlayer.Ev
         mediaplayer.setEqualizer(VLCOptions.getEqualizerSetFromSettings(context))
         mediaplayer.setVideoTitleDisplay(MediaPlayer.Position.Disable, 0)
         mediaplayer.play()
-        if (mediaplayer.rate == 1.0f && settings.getBoolean(PreferencesActivity.KEY_PLAYBACK_SPEED_PERSIST, true))
-            setRate(settings.getFloat(PreferencesActivity.KEY_PLAYBACK_RATE, 1.0f), false)
     }
 
     private fun resetPlaybackState(duration: Long) {
@@ -226,7 +224,7 @@ class PlayerController(val context: Context) : IVLCVout.Callback, MediaPlayer.Ev
 
     fun setRate(rate: Float, save: Boolean) {
         mediaplayer.rate = rate
-        if (save && settings.getBoolean(PreferencesActivity.KEY_PLAYBACK_SPEED_PERSIST, true))
+        if (save && settings.getBoolean(PreferencesActivity.KEY_PLAYBACK_SPEED_PERSIST, false))
             settings.edit().putFloat(PreferencesActivity.KEY_PLAYBACK_RATE, rate).apply()
     }
 



More information about the Android mailing list