mirror of
https://github.com/nextcloud/android.git
synced 2024-11-23 13:45:35 +03:00
Show password dialog
This commit is contained in:
parent
b08e9e35e6
commit
9e55ef9585
1 changed files with 6 additions and 1 deletions
|
@ -58,7 +58,9 @@ import com.owncloud.android.operations.SynchronizeFolderOperation;
|
|||
import com.owncloud.android.operations.UnshareLinkOperation;
|
||||
import com.owncloud.android.services.OperationsService;
|
||||
import com.owncloud.android.services.OperationsService.OperationsServiceBinder;
|
||||
import com.owncloud.android.ui.dialog.CreateFolderDialogFragment;
|
||||
import com.owncloud.android.ui.dialog.LoadingDialog;
|
||||
import com.owncloud.android.ui.dialog.SharePasswordDialogFragment;
|
||||
import com.owncloud.android.utils.ErrorMessageAdapter;
|
||||
|
||||
|
||||
|
@ -79,6 +81,7 @@ public class FileActivity extends SherlockFragmentActivity
|
|||
|
||||
private static final String DIALOG_WAIT_TAG = "DIALOG_WAIT";
|
||||
private static final String KEY_WAITING_FOR_OP_ID = "WAITING_FOR_OP_ID";
|
||||
private static final String DIALOG_SHARE_PASSWORD = "DIALOG_SHARE_PASSWORD";
|
||||
|
||||
protected static final long DELAY_TO_REQUEST_OPERATION_ON_ACTIVITY_RESULTS = 200;
|
||||
|
||||
|
@ -490,7 +493,9 @@ public class FileActivity extends SherlockFragmentActivity
|
|||
} else {
|
||||
// TODO Detect Failure (403) --> needs Password
|
||||
if (result.getCode() == ResultCode.SHARE_FORBIDDEN) {
|
||||
|
||||
SharePasswordDialogFragment dialog =
|
||||
SharePasswordDialogFragment.newInstance(getFile());
|
||||
dialog.show(getSupportFragmentManager(), DIALOG_SHARE_PASSWORD);
|
||||
} else {
|
||||
Toast t = Toast.makeText(this, ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()),
|
||||
Toast.LENGTH_LONG);
|
||||
|
|
Loading…
Reference in a new issue