projects
/
pub
/
Android
/
ownCloud.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Process share with password
[pub/Android/ownCloud.git]
/
src
/
com
/
owncloud
/
android
/
ui
/
activity
/
FileActivity.java
diff --git
a/src/com/owncloud/android/ui/activity/FileActivity.java
b/src/com/owncloud/android/ui/activity/FileActivity.java
index
34ce583
..
8eb20e4
100644
(file)
--- a/
src/com/owncloud/android/ui/activity/FileActivity.java
+++ b/
src/com/owncloud/android/ui/activity/FileActivity.java
@@
-1,6
+1,9
@@
-/* ownCloud Android client application
+/**
+ * ownCloud Android client application
+ *
+ * @author David A. Velasco
* Copyright (C) 2011 Bartek Przybylski
* Copyright (C) 2011 Bartek Przybylski
- * Copyright (C) 201
2-201
5 ownCloud Inc.
+ * Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
@@
-66,8
+69,6
@@
import com.owncloud.android.utils.ErrorMessageAdapter;
/**
* Activity with common behaviour for activities handling {@link OCFile}s in ownCloud {@link Account}s .
/**
* Activity with common behaviour for activities handling {@link OCFile}s in ownCloud {@link Account}s .
- *
- * @author David A. Velasco
*/
public class FileActivity extends SherlockFragmentActivity
implements OnRemoteOperationListener, ComponentsGetter {
*/
public class FileActivity extends SherlockFragmentActivity
implements OnRemoteOperationListener, ComponentsGetter {
@@
-363,8
+364,6
@@
public class FileActivity extends SherlockFragmentActivity
* a new ownCloud {@link Account} finished, successfully or not.
*
* At this moment, only called after the creation of the first account.
* a new ownCloud {@link Account} finished, successfully or not.
*
* At this moment, only called after the creation of the first account.
- *
- * @author David A. Velasco
*/
public class AccountCreationCallback implements AccountManagerCallback<Bundle> {
*/
public class AccountCreationCallback implements AccountManagerCallback<Bundle> {
@@
-454,7
+453,8
@@
public class FileActivity extends SherlockFragmentActivity
if (result.getCode() == ResultCode.UNAUTHORIZED) {
dismissLoadingDialog();
if (result.getCode() == ResultCode.UNAUTHORIZED) {
dismissLoadingDialog();
- Toast t = Toast.makeText(this, ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()),
+ Toast t = Toast.makeText(this, ErrorMessageAdapter.getErrorCauseMessage(result,
+ operation, getResources()),
Toast.LENGTH_LONG);
t.show();
}
Toast.LENGTH_LONG);
t.show();
}
@@
-482,7
+482,8
@@
public class FileActivity extends SherlockFragmentActivity
}
}
- private void onCreateShareOperationFinish(CreateShareOperation operation, RemoteOperationResult result) {
+ private void onCreateShareOperationFinish(CreateShareOperation operation,
+ RemoteOperationResult result) {
dismissLoadingDialog();
if (result.isSuccess()) {
updateFileFromDB();
dismissLoadingDialog();
if (result.isSuccess()) {
updateFileFromDB();
@@
-491,13
+492,15
@@
public class FileActivity extends SherlockFragmentActivity
startActivity(sendIntent);
} else {
startActivity(sendIntent);
} else {
- //
TODO
Detect Failure (403) --> needs Password
+ // Detect Failure (403) --> needs Password
if (result.getCode() == ResultCode.SHARE_FORBIDDEN) {
SharePasswordDialogFragment dialog =
if (result.getCode() == ResultCode.SHARE_FORBIDDEN) {
SharePasswordDialogFragment dialog =
- SharePasswordDialogFragment.newInstance(getFile());
+ SharePasswordDialogFragment.newInstance( new OCFile(operation.getPath()),
+ operation.getSendIntent());
dialog.show(getSupportFragmentManager(), DIALOG_SHARE_PASSWORD);
} else {
dialog.show(getSupportFragmentManager(), DIALOG_SHARE_PASSWORD);
} else {
- Toast t = Toast.makeText(this, ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()),
+ Toast t = Toast.makeText(this,
+ ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()),
Toast.LENGTH_LONG);
t.show();
}
Toast.LENGTH_LONG);
t.show();
}