From a18c598ee86526583d3cc8bc2c755c1c3a44b492 Mon Sep 17 00:00:00 2001 From: kunfei Date: Sun, 7 Jul 2019 17:18:07 +0800 Subject: [PATCH] up --- app/src/main/java/io/legado/app/utils/FileUtils.kt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/io/legado/app/utils/FileUtils.kt b/app/src/main/java/io/legado/app/utils/FileUtils.kt index e64869d11..e2ecef64e 100644 --- a/app/src/main/java/io/legado/app/utils/FileUtils.kt +++ b/app/src/main/java/io/legado/app/utils/FileUtils.kt @@ -1,10 +1,8 @@ package io.legado.app.utils -import android.annotation.TargetApi import android.content.ContentUris import android.content.Context import android.net.Uri -import android.os.Build import android.os.Environment import android.os.storage.StorageManager import android.provider.DocumentsContract @@ -171,8 +169,8 @@ object FileUtils { selection, selectionArgs, null - )!!.use { cursor -> - if (cursor != null && cursor.moveToFirst()) { + )?.use { cursor -> + if (cursor.moveToFirst()) { val index = cursor.getColumnIndexOrThrow(column) return cursor.getString(index) }