improved error log

This commit is contained in:
Thibault Deckers 2021-09-26 18:46:32 +09:00
parent 2c94311f05
commit 3196efcb04
3 changed files with 9 additions and 9 deletions

View file

@ -118,13 +118,13 @@ class SearchSuggestionsProvider : MethodChannel.MethodCallHandler, ContentProvid
override fun getType(uri: Uri): String? = null override fun getType(uri: Uri): String? = null
override fun insert(uri: Uri, values: ContentValues?): Uri = override fun insert(uri: Uri, values: ContentValues?): Uri =
throw UnsupportedOperationException() throw UnsupportedOperationException("`insert` is not supported by this content provider")
override fun delete(uri: Uri, selection: String?, selectionArgs: Array<String>?): Int = override fun delete(uri: Uri, selection: String?, selectionArgs: Array<String>?): Int =
throw UnsupportedOperationException() throw UnsupportedOperationException("`delete` is not supported by this content provider")
override fun update(uri: Uri, values: ContentValues?, selection: String?, selectionArgs: Array<String>?): Int = override fun update(uri: Uri, values: ContentValues?, selection: String?, selectionArgs: Array<String>?): Int =
throw UnsupportedOperationException() throw UnsupportedOperationException("`update` is not supported by this content provider")
companion object { companion object {
private val LOG_TAG = LogUtils.createTag<SearchSuggestionsProvider>() private val LOG_TAG = LogUtils.createTag<SearchSuggestionsProvider>()

View file

@ -37,23 +37,23 @@ import java.util.*
abstract class ImageProvider { abstract class ImageProvider {
open fun fetchSingle(context: Context, uri: Uri, sourceMimeType: String?, callback: ImageOpCallback) { open fun fetchSingle(context: Context, uri: Uri, sourceMimeType: String?, callback: ImageOpCallback) {
callback.onFailure(UnsupportedOperationException()) callback.onFailure(UnsupportedOperationException("`fetchSingle` is not supported by this image provider"))
} }
open suspend fun delete(activity: Activity, uri: Uri, path: String?) { open suspend fun delete(activity: Activity, uri: Uri, path: String?) {
throw UnsupportedOperationException() throw UnsupportedOperationException("`delete` is not supported by this image provider")
} }
open suspend fun moveMultiple(activity: Activity, copy: Boolean, destinationDir: String, entries: List<AvesEntry>, callback: ImageOpCallback) { open suspend fun moveMultiple(activity: Activity, copy: Boolean, destinationDir: String, entries: List<AvesEntry>, callback: ImageOpCallback) {
callback.onFailure(UnsupportedOperationException()) callback.onFailure(UnsupportedOperationException("`moveMultiple` is not supported by this image provider"))
} }
open fun scanPostMetadataEdit(context: Context, path: String, uri: Uri, mimeType: String, newFields: HashMap<String, Any?>, callback: ImageOpCallback) { open fun scanPostMetadataEdit(context: Context, path: String, uri: Uri, mimeType: String, newFields: HashMap<String, Any?>, callback: ImageOpCallback) {
throw UnsupportedOperationException() throw UnsupportedOperationException("`scanPostMetadataEdit` is not supported by this image provider")
} }
open fun scanObsoletePath(context: Context, path: String, mimeType: String) { open fun scanObsoletePath(context: Context, path: String, mimeType: String) {
throw UnsupportedOperationException() throw UnsupportedOperationException("`scanObsoletePath` is not supported by this image provider")
} }
suspend fun exportMultiple( suspend fun exportMultiple(

View file

@ -23,7 +23,7 @@ object MimeTypes {
// raw raster // raw raster
private const val ARW = "image/x-sony-arw" private const val ARW = "image/x-sony-arw"
private const val CR2 = "image/x-canon-cr2" private const val CR2 = "image/x-canon-cr2"
const val DNG = "image/x-adobe-dng" private const val DNG = "image/x-adobe-dng"
private const val NEF = "image/x-nikon-nef" private const val NEF = "image/x-nikon-nef"
private const val NRW = "image/x-nikon-nrw" private const val NRW = "image/x-nikon-nrw"
private const val ORF = "image/x-olympus-orf" private const val ORF = "image/x-olympus-orf"