add an activity check for the permission check

This commit is contained in:
Jinniu Du 2024-10-27 11:34:21 +11:00
parent bf5d3f5e80
commit 917aaf6fd7

View file

@ -53,7 +53,7 @@ object DownloadUtils {
} }
} catch (e: SecurityException) { } catch (e: SecurityException) {
// Catch SecurityException if storage permission is missing, show a message, and exit // Catch SecurityException if storage permission is missing, show a message, and exit
Toast.makeText(activity, "存储权限被拒绝,无法下载文件", Toast.LENGTH_SHORT).show() Toast.makeText(activity, "no permission", Toast.LENGTH_SHORT).show()
return return
} }