[Android] Catch FTS exception happening on some devices
Geoffrey Métais
git at videolan.org
Thu Nov 26 14:30:55 CET 2015
vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Nov 26 14:26:27 2015 +0100| [14b535fa146b97fb10ed711e107fd7922fc5b506] | committer: Geoffrey Métais
Catch FTS exception happening on some devices
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=14b535fa146b97fb10ed711e107fd7922fc5b506
---
vlc-android/src/org/videolan/vlc/media/MediaDatabase.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/vlc-android/src/org/videolan/vlc/media/MediaDatabase.java b/vlc-android/src/org/videolan/vlc/media/MediaDatabase.java
index c825c0f..98f6e60 100644
--- a/vlc-android/src/org/videolan/vlc/media/MediaDatabase.java
+++ b/vlc-android/src/org/videolan/vlc/media/MediaDatabase.java
@@ -883,7 +883,11 @@ public class MediaDatabase {
}
public synchronized void removeMedia(Uri uri) {
- mDb.delete(MEDIA_TABLE_NAME, MEDIA_LOCATION + "=?", new String[]{uri.toString()});
+ try {
+ mDb.delete(MEDIA_TABLE_NAME, MEDIA_LOCATION + "=?", new String[]{uri.toString()});
+ } catch (SQLiteException e) {
+ // Some devices have weird issues with FTS table
+ }
}
public synchronized void removeMedias(Collection<Uri> uris) {
More information about the Android
mailing list