projects
/
pub
/
Android
/
ownCloud.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e3be4ba
)
Enforced check of local modification date when synchronizing file contents to avoid...
author
David A. Velasco
<dvelasco@solidgear.es>
Fri, 18 Oct 2013 11:24:56 +0000
(13:24 +0200)
committer
David A. Velasco
<dvelasco@solidgear.es>
Fri, 18 Oct 2013 11:24:56 +0000
(13:24 +0200)
src/com/owncloud/android/files/OwnCloudFileObserver.java
patch
|
blob
|
blame
|
history
src/com/owncloud/android/operations/SynchronizeFileOperation.java
patch
|
blob
|
blame
|
history
src/com/owncloud/android/operations/SynchronizeFolderOperation.java
patch
|
blob
|
blame
|
history
src/com/owncloud/android/ui/fragment/FileDetailFragment.java
patch
|
blob
|
blame
|
history
src/com/owncloud/android/ui/fragment/OCFileListFragment.java
patch
|
blob
|
blame
|
history
diff --git
a/src/com/owncloud/android/files/OwnCloudFileObserver.java
b/src/com/owncloud/android/files/OwnCloudFileObserver.java
index
2ea90c9
..
5383520
100644
(file)
--- a/
src/com/owncloud/android/files/OwnCloudFileObserver.java
+++ b/
src/com/owncloud/android/files/OwnCloudFileObserver.java
@@
-83,7
+83,6
@@
public class OwnCloudFileObserver extends FileObserver {
storageManager,
mOCAccount,
true,
storageManager,
mOCAccount,
true,
- true,
mContext);
RemoteOperationResult result = sfo.execute(mOCAccount, mContext);
if (result.getCode() == ResultCode.SYNC_CONFLICT) {
mContext);
RemoteOperationResult result = sfo.execute(mOCAccount, mContext);
if (result.getCode() == ResultCode.SYNC_CONFLICT) {
diff --git
a/src/com/owncloud/android/operations/SynchronizeFileOperation.java
b/src/com/owncloud/android/operations/SynchronizeFileOperation.java
index
f02241e
..
b5f6575
100644
(file)
--- a/
src/com/owncloud/android/operations/SynchronizeFileOperation.java
+++ b/
src/com/owncloud/android/operations/SynchronizeFileOperation.java
@@
-49,7
+49,6
@@
public class SynchronizeFileOperation extends RemoteOperation {
private FileDataStorageManager mStorageManager;
private Account mAccount;
private boolean mSyncFileContents;
private FileDataStorageManager mStorageManager;
private Account mAccount;
private boolean mSyncFileContents;
- private boolean mLocalChangeAlreadyKnown;
private Context mContext;
private boolean mTransferWasRequested = false;
private Context mContext;
private boolean mTransferWasRequested = false;
@@
-60,7
+59,6
@@
public class SynchronizeFileOperation extends RemoteOperation {
FileDataStorageManager storageManager,
Account account,
boolean syncFileContents,
FileDataStorageManager storageManager,
Account account,
boolean syncFileContents,
- boolean localChangeAlreadyKnown,
Context context) {
mLocalFile = localFile;
Context context) {
mLocalFile = localFile;
@@
-68,7
+66,6
@@
public class SynchronizeFileOperation extends RemoteOperation {
mStorageManager = storageManager;
mAccount = account;
mSyncFileContents = syncFileContents;
mStorageManager = storageManager;
mAccount = account;
mSyncFileContents = syncFileContents;
- mLocalChangeAlreadyKnown = localChangeAlreadyKnown;
mContext = context;
}
mContext = context;
}
@@
-119,7
+116,7
@@
public class SynchronizeFileOperation extends RemoteOperation {
// server without etags
serverChanged = (mServerFile.getModificationTimestamp() > mLocalFile.getModificationTimestampAtLastSyncForData());
//}
// server without etags
serverChanged = (mServerFile.getModificationTimestamp() > mLocalFile.getModificationTimestampAtLastSyncForData());
//}
- boolean localChanged = (mLocal
ChangeAlreadyKnown || mLocal
File.getLocalModificationTimestamp() > mLocalFile.getLastSyncDateForData());
+ boolean localChanged = (mLocalFile.getLocalModificationTimestamp() > mLocalFile.getLastSyncDateForData());
// TODO this will be always true after the app is upgraded to database version 2; will result in unnecessary uploads
/// decide action to perform depending upon changes
// TODO this will be always true after the app is upgraded to database version 2; will result in unnecessary uploads
/// decide action to perform depending upon changes
diff --git
a/src/com/owncloud/android/operations/SynchronizeFolderOperation.java
b/src/com/owncloud/android/operations/SynchronizeFolderOperation.java
index
91047ce
..
d1dd3c4
100644
(file)
--- a/
src/com/owncloud/android/operations/SynchronizeFolderOperation.java
+++ b/
src/com/owncloud/android/operations/SynchronizeFolderOperation.java
@@
-307,7
+307,6
@@
public class SynchronizeFolderOperation extends RemoteOperation {
mStorageManager,
mAccount,
true,
mStorageManager,
mAccount,
true,
- false,
mContext
);
filesToSyncContents.add(operation);
mContext
);
filesToSyncContents.add(operation);
diff --git
a/src/com/owncloud/android/ui/fragment/FileDetailFragment.java
b/src/com/owncloud/android/ui/fragment/FileDetailFragment.java
index
1c076da
..
9de098b
100644
(file)
--- a/
src/com/owncloud/android/ui/fragment/FileDetailFragment.java
+++ b/
src/com/owncloud/android/ui/fragment/FileDetailFragment.java
@@
-446,7
+446,7
@@
public class FileDetailFragment extends FileFragment implements
}
} else {
}
} else {
- mLastRemoteOperation = new SynchronizeFileOperation(file, null, mStorageManager, mAccount, true,
false,
getActivity());
+ mLastRemoteOperation = new SynchronizeFileOperation(file, null, mStorageManager, mAccount, true, getActivity());
mLastRemoteOperation.execute(mAccount, getSherlockActivity(), this, mHandler, getSherlockActivity());
// update ui
mLastRemoteOperation.execute(mAccount, getSherlockActivity(), this, mHandler, getSherlockActivity());
// update ui
diff --git
a/src/com/owncloud/android/ui/fragment/OCFileListFragment.java
b/src/com/owncloud/android/ui/fragment/OCFileListFragment.java
index
06b6464
..
2627f93
100644
(file)
--- a/
src/com/owncloud/android/ui/fragment/OCFileListFragment.java
+++ b/
src/com/owncloud/android/ui/fragment/OCFileListFragment.java
@@
-315,7
+315,7
@@
public class OCFileListFragment extends ExtendedListFragment implements EditName
}
case R.id.action_sync_file: {
Account account = AccountUtils.getCurrentOwnCloudAccount(getSherlockActivity());
}
case R.id.action_sync_file: {
Account account = AccountUtils.getCurrentOwnCloudAccount(getSherlockActivity());
- RemoteOperation operation = new SynchronizeFileOperation(mTargetFile, null, mContainerActivity.getStorageManager(), account, true,
false,
getSherlockActivity());
+ RemoteOperation operation = new SynchronizeFileOperation(mTargetFile, null, mContainerActivity.getStorageManager(), account, true, getSherlockActivity());
operation.execute(account, getSherlockActivity(), mContainerActivity, mHandler, getSherlockActivity());
((FileDisplayActivity) getSherlockActivity()).showLoadingDialog();
return true;
operation.execute(account, getSherlockActivity(), mContainerActivity, mHandler, getSherlockActivity());
((FileDisplayActivity) getSherlockActivity()).showLoadingDialog();
return true;