import java.io.File;
import android.accounts.Account;
+import android.accounts.AccountManager;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.ProgressDialog;
import com.owncloud.android.files.services.FileDownloader.FileDownloaderBinder;
import com.owncloud.android.files.services.FileUploader.FileUploaderBinder;
import com.owncloud.android.operations.CreateFolderOperation;
+import com.owncloud.android.oc_framework.accounts.OwnCloudAccount;
import com.owncloud.android.oc_framework.operations.OnRemoteOperationListener;
import com.owncloud.android.oc_framework.operations.RemoteOperation;
import com.owncloud.android.oc_framework.operations.RemoteOperationResult;
setFile(file);
setNavigationListWithFolder(file);
- /// get the shared files
- if (isSharedSupported()) {
- startGetSharedFiles();
- }
-
if (!stateWasRecovered) {
Log_OC.e(TAG, "Initializing Fragments in onAccountChanged..");
initFragmentsWithFile();
&& mStorageManager != null
) {
+ /// get the shared files
+ if (isSharedSupported()) {
+ startGetSharedFiles();
+ }
+
String synchFolderRemotePath = intent.getStringExtra(FileSyncService.SYNC_FOLDER_REMOTE_PATH);
OCFile currentFile = (getFile() == null) ? null : mStorageManager.getFileByPath(getFile().getRemotePath());
// TODO
// Refresh the filelist with the information
refeshListOfFilesFragment();
+// OCFileListFragment fileListFragment = getListOfFilesFragment();
+// if (fileListFragment != null) {
+// fileListFragment.listDirectory(getCurrentDir());
+// }
}
private void startGetSharedFiles() {
// Get shared files/folders
- RemoteOperation getSharedFiles = new GetSharedFilesOperation();
- getSharedFiles.execute(getAccount(), this, null, null, this);
+ AccountManager accountMngr = AccountManager.get(this);
+ String urlServer = accountMngr.getUserData(getAccount(), OwnCloudAccount.Constants.KEY_OC_BASE_URL);
+
+ RemoteOperation getSharedFiles = new GetSharedFilesOperation(urlServer, mStorageManager);
+ getSharedFiles.execute(getAccount(), this, this, mHandler, this);
}