[Android] Shorter title for audio option

Geoffrey Métais git at videolan.org
Fri Nov 23 17:30:08 CET 2018


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Nov 23 17:29:31 2018 +0100| [0b7bd1f1fbeecc4f57603e4f49ecc51dc6758e08] | committer: Geoffrey Métais

Shorter title for audio option

> https://code.videolan.org/videolan/vlc-android/commit/0b7bd1f1fbeecc4f57603e4f49ecc51dc6758e08
---

 vlc-android/res/values/strings.xml                                     | 3 ++-
 vlc-android/res/xml/preferences_audio.xml                              | 3 ++-
 vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesAudio.java | 2 +-
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/vlc-android/res/values/strings.xml b/vlc-android/res/values/strings.xml
index 469f98266..eef896ba0 100644
--- a/vlc-android/res/values/strings.xml
+++ b/vlc-android/res/values/strings.xml
@@ -626,7 +626,8 @@
     <string name="audio_digital_output_enabled">Audio Digital Output enabled</string>
     <string name="audio_digital_output_disabled">Audio Digital Output disabled</string>
     <string name="audio_digital_title">Digital audio output (passthrough)</string>
-    <string name="audio_task_removed_title">Stop playback when application is dismissed</string>
+    <string name="audio_task_cleared_title">Stop on application swipe</string>
+    <string name="audio_task_cleared_summary">Stop playback when application is dismissed</string>
     <string name="playback_rewind">Rewind</string>
     <string name="playback_forward">Fast forward</string>
     <string name="ml_wizard_title">VLC Medialibrary selection</string>
diff --git a/vlc-android/res/xml/preferences_audio.xml b/vlc-android/res/xml/preferences_audio.xml
index 772daecc4..49d3555b6 100644
--- a/vlc-android/res/xml/preferences_audio.xml
+++ b/vlc-android/res/xml/preferences_audio.xml
@@ -7,7 +7,8 @@
     <CheckBoxPreference
         android:defaultValue="false"
         android:key="audio_task_removed"
-        android:title="@string/audio_task_removed_title" />
+        android:title="@string/audio_task_cleared_title"
+        android:summary="@string/audio_task_cleared_summary"/>
 
     <CheckBoxPreference
         android:defaultValue="false"
diff --git a/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesAudio.java b/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesAudio.java
index 94396172c..e3863ea50 100644
--- a/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesAudio.java
+++ b/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesAudio.java
@@ -83,7 +83,7 @@ public class PreferencesAudio extends BasePreferenceFragment implements SharedPr
         if (preference.getKey() == null) return false;
         switch (preference.getKey()){
             case "enable_headset_detection":
-                ((PreferencesActivity)getActivity()).detectHeadset(((TwoStatePreference) preference).isChecked());
+                ((PreferencesActivity)requireActivity()).detectHeadset(((TwoStatePreference) preference).isChecked());
                 return true;
         }
         return super.onPreferenceTreeClick(preference);



More information about the Android mailing list