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.FileUploader.FileUploaderBinder;
import com.owncloud.android.operations.CreateFolderOperation;
-import com.owncloud.android.operations.GetSharedFilesOperation;
+import com.owncloud.android.operations.GetSharesOperation;
-import com.owncloud.android.lib.accounts.OwnCloudAccount;
import com.owncloud.android.lib.operations.common.OnRemoteOperationListener;
import com.owncloud.android.lib.operations.common.RemoteOperation;
import com.owncloud.android.lib.operations.common.RemoteOperationResult;
/// get the shared files
if (isSharedSupported()) {
- startGetSharedFiles();
+ startGetShares();
}
String synchFolderRemotePath = intent.getStringExtra(FileSyncService.SYNC_FOLDER_REMOTE_PATH);
} else if (operation instanceof CreateFolderOperation) {
onCreateFolderOperationFinish((CreateFolderOperation)operation, result);
- } else if (operation instanceof GetSharedFilesOperation) {
- onGetSharedFilesOperationFinish((GetSharedFilesOperation) operation, result);
+ } else if (operation instanceof GetSharesOperation) {
+ onGetSharesOperationFinish((GetSharesOperation) operation, result);
}
}
* @param operation Get Shared Files
* @param result Result of the operation
*/
- private void onGetSharedFilesOperationFinish(GetSharedFilesOperation operation, RemoteOperationResult result) {
+ private void onGetSharesOperationFinish(GetSharesOperation operation, RemoteOperationResult result) {
// Refresh the filelist with the information
refeshListOfFilesFragment();
}
- private void startGetSharedFiles() {
+ private void startGetShares() {
// Get shared files/folders
- 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);
+ RemoteOperation getShares = new GetSharesOperation(mStorageManager);
+ getShares.execute(getAccount(), this, this, mHandler, this);
mRefreshSharesInProgress = true;
setSupportProgressBarIndeterminateVisibility(true);