[Android] Prevent SQLiteException
Nicolas Pomepuy
git at videolan.org
Fri Nov 13 07:31:03 CET 2020
vlc-android | branch: 3.3.x | Nicolas Pomepuy <nicolas at videolabs.io> | Thu Nov 5 06:57:17 2020 +0100| [9e0cb0fa107e64bfe7f59624af98d244e64c7a76] | committer: Nicolas Pomepuy
Prevent SQLiteException
(cherry picked from commit 47a39853a469b297cef6e49a3b5bd25561e566c4)
> https://code.videolan.org/videolan/vlc-android/commit/9e0cb0fa107e64bfe7f59624af98d244e64c7a76
---
application/vlc-android/src/org/videolan/vlc/util/FileUtils.kt | 3 +++
1 file changed, 3 insertions(+)
diff --git a/application/vlc-android/src/org/videolan/vlc/util/FileUtils.kt b/application/vlc-android/src/org/videolan/vlc/util/FileUtils.kt
index 8b9ea4261..b047b3273 100644
--- a/application/vlc-android/src/org/videolan/vlc/util/FileUtils.kt
+++ b/application/vlc-android/src/org/videolan/vlc/util/FileUtils.kt
@@ -27,6 +27,7 @@ import android.annotation.SuppressLint
import android.content.Context
import android.content.res.AssetManager
import android.database.Cursor
+import android.database.sqlite.SQLiteException
import android.net.Uri
import android.os.ParcelFileDescriptor
import android.os.storage.StorageManager
@@ -103,6 +104,8 @@ object FileUtils {
return ""
} catch (e: SecurityException) {
return ""
+ } catch (e: SQLiteException) {
+ return ""
} catch (e: NullPointerException) {
return ""
} finally {
More information about the Android
mailing list