mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 23:28:42 +03:00
Merge pull request #10968 from nextcloud/e2eDocumentNotSetup
Check if e2e is available in DocumentsStorageProvider
This commit is contained in:
commit
5fe237033f
1 changed files with 10 additions and 1 deletions
|
@ -70,6 +70,7 @@ import com.owncloud.android.operations.RefreshFolderOperation;
|
|||
import com.owncloud.android.operations.RemoveFileOperation;
|
||||
import com.owncloud.android.operations.RenameFileOperation;
|
||||
import com.owncloud.android.ui.activity.SettingsActivity;
|
||||
import com.owncloud.android.ui.helpers.FileOperationsHelper;
|
||||
import com.owncloud.android.utils.FileStorageUtils;
|
||||
import com.owncloud.android.utils.FileUtil;
|
||||
import com.owncloud.android.utils.MimeTypeUtil;
|
||||
|
@ -165,9 +166,17 @@ public class DocumentsStorageProvider extends DocumentsProvider {
|
|||
|
||||
Context context = getNonNullContext();
|
||||
Document parentFolder = toDocument(parentDocumentId);
|
||||
FileDataStorageManager storageManager = parentFolder.getStorageManager();
|
||||
final FileCursor resultCursor = new FileCursor(projection);
|
||||
|
||||
if (parentFolder.getFile().isEncrypted() &&
|
||||
!FileOperationsHelper.isEndToEndEncryptionSetup(context, parentFolder.getUser())) {
|
||||
Toast.makeText(context, R.string.e2e_not_yet_setup, Toast.LENGTH_LONG).show();
|
||||
return resultCursor;
|
||||
}
|
||||
|
||||
FileDataStorageManager storageManager = parentFolder.getStorageManager();
|
||||
|
||||
|
||||
for (OCFile file : storageManager.getFolderContent(parentFolder.getFile(), false)) {
|
||||
resultCursor.addFile(new Document(storageManager, file));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue