mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-11-03 08:13:55 +01:00
add an activity check for the permission check
This commit is contained in:
parent
bf5d3f5e80
commit
917aaf6fd7
1 changed files with 1 additions and 1 deletions
|
|
@ -53,7 +53,7 @@ object DownloadUtils {
|
|||
}
|
||||
} catch (e: SecurityException) {
|
||||
// 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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue