mirror of
https://github.com/nextcloud/android.git
synced 2024-11-23 05:35:39 +03:00
Check if e2e is available in DocumentsStorageProvider
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
parent
ee78494df5
commit
64ca4b1858
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