From 9714d1175df568e3b5676f28c0ea092a100e8045 Mon Sep 17 00:00:00 2001 From: kunfei Date: Fri, 25 Oct 2019 10:13:30 +0800 Subject: [PATCH] up --- .../java/io/legado/app/ui/filechooser/utils/ConvertUtils.kt | 5 ----- .../java/io/legado/app/ui/filechooser/utils/FileUtils.kt | 6 +++--- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/filechooser/utils/ConvertUtils.kt b/app/src/main/java/io/legado/app/ui/filechooser/utils/ConvertUtils.kt index 0e0ae30a8..0d9c2dd81 100644 --- a/app/src/main/java/io/legado/app/ui/filechooser/utils/ConvertUtils.kt +++ b/app/src/main/java/io/legado/app/ui/filechooser/utils/ConvertUtils.kt @@ -11,7 +11,6 @@ import java.io.IOException import java.io.InputStream import java.io.InputStreamReader import java.text.DecimalFormat -import java.util.* /** * 数据类型转换、单位转换 @@ -51,10 +50,6 @@ object ConvertUtils { } } - fun toString(objects: Array): String { - return Arrays.deepToString(objects) - } - fun toString(objects: Array, tag: String): String { val sb = StringBuilder() for (`object` in objects) { diff --git a/app/src/main/java/io/legado/app/ui/filechooser/utils/FileUtils.kt b/app/src/main/java/io/legado/app/ui/filechooser/utils/FileUtils.kt index 5506fe8ab..71e838cae 100644 --- a/app/src/main/java/io/legado/app/ui/filechooser/utils/FileUtils.kt +++ b/app/src/main/java/io/legado/app/ui/filechooser/utils/FileUtils.kt @@ -80,7 +80,7 @@ object FileUtils { } for (dir in dirs) { val file = dir.absoluteFile - if (!ConvertUtils.toString(excludeDirs).contains(file.name)) { + if (!excludeDirs.contentDeepToString().contains(file.name)) { dirList.add(file) } } @@ -193,8 +193,8 @@ object FileUtils { val file = File(startDirPath) return file.listFiles { dir, name -> //返回当前目录所有以某些扩展名结尾的文件 - val extension = FileUtils.getExtension(name) - ConvertUtils.toString(allowExtensions).contains(extension) + val extension = getExtension(name) + allowExtensions.contentDeepToString().contains(extension) } }