[Android] Fix 'clear history' pref with medialibrary
Geoffrey Métais
git at videolan.org
Thu Nov 24 17:13:41 CET 2016
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Nov 24 17:11:58 2016 +0100| [22fea85978fb91257c510f982074bbb0a84a1b4c] | committer: Geoffrey Métais
Fix 'clear history' pref with medialibrary
> https://code.videolan.org/videolan/vlc-android/commit/22fea85978fb91257c510f982074bbb0a84a1b4c
---
vlc-android/res/values/strings.xml | 1 +
.../src/org/videolan/vlc/gui/preferences/PreferencesAdvanced.java | 5 ++---
.../src/org/videolan/vlc/gui/tv/preferences/PreferencesAdvanced.java | 5 ++---
3 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/vlc-android/res/values/strings.xml b/vlc-android/res/values/strings.xml
index 946dbdc..6abcbf2 100644
--- a/vlc-android/res/values/strings.xml
+++ b/vlc-android/res/values/strings.xml
@@ -669,6 +669,7 @@
<string name="episodes">episodes</string>
<string name="movies">movies</string>
<string name="videos">videos</string>
+ <string name="clear_playback_history">Clear playback history</string>
<string-array name="chroma_formats" translatable="false">
<item>RGB 32-bit</item>
diff --git a/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesAdvanced.java b/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesAdvanced.java
index 349ddbb..ed58968 100644
--- a/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesAdvanced.java
+++ b/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesAdvanced.java
@@ -102,15 +102,14 @@ public class PreferencesAdvanced extends BasePreferenceFragment implements Share
return true;
case "clear_history":
new AlertDialog.Builder(getActivity())
- .setTitle(R.string.clear_history)
+ .setTitle(R.string.clear_playback_history)
.setMessage(R.string.validation)
.setIcon(android.R.drawable.ic_dialog_alert)
.setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int whichButton) {
- MediaDatabase db = MediaDatabase.getInstance();
- db.clearSearchHistory();
+ VLCApplication.getMLInstance().clearHistory();
}
})
diff --git a/vlc-android/src/org/videolan/vlc/gui/tv/preferences/PreferencesAdvanced.java b/vlc-android/src/org/videolan/vlc/gui/tv/preferences/PreferencesAdvanced.java
index 6f2521b..618c4b3 100644
--- a/vlc-android/src/org/videolan/vlc/gui/tv/preferences/PreferencesAdvanced.java
+++ b/vlc-android/src/org/videolan/vlc/gui/tv/preferences/PreferencesAdvanced.java
@@ -106,15 +106,14 @@ public class PreferencesAdvanced extends BasePreferenceFragment implements Share
return true;
case "clear_history":
new AlertDialog.Builder(getActivity())
- .setTitle(R.string.clear_history)
+ .setTitle(R.string.clear_playback_history)
.setMessage(R.string.validation)
.setIcon(android.R.drawable.ic_dialog_alert)
.setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int whichButton) {
- MediaDatabase db = MediaDatabase.getInstance();
- db.clearSearchHistory();
+ VLCApplication.getMLInstance().clearHistory();
}
})
More information about the Android
mailing list