pull/32/head
kunfei 5 years ago
parent 55c5606f1b
commit a18c598ee8
  1. 6
      app/src/main/java/io/legado/app/utils/FileUtils.kt

@ -1,10 +1,8 @@
package io.legado.app.utils package io.legado.app.utils
import android.annotation.TargetApi
import android.content.ContentUris import android.content.ContentUris
import android.content.Context import android.content.Context
import android.net.Uri import android.net.Uri
import android.os.Build
import android.os.Environment import android.os.Environment
import android.os.storage.StorageManager import android.os.storage.StorageManager
import android.provider.DocumentsContract import android.provider.DocumentsContract
@ -171,8 +169,8 @@ object FileUtils {
selection, selection,
selectionArgs, selectionArgs,
null null
)!!.use { cursor -> )?.use { cursor ->
if (cursor != null && cursor.moveToFirst()) { if (cursor.moveToFirst()) {
val index = cursor.getColumnIndexOrThrow(column) val index = cursor.getColumnIndexOrThrow(column)
return cursor.getString(index) return cursor.getString(index)
} }

Loading…
Cancel
Save