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:
65c7d5d
)
WIP - commented pull-refreshes of list view as previous step to trust refresh to...
author
David A. Velasco
<dvelasco@solidgear.es>
Tue, 29 Apr 2014 11:53:11 +0000
(13:53 +0200)
committer
David A. Velasco
<dvelasco@solidgear.es>
Tue, 29 Apr 2014 11:53:11 +0000
(13:53 +0200)
src/com/owncloud/android/datamodel/FileDataStorageManager.java
patch
|
blob
|
blame
|
history
src/com/owncloud/android/providers/FileContentProvider.java
patch
|
blob
|
blame
|
history
src/com/owncloud/android/ui/activity/FileDisplayActivity.java
patch
|
blob
|
blame
|
history
src/com/owncloud/android/ui/fragment/FileDetailFragment.java
patch
|
blob
|
blame
|
history
diff --git
a/src/com/owncloud/android/datamodel/FileDataStorageManager.java
b/src/com/owncloud/android/datamodel/FileDataStorageManager.java
index
cc4fa95
..
04f3271
100644
(file)
--- a/
src/com/owncloud/android/datamodel/FileDataStorageManager.java
+++ b/
src/com/owncloud/android/datamodel/FileDataStorageManager.java
@@
-611,6
+611,7
@@
public class FileDataStorageManager {
public Cursor getContent(long parentId) {
public Cursor getContent(long parentId) {
+ Log_OC.d(TAG, "getContent start");
Uri req_uri = Uri.withAppendedPath(
ProviderTableMeta.CONTENT_URI_DIR,
String.valueOf(parentId));
Uri req_uri = Uri.withAppendedPath(
ProviderTableMeta.CONTENT_URI_DIR,
String.valueOf(parentId));
@@
-629,8
+630,11
@@
public class FileDataStorageManager {
c = getContentResolver().query(req_uri, null,
ProviderTableMeta.FILE_PARENT + "=?" ,
new String[] { String.valueOf(parentId)}, null);
c = getContentResolver().query(req_uri, null,
ProviderTableMeta.FILE_PARENT + "=?" ,
new String[] { String.valueOf(parentId)}, null);
+
+ //c.setNotificationUri(getContentResolver(), req_uri);
}
}
+ Log_OC.d(TAG, "getContent end");
return c;
}
return c;
}
diff --git
a/src/com/owncloud/android/providers/FileContentProvider.java
b/src/com/owncloud/android/providers/FileContentProvider.java
index
54e67a2
..
c84d66b
100644
(file)
--- a/
src/com/owncloud/android/providers/FileContentProvider.java
+++ b/
src/com/owncloud/android/providers/FileContentProvider.java
@@
-99,6
+99,8
@@
public class FileContentProvider extends ContentProvider {
private static final int DIRECTORY = 2;
private static final int ROOT_DIRECTORY = 3;
private static final int SHARES = 4;
private static final int DIRECTORY = 2;
private static final int ROOT_DIRECTORY = 3;
private static final int SHARES = 4;
+
+ private static final String TAG = FileContentProvider.class.getSimpleName();
// Projection for ocshares table
private static HashMap<String, String> mOCSharesProjectionMap;
// Projection for ocshares table
private static HashMap<String, String> mOCSharesProjectionMap;
@@
-414,6
+416,7
@@
public class FileContentProvider extends ContentProvider {
// DB case_sensitive
db.execSQL("PRAGMA case_sensitive_like = true");
Cursor c = sqlQuery.query(db, projection, selection, selectionArgs, null, null, order);
// DB case_sensitive
db.execSQL("PRAGMA case_sensitive_like = true");
Cursor c = sqlQuery.query(db, projection, selection, selectionArgs, null, null, order);
+ Log_OC.d(TAG, "setting notification URI: " + uri);
c.setNotificationUri(getContext().getContentResolver(), uri);
return c;
}
c.setNotificationUri(getContext().getContentResolver(), uri);
return c;
}
diff --git
a/src/com/owncloud/android/ui/activity/FileDisplayActivity.java
b/src/com/owncloud/android/ui/activity/FileDisplayActivity.java
index
f6136ed
..
c594717
100644
(file)
--- a/
src/com/owncloud/android/ui/activity/FileDisplayActivity.java
+++ b/
src/com/owncloud/android/ui/activity/FileDisplayActivity.java
@@
-215,7
+215,9
@@
OCFileListFragment.ContainerActivity, FileDetailFragment.ContainerActivity, OnNa
protected void onStart() {
super.onStart();
getSupportActionBar().setIcon(DisplayUtils.getSeasonalIconId());
protected void onStart() {
super.onStart();
getSupportActionBar().setIcon(DisplayUtils.getSeasonalIconId());
+ /*
refeshListOfFilesFragment();
refeshListOfFilesFragment();
+ */
}
@Override
}
@Override
@@
-416,12
+418,14
@@
OCFileListFragment.ContainerActivity, FileDetailFragment.ContainerActivity, OnNa
updateNavigationElementsInActionBar(null);
}
updateNavigationElementsInActionBar(null);
}
+ /* TODO WIP COMMENT
protected void refeshListOfFilesFragment() {
OCFileListFragment fileListFragment = getListOfFilesFragment();
if (fileListFragment != null) {
fileListFragment.listDirectory();
}
}
protected void refeshListOfFilesFragment() {
OCFileListFragment fileListFragment = getListOfFilesFragment();
if (fileListFragment != null) {
fileListFragment.listDirectory();
}
}
+ */
protected void refreshSecondFragment(String downloadEvent, String downloadedRemotePath, boolean success) {
FileFragment secondFragment = getSecondFragment();
protected void refreshSecondFragment(String downloadEvent, String downloadedRemotePath, boolean success) {
FileFragment secondFragment = getSecondFragment();
@@
-940,13
+944,15
@@
OCFileListFragment.ContainerActivity, FileDetailFragment.ContainerActivity, OnNa
cleanSecondFragment();
currentFile = currentDir;
}
cleanSecondFragment();
currentFile = currentDir;
}
-
+
+ /* TODO WIP COMMENT
if (synchFolderRemotePath != null && currentDir.getRemotePath().equals(synchFolderRemotePath)) {
OCFileListFragment fileListFragment = getListOfFilesFragment();
if (fileListFragment != null) {
fileListFragment.listDirectory(currentDir);
}
}
if (synchFolderRemotePath != null && currentDir.getRemotePath().equals(synchFolderRemotePath)) {
OCFileListFragment fileListFragment = getListOfFilesFragment();
if (fileListFragment != null) {
fileListFragment.listDirectory(currentDir);
}
}
+ */
setFile(currentFile);
}
setFile(currentFile);
}
@@
-999,7
+1005,9
@@
OCFileListFragment.ContainerActivity, FileDetailFragment.ContainerActivity, OnNa
OCFile currentDir = getCurrentDir();
boolean isDescendant = (currentDir != null) && (uploadedRemotePath != null) && (uploadedRemotePath.startsWith(currentDir.getRemotePath()));
if (sameAccount && isDescendant) {
OCFile currentDir = getCurrentDir();
boolean isDescendant = (currentDir != null) && (uploadedRemotePath != null) && (uploadedRemotePath.startsWith(currentDir.getRemotePath()));
if (sameAccount && isDescendant) {
+ /*
refeshListOfFilesFragment();
refeshListOfFilesFragment();
+ */
}
}
}
}
@@
-1020,7
+1028,9
@@
OCFileListFragment.ContainerActivity, FileDetailFragment.ContainerActivity, OnNa
boolean isDescendant = isDescendant(downloadedRemotePath);
if (sameAccount && isDescendant) {
boolean isDescendant = isDescendant(downloadedRemotePath);
if (sameAccount && isDescendant) {
+ /* TODO WIP COMMENT
refeshListOfFilesFragment();
refeshListOfFilesFragment();
+ */
refreshSecondFragment(intent.getAction(), downloadedRemotePath, intent.getBooleanExtra(FileDownloader.EXTRA_DOWNLOAD_RESULT, false));
}
refreshSecondFragment(intent.getAction(), downloadedRemotePath, intent.getBooleanExtra(FileDownloader.EXTRA_DOWNLOAD_RESULT, false));
}
@@
-1069,7
+1079,9
@@
OCFileListFragment.ContainerActivity, FileDetailFragment.ContainerActivity, OnNa
if (getAccount() != null && account.name.equals(getAccount().name)
&& getStorageManager() != null
) {
if (getAccount() != null && account.name.equals(getAccount().name)
&& getStorageManager() != null
) {
+ /*
refeshListOfFilesFragment();
refeshListOfFilesFragment();
+ */
}
if ((getSharesResult != null) &&
RemoteOperationResult.ResultCode.SSL_RECOVERABLE_PEER_UNVERIFIED.equals(getSharesResult.getCode())) {
}
if ((getSharesResult != null) &&
RemoteOperationResult.ResultCode.SSL_RECOVERABLE_PEER_UNVERIFIED.equals(getSharesResult.getCode())) {
@@
-1224,10
+1236,13
@@
OCFileListFragment.ContainerActivity, FileDetailFragment.ContainerActivity, OnNa
/**
* {@inheritDoc}
*/
/**
* {@inheritDoc}
*/
+
@Override
public void onFileStateChanged() {
@Override
public void onFileStateChanged() {
+ /* TODO WIP COMMENT
refeshListOfFilesFragment();
updateNavigationElementsInActionBar(getSecondFragment().getFile());
refeshListOfFilesFragment();
updateNavigationElementsInActionBar(getSecondFragment().getFile());
+ */
}
}
@@
-1362,7
+1377,9
@@
OCFileListFragment.ContainerActivity, FileDetailFragment.ContainerActivity, OnNa
private void onCreateShareOperationFinish(CreateShareOperation operation, RemoteOperationResult result) {
if (result.isSuccess()) {
refreshShowDetails();
private void onCreateShareOperationFinish(CreateShareOperation operation, RemoteOperationResult result) {
if (result.isSuccess()) {
refreshShowDetails();
+ /* TODO WIP COMMENT
refeshListOfFilesFragment();
refeshListOfFilesFragment();
+ */
}
}
}
}
@@
-1370,10
+1387,14
@@
OCFileListFragment.ContainerActivity, FileDetailFragment.ContainerActivity, OnNa
private void onUnshareLinkOperationFinish(UnshareLinkOperation operation, RemoteOperationResult result) {
if (result.isSuccess()) {
refreshShowDetails();
private void onUnshareLinkOperationFinish(UnshareLinkOperation operation, RemoteOperationResult result) {
if (result.isSuccess()) {
refreshShowDetails();
+ /*
refeshListOfFilesFragment();
refeshListOfFilesFragment();
+ */
} else if (result.getCode() == ResultCode.SHARE_NOT_FOUND) {
cleanSecondFragment();
} else if (result.getCode() == ResultCode.SHARE_NOT_FOUND) {
cleanSecondFragment();
+ /*
refeshListOfFilesFragment();
refeshListOfFilesFragment();
+ */
}
}
}
}
@@
-1413,7
+1434,9
@@
OCFileListFragment.ContainerActivity, FileDetailFragment.ContainerActivity, OnNa
cleanSecondFragment();
}
if (getStorageManager().getFileById(removedFile.getParentId()).equals(getCurrentDir())) {
cleanSecondFragment();
}
if (getStorageManager().getFileById(removedFile.getParentId()).equals(getCurrentDir())) {
+ /*
refeshListOfFilesFragment();
refeshListOfFilesFragment();
+ */
}
} else {
}
} else {
@@
-1435,7
+1458,9
@@
OCFileListFragment.ContainerActivity, FileDetailFragment.ContainerActivity, OnNa
private void onCreateFolderOperationFinish(CreateFolderOperation operation, RemoteOperationResult result) {
if (result.isSuccess()) {
dismissLoadingDialog();
private void onCreateFolderOperationFinish(CreateFolderOperation operation, RemoteOperationResult result) {
if (result.isSuccess()) {
dismissLoadingDialog();
+ /* TODO WIP COMMENT
refeshListOfFilesFragment();
refeshListOfFilesFragment();
+ */
} else {
dismissLoadingDialog();
} else {
dismissLoadingDialog();
@@
-1472,7
+1497,9
@@
OCFileListFragment.ContainerActivity, FileDetailFragment.ContainerActivity, OnNa
}
}
if (getStorageManager().getFileById(renamedFile.getParentId()).equals(getCurrentDir())) {
}
}
if (getStorageManager().getFileById(renamedFile.getParentId()).equals(getCurrentDir())) {
+ /*
refeshListOfFilesFragment();
refeshListOfFilesFragment();
+ */
}
} else {
}
} else {
@@
-1509,7
+1536,9
@@
OCFileListFragment.ContainerActivity, FileDetailFragment.ContainerActivity, OnNa
} else {
if (operation.transferWasRequested()) {
} else {
if (operation.transferWasRequested()) {
+ /*
refeshListOfFilesFragment();
refeshListOfFilesFragment();
+ */
onTransferStateChanged(syncedFile, true, true);
} else {
onTransferStateChanged(syncedFile, true, true);
} else {
diff --git
a/src/com/owncloud/android/ui/fragment/FileDetailFragment.java
b/src/com/owncloud/android/ui/fragment/FileDetailFragment.java
index
dc8c9f6
..
ddbaca3
100644
(file)
--- a/
src/com/owncloud/android/ui/fragment/FileDetailFragment.java
+++ b/
src/com/owncloud/android/ui/fragment/FileDetailFragment.java
@@
-854,7
+854,9
@@
public class FileDetailFragment extends FileFragment implements
if (result.isSuccess()) {
updateFileDetails(((RenameFileOperation)operation).getFile(), mAccount);
if (result.isSuccess()) {
updateFileDetails(((RenameFileOperation)operation).getFile(), mAccount);
+ /* TODO WIP COMMENT
mContainerActivity.onFileStateChanged();
mContainerActivity.onFileStateChanged();
+ */
} else {
if (result.getCode().equals(ResultCode.INVALID_LOCAL_FILE_NAME)) {
} else {
if (result.getCode().equals(ResultCode.INVALID_LOCAL_FILE_NAME)) {
@@
-896,8
+898,10
@@
public class FileDetailFragment extends FileFragment implements
} else {
if (operation.transferWasRequested()) {
setButtonsForTransferring();
} else {
if (operation.transferWasRequested()) {
setButtonsForTransferring();
+ /* TODO WIP COMMENT
mContainerActivity.onFileStateChanged(); // this is not working; FileDownloader won't do NOTHING at all until this method finishes, so
// checking the service to see if the file is downloading results in FALSE
mContainerActivity.onFileStateChanged(); // this is not working; FileDownloader won't do NOTHING at all until this method finishes, so
// checking the service to see if the file is downloading results in FALSE
+ */
} else {
Toast msg = Toast.makeText(getActivity(), R.string.sync_file_nothing_to_do_msg, Toast.LENGTH_LONG);
msg.show();
} else {
Toast msg = Toast.makeText(getActivity(), R.string.sync_file_nothing_to_do_msg, Toast.LENGTH_LONG);
msg.show();