mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2025-01-31 04:06:43 +01:00
do not show the permissions dialog to prekitkat devices
This commit is contained in:
parent
c609072eaf
commit
8f85b5da2f
1 changed files with 2 additions and 3 deletions
|
@ -171,9 +171,8 @@ class Utils {
|
||||||
}
|
}
|
||||||
|
|
||||||
fun isShowingWritePermissions(activity: Activity, file: File): Boolean {
|
fun isShowingWritePermissions(activity: Activity, file: File): Boolean {
|
||||||
return if ((needsStupidWritePermissions(activity, file.absolutePath) &&
|
return if ((needsStupidWritePermissions(activity, file.absolutePath) && !file.canWrite()) ||
|
||||||
!file.canWrite()) ||
|
(isKitkat() && Config.newInstance(activity).treeUri.isEmpty())) {
|
||||||
Config.newInstance(activity).treeUri.isEmpty()) {
|
|
||||||
WritePermissionDialog(activity, object : WritePermissionDialog.OnWritePermissionListener {
|
WritePermissionDialog(activity, object : WritePermissionDialog.OnWritePermissionListener {
|
||||||
override fun onConfirmed() {
|
override fun onConfirmed() {
|
||||||
val intent = Intent(Intent.ACTION_OPEN_DOCUMENT_TREE)
|
val intent = Intent(Intent.ACTION_OPEN_DOCUMENT_TREE)
|
||||||
|
|
Loading…
Reference in a new issue