From ce43bbe73d4ed5ae847ea5e404602e4f73903534 Mon Sep 17 00:00:00 2001 From: EncEx Date: Thu, 21 Apr 2022 17:52:01 +0800 Subject: [PATCH] Give MediaScannerConnection the right parameters to make it work better --- app/src/main/java/com/lsp/view/service/DownloadService.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/lsp/view/service/DownloadService.kt b/app/src/main/java/com/lsp/view/service/DownloadService.kt index 3a20b2d..5ca5bdf 100644 --- a/app/src/main/java/com/lsp/view/service/DownloadService.kt +++ b/app/src/main/java/com/lsp/view/service/DownloadService.kt @@ -39,8 +39,8 @@ class DownloadService : Service() { //通知媒体更新 MediaScannerConnection.scanFile( - context, arrayOf(FileD.toString()), - arrayOf(FileD.name.toString()), null + context, arrayOf(file.path), + null, null ) return true