From: masensio Date: Mon, 24 Feb 2014 09:51:44 +0000 (+0100) Subject: OC-3049: Remove the database update for the folder size data: modify FileContentProv... X-Git-Tag: oc-android-1.5.5~32^2~2 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/a5215ce89edb5405a0c85c2137d2b4cc091d084a?ds=inline OC-3049: Remove the database update for the folder size data: modify FileContentProvider and FileSyncAdapter. --- diff --git a/src/com/owncloud/android/providers/FileContentProvider.java b/src/com/owncloud/android/providers/FileContentProvider.java index 2c7b520d..bad2ddc6 100644 --- a/src/com/owncloud/android/providers/FileContentProvider.java +++ b/src/com/owncloud/android/providers/FileContentProvider.java @@ -442,7 +442,7 @@ public class FileContentProvider extends ContentProvider { private int update(SQLiteDatabase db, Uri uri, ContentValues values, String selection, String[] selectionArgs) { switch (mUriMatcher.match(uri)) { case DIRECTORY: - return updateFolderSize(db, selectionArgs[0]); + return 0; //updateFolderSize(db, selectionArgs[0]); case SHARES: return db.update(ProviderTableMeta.OCSHARES_TABLE_NAME, values, selection, selectionArgs); default: @@ -450,7 +450,7 @@ public class FileContentProvider extends ContentProvider { } } - + /* private int updateFolderSize(SQLiteDatabase db, String folderId) { int count = 0; String [] whereArgs = new String[] { folderId }; @@ -501,7 +501,7 @@ public class FileContentProvider extends ContentProvider { } return count; } - +*/ @Override public ContentProviderResult[] applyBatch (ArrayList operations) throws OperationApplicationException { diff --git a/src/com/owncloud/android/syncadapter/FileSyncAdapter.java b/src/com/owncloud/android/syncadapter/FileSyncAdapter.java index c0b9b0d1..dab51ebb 100644 --- a/src/com/owncloud/android/syncadapter/FileSyncAdapter.java +++ b/src/com/owncloud/android/syncadapter/FileSyncAdapter.java @@ -352,7 +352,7 @@ public class FileSyncAdapter extends AbstractOwnCloudSyncAdapter { syncDown = (parentEtagChanged || etag == null || etag.length() == 0); if(syncDown) { */ synchronizeFolder(newFile); - sendLocalBroadcast(EVENT_FULL_SYNC_FOLDER_SIZE_SYNCED, parent.getRemotePath(), null); + //sendLocalBroadcast(EVENT_FULL_SYNC_FOLDER_SIZE_SYNCED, parent.getRemotePath(), null); //} } } diff --git a/src/com/owncloud/android/ui/activity/FileDisplayActivity.java b/src/com/owncloud/android/ui/activity/FileDisplayActivity.java index d5429dac..581b6bf0 100644 --- a/src/com/owncloud/android/ui/activity/FileDisplayActivity.java +++ b/src/com/owncloud/android/ui/activity/FileDisplayActivity.java @@ -86,7 +86,6 @@ import com.owncloud.android.ui.fragment.FileDetailFragment; import com.owncloud.android.ui.fragment.FileFragment; import com.owncloud.android.ui.fragment.OCFileListFragment; import com.owncloud.android.ui.preview.PreviewImageActivity; -import com.owncloud.android.ui.preview.PreviewImageFragment; import com.owncloud.android.ui.preview.PreviewMediaFragment; import com.owncloud.android.ui.preview.PreviewVideoActivity; import com.owncloud.android.utils.DisplayUtils; @@ -120,7 +119,7 @@ OCFileListFragment.ContainerActivity, FileDetailFragment.ContainerActivity, OnNa private static final String KEY_WAITING_TO_PREVIEW = "WAITING_TO_PREVIEW"; private static final String KEY_SYNC_IN_PROGRESS = "SYNC_IN_PROGRESS"; - private static final String KEY_REFRESH_SHARES_IN_PROGRESS = "SHARES_IN_PROGRESS"; + //private static final String KEY_REFRESH_SHARES_IN_PROGRESS = "SHARES_IN_PROGRESS"; public static final int DIALOG_SHORT_WAIT = 0; private static final int DIALOG_CHOOSE_UPLOAD_SOURCE = 1;