remove the file.canWrite check

This commit is contained in:
tibbi 2016-11-10 21:22:02 +01:00
parent 3e2cfe90bc
commit d80a1bd185
2 changed files with 1 additions and 5 deletions

View file

@ -171,8 +171,7 @@ class Utils {
} }
fun isShowingWritePermissions(activity: Activity, file: File): Boolean { fun isShowingWritePermissions(activity: Activity, file: File): Boolean {
return if ((needsStupidWritePermissions(activity, file.absolutePath) && !file.canWrite()) || return if ((needsStupidWritePermissions(activity, file.absolutePath) && Config.newInstance(activity).treeUri.isEmpty())) {
(isKitkat() && 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)

View file

@ -414,9 +414,6 @@ public class MediaActivity extends SimpleActivity
} }
private void displayCopyDialog() { private void displayCopyDialog() {
if (Utils.Companion.isShowingWritePermissions(this, new File(mPath)))
return;
final List<File> files = new ArrayList<>(); final List<File> files = new ArrayList<>();
final SparseBooleanArray items = mGridView.getCheckedItemPositions(); final SparseBooleanArray items = mGridView.getCheckedItemPositions();