- public void updateFolderSize(long id) {
- if (getContentResolver() != null) {
- getContentResolver().update(ProviderTableMeta.CONTENT_URI_DIR, null,
- ProviderTableMeta._ID + "=?",
- new String[] { String.valueOf(id) });
- } else {
- try {
- getContentProviderClient().update(ProviderTableMeta.CONTENT_URI_DIR, null,
- ProviderTableMeta._ID + "=?",
- new String[] { String.valueOf(id) });
-
- } catch (RemoteException e) {
- Log_OC.e(TAG, "Exception in update of folder size through compatibility patch " + e.getMessage());
+ private void updateFolderSize(long id) {
+ if (id > FileDataStorageManager.ROOT_PARENT_ID) {
+ Log_OC.d(TAG, "Updating size of " + id);
+ if (getContentResolver() != null) {
+ getContentResolver().update(ProviderTableMeta.CONTENT_URI_DIR,
+ new ContentValues(), // won't be used, but cannot be null; crashes in KLP
+ ProviderTableMeta._ID + "=?",
+ new String[] { String.valueOf(id) });
+ } else {
+ try {
+ getContentProviderClient().update(ProviderTableMeta.CONTENT_URI_DIR,
+ new ContentValues(), // won't be used, but cannot be null; crashes in KLP
+ ProviderTableMeta._ID + "=?",
+ new String[] { String.valueOf(id) });
+
+ } catch (RemoteException e) {
+ Log_OC.e(TAG, "Exception in update of folder size through compatibility patch " + e.getMessage());
+ }