[Android] Medialibrary: publish clearDatabase method

Geoffrey Métais git at videolan.org
Fri Nov 15 15:27:51 CET 2019


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Nov 15 15:26:30 2019 +0100| [f7e12af9aebc19d0ccc36df05e233bcfff0a3461] | committer: Geoffrey Métais

Medialibrary: publish clearDatabase method

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

 .../src/org/videolan/medialibrary/interfaces/AbstractMedialibrary.java | 1 +
 medialibrary/src/org/videolan/medialibrary/stubs/StubMedialibrary.java | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/medialibrary/src/org/videolan/medialibrary/interfaces/AbstractMedialibrary.java b/medialibrary/src/org/videolan/medialibrary/interfaces/AbstractMedialibrary.java
index b4d208a5f..7ceef89db 100644
--- a/medialibrary/src/org/videolan/medialibrary/interfaces/AbstractMedialibrary.java
+++ b/medialibrary/src/org/videolan/medialibrary/interfaces/AbstractMedialibrary.java
@@ -655,6 +655,7 @@ abstract public class AbstractMedialibrary {
     abstract public AbstractMediaWrapper[] lastMediaPlayed();
     abstract public AbstractMediaWrapper[] lastStreamsPlayed();
     abstract public boolean clearHistory();
+    abstract public void clearDatabase(boolean restorePlaylist);
     abstract public boolean addToHistory(String mrl, String title);
     abstract public AbstractMediaWrapper getMedia(long id);
     abstract public AbstractMediaWrapper getMedia(Uri uri);
diff --git a/medialibrary/src/org/videolan/medialibrary/stubs/StubMedialibrary.java b/medialibrary/src/org/videolan/medialibrary/stubs/StubMedialibrary.java
index 8e746a0f3..656e5f161 100644
--- a/medialibrary/src/org/videolan/medialibrary/stubs/StubMedialibrary.java
+++ b/medialibrary/src/org/videolan/medialibrary/stubs/StubMedialibrary.java
@@ -330,6 +330,9 @@ public class StubMedialibrary extends AbstractMedialibrary {
         return true;
     }
 
+    @Override
+    public void clearDatabase(boolean restorePlaylist) {}
+
     //TODO what if two files have the same name ??
     // TODO what happens in case of false return
     public boolean addToHistory(String mrl, String title) {



More information about the Android mailing list