From ba4386008ada87d71dd862ccca49f0f15f9792d9 Mon Sep 17 00:00:00 2001 From: jabarros Date: Mon, 23 Jun 2014 11:22:36 +0200 Subject: [PATCH] Modify FileDataStorageManager for adding permission value to ContentValue --- .../owncloud/android/datamodel/FileDataStorageManager.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/com/owncloud/android/datamodel/FileDataStorageManager.java b/src/com/owncloud/android/datamodel/FileDataStorageManager.java index 650acf74e2..2f2cf453d7 100644 --- a/src/com/owncloud/android/datamodel/FileDataStorageManager.java +++ b/src/com/owncloud/android/datamodel/FileDataStorageManager.java @@ -186,6 +186,7 @@ public class FileDataStorageManager { cv.put(ProviderTableMeta.FILE_ETAG, file.getEtag()); cv.put(ProviderTableMeta.FILE_SHARE_BY_LINK, file.isShareByLink() ? 1 : 0); cv.put(ProviderTableMeta.FILE_PUBLIC_LINK, file.getPublicLink()); + cv.put(ProviderTableMeta.FILE_PERMISSIONS, file.getPermissions()); boolean sameRemotePath = fileExists(file.getRemotePath()); if (sameRemotePath || @@ -285,6 +286,7 @@ public class FileDataStorageManager { cv.put(ProviderTableMeta.FILE_ETAG, file.getEtag()); cv.put(ProviderTableMeta.FILE_SHARE_BY_LINK, file.isShareByLink() ? 1 : 0); cv.put(ProviderTableMeta.FILE_PUBLIC_LINK, file.getPublicLink()); + cv.put(ProviderTableMeta.FILE_PERMISSIONS, file.getPermissions()); boolean existsByPath = fileExists(file.getRemotePath()); if (existsByPath || fileExists(file.getFileId())) { @@ -342,6 +344,7 @@ public class FileDataStorageManager { cv.put(ProviderTableMeta.FILE_ETAG, folder.getEtag()); cv.put(ProviderTableMeta.FILE_SHARE_BY_LINK, folder.isShareByLink() ? 1 : 0); cv.put(ProviderTableMeta.FILE_PUBLIC_LINK, folder.getPublicLink()); + cv.put(ProviderTableMeta.FILE_PERMISSIONS, folder.getPermissions()); operations.add(ContentProviderOperation.newUpdate(ProviderTableMeta.CONTENT_URI). withValues(cv). @@ -750,6 +753,7 @@ public class FileDataStorageManager { file.setShareByLink(c.getInt( c.getColumnIndex(ProviderTableMeta.FILE_SHARE_BY_LINK)) == 1 ? true : false); file.setPublicLink(c.getString(c.getColumnIndex(ProviderTableMeta.FILE_PUBLIC_LINK))); + file.setPermissions(c.getString(c.getColumnIndex(ProviderTableMeta.FILE_PERMISSIONS))); } return file; @@ -1092,6 +1096,7 @@ public class FileDataStorageManager { cv.put(ProviderTableMeta.FILE_ETAG, file.getEtag()); cv.put(ProviderTableMeta.FILE_SHARE_BY_LINK, file.isShareByLink() ? 1 : 0); cv.put(ProviderTableMeta.FILE_PUBLIC_LINK, file.getPublicLink()); + cv.put(ProviderTableMeta.FILE_PERMISSIONS, file.getPermissions()); boolean existsByPath = fileExists(file.getRemotePath()); if (existsByPath || fileExists(file.getFileId())) {