do not show the permissions dialog to prekitkat devices

This commit is contained in:
tibbi 2016-11-10 20:50:38 +01:00
parent c609072eaf
commit 8f85b5da2f

View File

@ -171,9 +171,8 @@ class Utils {
}
fun isShowingWritePermissions(activity: Activity, file: File): Boolean {
return if ((needsStupidWritePermissions(activity, file.absolutePath) &&
!file.canWrite()) ||
Config.newInstance(activity).treeUri.isEmpty()) {
return if ((needsStupidWritePermissions(activity, file.absolutePath) && !file.canWrite()) ||
(isKitkat() && Config.newInstance(activity).treeUri.isEmpty())) {
WritePermissionDialog(activity, object : WritePermissionDialog.OnWritePermissionListener {
override fun onConfirmed() {
val intent = Intent(Intent.ACTION_OPEN_DOCUMENT_TREE)