/packages/apps/DocumentsUI/tests/common/com/android/documentsui/testing/ |
D | TestEnv.java | 30 import com.android.documentsui.base.DocumentInfo; 46 public static DocumentInfo FOLDER_0; 47 public static DocumentInfo FOLDER_1; 48 public static DocumentInfo FOLDER_2; 49 public static DocumentInfo FILE_TXT; 50 public static DocumentInfo FILE_PNG; 51 public static DocumentInfo FILE_JPG; 52 public static DocumentInfo FILE_GIF; 53 public static DocumentInfo FILE_PDF; 54 public static DocumentInfo FILE_MP4; [all …]
|
D | TestDocumentsAccess.java | 27 import com.android.documentsui.base.DocumentInfo; 36 public @Nullable DocumentInfo nextRootDocument; 37 public @Nullable DocumentInfo nextDocument; 38 public @Nullable List<DocumentInfo> nextDocuments; 45 private Pair<DocumentInfo, DocumentInfo> mLastCreatedDoc; 48 public DocumentInfo getRootDocument(RootInfo root) { in getRootDocument() 53 public DocumentInfo getDocument(Uri uri) { in getDocument() 58 public List<DocumentInfo> getDocuments(String authority, List<String> docIds) { in getDocuments() 63 public Uri createDocument(DocumentInfo parentDoc, String mimeType, String displayName) { in createDocument() 64 final DocumentInfo child = new DocumentInfo(); in createDocument() [all …]
|
D | TestModel.java | 26 import com.android.documentsui.base.DocumentInfo; 72 public DocumentInfo createFile(String name) { in createFile() 80 public DocumentInfo createFile(String name, int flags) { in createFile() 87 public DocumentInfo createFolder(String name) { in createFolder() 96 public DocumentInfo createFolder(String name, int flags) { in createFolder() 103 public DocumentInfo createDocument(String name, String mimeType, int flags) { in createDocument() 104 DocumentInfo doc = new DocumentInfo(); in createDocument() 118 private void addToCursor(DocumentInfo doc) { in addToCursor()
|
/packages/apps/DocumentsUI/tests/common/com/android/documentsui/ |
D | DocumentsProviderHelper.java | 26 import static com.android.documentsui.base.DocumentInfo.getCursorString; 49 import com.android.documentsui.base.DocumentInfo; 176 List<DocumentInfo> children = listChildren(parentUri); in assertChildCount() 181 List<DocumentInfo> children = listChildren(parentId, -1); in assertChildCount() 190 List<DocumentInfo> children = listChildren(parentUri); in assertHasFile() 191 for (DocumentInfo child : children) { in assertHasFile() 209 List<DocumentInfo> children = listChildren(parentUri); in assertHasDirectory() 210 for (DocumentInfo child : children) { in assertHasDirectory() 228 List<DocumentInfo> children = listChildren(parentUri); in assertDoesNotExist() 229 for (DocumentInfo child : children) { in assertDoesNotExist() [all …]
|
/packages/apps/DocumentsUI/src/com/android/documentsui/base/ |
D | DocumentInfo.java | 53 public class DocumentInfo implements Durable, Parcelable { class 71 public DocumentInfo() { in DocumentInfo() method in DocumentInfo 136 public static final Creator<DocumentInfo> CREATOR = new Creator<DocumentInfo>() { 138 public DocumentInfo createFromParcel(Parcel in) { 139 final DocumentInfo doc = new DocumentInfo(); 145 public DocumentInfo[] newArray(int size) { 146 return new DocumentInfo[size]; 150 public static DocumentInfo fromDirectoryCursor(Cursor cursor) { in fromDirectoryCursor() 156 public static DocumentInfo fromCursor(Cursor cursor, String authority) { in fromCursor() 158 final DocumentInfo info = new DocumentInfo(); in fromCursor() [all …]
|
D | DocumentStack.java | 55 private LinkedList<DocumentInfo> mList; 68 public DocumentStack(RootInfo root, DocumentInfo... docs) { in DocumentStack() 81 public DocumentStack(RootInfo root, List<DocumentInfo> docs) { in DocumentStack() 90 public DocumentStack(DocumentStack src, DocumentInfo... docs) { in DocumentStack() 92 for (DocumentInfo doc : docs) { in DocumentStack() 116 public DocumentInfo peek() { in peek() 123 public DocumentInfo get(int index) { in get() 127 public void push(DocumentInfo info) { in push() 136 public DocumentInfo pop() { in pop() 140 final DocumentInfo result = mList.removeLast(); in pop() [all …]
|
/packages/apps/DocumentsUI/src/com/android/documentsui/ |
D | DocumentsAccess.java | 35 import com.android.documentsui.base.DocumentInfo; 48 @Nullable DocumentInfo getRootDocument(RootInfo root); in getRootDocument() 49 @Nullable DocumentInfo getDocument(Uri uri); in getDocument() 50 @Nullable DocumentInfo getArchiveDocument(Uri uri); in getArchiveDocument() 55 List<DocumentInfo> getDocuments(String authority, List<String> docIds) throws RemoteException; in getDocuments() 57 @Nullable Uri createDocument(DocumentInfo parentDoc, String mimeType, String displayName); in createDocument() 74 public @Nullable DocumentInfo getRootDocument(RootInfo root) { in getRootDocument() 80 public @Nullable DocumentInfo getDocument(Uri uri) { in getDocument() 82 return DocumentInfo.fromUri(mContext.getContentResolver(), uri); in getDocument() 91 public List<DocumentInfo> getDocuments(String authority, List<String> docIds) in getDocuments() [all …]
|
D | ActionHandler.java | 30 import com.android.documentsui.base.DocumentInfo; 75 void getRootDocument(RootInfo root, int timeout, Consumer<DocumentInfo> callback); in getRootDocument() 81 void refreshDocument(DocumentInfo doc, BooleanConsumer callback); in refreshDocument() 110 void showInspector(DocumentInfo doc); in showInspector() 112 @Nullable DocumentInfo renameDocument(String name, DocumentInfo document); in renameDocument() 125 void springOpenDirectory(DocumentInfo doc); in springOpenDirectory() 127 void showChooserForDoc(DocumentInfo doc); in showChooserForDoc() 129 void openRootDocument(@Nullable DocumentInfo rootDoc); in openRootDocument() 131 void openContainerDocument(DocumentInfo doc); in openContainerDocument()
|
D | DragAndDropManager.java | 32 import com.android.documentsui.base.DocumentInfo; 80 List<DocumentInfo> srcs, in startDrag() 85 @Nullable DocumentInfo parent); in startDrag() 93 boolean canSpringOpen(RootInfo root, DocumentInfo doc); in canSpringOpen() 112 View v, RootInfo destRoot, @Nullable DocumentInfo destDoc); in updateState() 179 private DocumentInfo mDestDoc; 229 List<DocumentInfo> srcs, in startDrag() 234 @Nullable DocumentInfo parent) { in startDrag() 241 for (DocumentInfo doc : srcs) { in startDrag() 266 private void updateShadow(List<DocumentInfo> srcs, IconHelper iconHelper) { in updateShadow() [all …]
|
D | AbstractActionHandler.java | 19 import static com.android.documentsui.base.DocumentInfo.getCursorInt; 20 import static com.android.documentsui.base.DocumentInfo.getCursorString; 49 import com.android.documentsui.base.DocumentInfo; 185 public void getRootDocument(RootInfo root, int timeout, Consumer<DocumentInfo> callback) { in getRootDocument() 197 public void refreshDocument(DocumentInfo doc, BooleanConsumer callback) { in refreshDocument() 237 public void showInspector(DocumentInfo doc) { in showInspector() 242 public void springOpenDirectory(DocumentInfo doc) { in springOpenDirectory() 318 public DocumentInfo renameDocument(String name, DocumentInfo document) { in renameDocument() 323 public void showChooserForDoc(DocumentInfo doc) { in showChooserForDoc() 328 public void openRootDocument(@Nullable DocumentInfo rootDoc) { in openRootDocument() [all …]
|
D | Model.java | 19 import static com.android.documentsui.base.DocumentInfo.getCursorString; 37 import com.android.documentsui.base.DocumentInfo; 61 public @Nullable DocumentInfo doc; 203 public List<DocumentInfo> getDocuments(Selection<String> selection) { in getDocuments() 207 public @Nullable DocumentInfo getDocument(String modelId) { in getDocument() 211 : DocumentInfo.fromDirectoryCursor(cursor); in getDocument() 214 public List<DocumentInfo> loadDocuments(Selection<String> selection, Predicate<Cursor> filter) { in loadDocuments() 217 final List<DocumentInfo> docs = new ArrayList<>(size); in loadDocuments() 218 DocumentInfo doc; in loadDocuments() 240 private @Nullable DocumentInfo loadDocument(String modelId, Predicate<Cursor> filter) { in loadDocument() [all …]
|
D | CreateDirectoryFragment.java | 49 import com.android.documentsui.base.DocumentInfo; 121 final DocumentInfo cwd = activity.getCurrentDirectory(); in createDirectory() 127 private class CreateDirectoryTask extends AsyncTask<Void, Void, DocumentInfo> { 129 private final DocumentInfo mCwd; 133 BaseActivity activity, DocumentInfo cwd, String displayName) { in CreateDirectoryTask() 145 protected DocumentInfo doInBackground(Void... params) { in doInBackground() 153 DocumentInfo doc = DocumentInfo.fromUri(resolver, childUri); in doInBackground() 164 protected void onPostExecute(DocumentInfo result) { in onPostExecute()
|
/packages/apps/DocumentsUI/src/com/android/documentsui/files/ |
D | ActionHandler.java | 57 import com.android.documentsui.base.DocumentInfo; 146 DocumentInfo doc = mModel.getDocument(selection.iterator().next()); in openSelectedInNewWindow() 164 (DocumentInfo doc) -> pasteIntoFolder(root, doc)); in pasteIntoFolder() 167 private void pasteIntoFolder(RootInfo root, @Nullable DocumentInfo doc) { in pasteIntoFolder() 173 public @Nullable DocumentInfo renameDocument(String name, DocumentInfo document) { in renameDocument() 182 return DocumentInfo.fromUri(resolver, newUri); in renameDocument() 200 DocumentInfo doc = mModel.getDocument(details.getSelectionKey()); in openItem() 213 public boolean openDocument(DocumentInfo doc, @ViewType int type, @ViewType int fallback) { in openDocument() 223 public void springOpenDirectory(DocumentInfo doc) { in springOpenDirectory() 285 DocumentInfo doc = mModel.getDocument(selection.iterator().next()); in viewInOwner() [all …]
|
/packages/apps/DocumentsUI/src/com/android/documentsui/services/ |
D | CopyJob.java | 26 import static com.android.documentsui.base.DocumentInfo.getCursorLong; 27 import static com.android.documentsui.base.DocumentInfo.getCursorString; 69 import com.android.documentsui.base.DocumentInfo; 98 final ArrayList<DocumentInfo> convertedFiles = new ArrayList<>(); 99 DocumentInfo mDstInfo; 214 DocumentInfo srcInfo; in start() 319 void processDocument(DocumentInfo src, DocumentInfo srcParent, in processDocument() 320 DocumentInfo dstDirInfo) throws ResourceException { in processDocument() 353 private void processDocumentThenUpdateProgress(DocumentInfo src, DocumentInfo srcParent, in processDocumentThenUpdateProgress() 354 DocumentInfo dstDirInfo) throws ResourceException { in processDocumentThenUpdateProgress() [all …]
|
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/sorting/ |
D | SortingCursorWrapperTest.java | 19 import static com.android.documentsui.base.DocumentInfo.getCursorString; 34 import com.android.documentsui.base.DocumentInfo; 147 DocumentInfo.getCursorString(cursor, Document.COLUMN_DOCUMENT_ID))); in testSort_names_ascending() 171 DocumentInfo.getCursorString(cursor, Document.COLUMN_DOCUMENT_ID))); in testSort_names_descending() 194 DocumentInfo.getCursorString(cursor, Document.COLUMN_DOCUMENT_ID))); in testSort_sizes_ascending() 196 int size = DocumentInfo.getCursorInt(cursor, Document.COLUMN_SIZE); in testSort_sizes_ascending() 217 DocumentInfo.getCursorString(cursor, Document.COLUMN_DOCUMENT_ID))); in testSort_sizes_descending() 219 int size = DocumentInfo.getCursorInt(cursor, Document.COLUMN_SIZE); in testSort_sizes_descending() 256 DocumentInfo.getCursorString(cursor, Document.COLUMN_DOCUMENT_ID))); in testSort_sizesWithBucketing_ascending() 270 int size = DocumentInfo.getCursorInt(c, Document.COLUMN_SIZE); in testSort_sizesWithBucketing_ascending() [all …]
|
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/inspector/ |
D | InspectorControllerTest.java | 40 import com.android.documentsui.base.DocumentInfo; 204 DocumentInfo doc = new DocumentInfo(); in testShowInProvider_visible() 242 DocumentInfo doc = TestEnv.clone(TestEnv.FILE_JPG); in testMetadata_GeoHandlerInstalled() 251 DocumentInfo doc = TestEnv.clone(TestEnv.FILE_JPG); in testMetadata_notDisplayedWhenNotReturned() 269 DocumentInfo doc = TestEnv.clone(TestEnv.FILE_JPG); in testMetadata_GeoHandlerStartsAction() 340 public void accept(DocumentInfo info) { in accept() 359 public void accept(DocumentInfo info, String displayName) { in accept() 386 public void accept(DocumentInfo info, Bundle metadata, Runnable geoClickCallback) { in accept() 398 public void accept(DocumentInfo info) { in accept() 411 private @Nullable DocumentInfo mDoc; [all …]
|
D | DocumentLoaderTest.java | 33 import com.android.documentsui.base.DocumentInfo; 101 LatchedConsumer<DocumentInfo> consumer = new LatchedConsumer<>(1); in testLoadsDocument() 122 LatchedConsumer<DocumentInfo> consumer = new LatchedConsumer<>(1); in testInvalidInput() 136 LatchedConsumer<DocumentInfo> consumer = new LatchedConsumer<>(1); in testNonContentUri() 152 DocumentInfo info = DocumentInfo.fromUri(mResolver, dirUri); in testDir_loadNumberOfChildren() 167 DocumentInfo info = DocumentInfo.fromUri(mResolver, uri); in testDir_notADirectory()
|
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/services/ |
D | FileOperationServiceTest.java | 37 import com.android.documentsui.base.DocumentInfo; 56 private static final DocumentInfo ALPHA_DOC = createDoc("alpha"); 57 private static final DocumentInfo BETA_DOC = createDoc("alpha"); 58 private static final DocumentInfo GAMMA_DOC = createDoc("gamma"); 59 private static final DocumentInfo DELTA_DOC = createDoc("delta"); 325 private Intent createCopyIntent(List<DocumentInfo> files, DocumentInfo dest) in createCopyIntent() 331 for (DocumentInfo file: files) { in createCopyIntent() 341 private Intent createDeleteIntent(List<DocumentInfo> files) { in createDeleteIntent() 345 for (DocumentInfo file: files) { in createDeleteIntent() 355 private static DocumentInfo createDoc(String name) { in createDoc() [all …]
|
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/base/ |
D | DocumentInfoTest.java | 45 private static final DocumentInfo TEST_DOC 65 private static DocumentInfo createDocInfo(String authority, String docId, String mimeType) { in createDocInfo() 66 DocumentInfo doc = new DocumentInfo(); in createDocInfo() 95 assertFalse(TEST_DOC.equals(new DocumentInfo())); in testEquals_HandlesNullFields() 96 assertFalse(new DocumentInfo().equals(TEST_DOC)); in testEquals_HandlesNullFields() 120 DocumentInfo.addMimeTypes(mResolver, validUri, mimeTypes); in testFolderMimeTypeFromUri() 133 DocumentInfo.addMimeTypes(mResolver, validUri, mimeTypes); in testFileMimeTypeFromUri()
|
/packages/apps/DocumentsUI/src/com/android/documentsui/roots/ |
D | GetRootDocumentTask.java | 26 import com.android.documentsui.base.DocumentInfo; 36 public class GetRootDocumentTask extends TimeoutTask<Void, DocumentInfo> { 41 private final Consumer<DocumentInfo> mCallback; 49 Consumer<DocumentInfo> callback) { in GetRootDocumentTask() 57 public @Nullable DocumentInfo run(Void... args) { in run() 62 public void finish(@Nullable DocumentInfo documentInfo) { in finish()
|
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/ |
D | GlobalSearchLoaderTest.java | 30 import com.android.documentsui.base.DocumentInfo; 71 final DocumentInfo doc = mEnv.model.createFile(SEARCH_STRING + ".jpg", FILE_FLAG); in setUp() 143 final DocumentInfo doc = mEnv.model.createFolder(SEARCH_STRING); in testSearchResult_includeDirectory() 175 final DocumentInfo pdfDoc = mEnv.model.createFile(SEARCH_STRING + ".pdf"); in testSearchResult_includeSearchString() 178 final DocumentInfo apkDoc = mEnv.model.createFile(SEARCH_STRING + ".apk"); in testSearchResult_includeSearchString() 181 final DocumentInfo testApkDoc = mEnv.model.createFile("test.apk"); in testSearchResult_includeSearchString() 206 final DocumentInfo pdfDoc = mEnv.model.createFile(SEARCH_STRING + ".pdf"); in testSearchResult_includeDifferentRoot() 209 final DocumentInfo apkDoc = mEnv.model.createFile(SEARCH_STRING + ".apk"); in testSearchResult_includeDifferentRoot() 212 final DocumentInfo testApkDoc = mEnv.model.createFile("test.apk"); in testSearchResult_includeDifferentRoot()
|
/packages/apps/DocumentsUI/src/com/android/documentsui/inspector/ |
D | InspectorController.java | 37 import com.android.documentsui.base.DocumentInfo; 157 private void updateView(@Nullable DocumentInfo docInfo) { in updateView() 201 private void onDocumentMetadataLoaded(DocumentInfo doc, @Nullable Bundle metadata) { in onDocumentMetadataLoaded() 285 void loadDocInfo(Uri uri, Consumer<DocumentInfo> callback); in loadDocInfo() 293 void loadDirCount(DocumentInfo directory, Consumer<Integer> callback); in loadDirCount() 342 void accept(DocumentInfo info); in accept() 350 void accept(DocumentInfo info, String displayName); in accept() 359 void accept(DocumentInfo info, Bundle metadata, @Nullable Runnable geoClickListener); in accept() 371 void accept(DocumentInfo info); in accept()
|
/packages/apps/DocumentsUI/src/com/android/documentsui/dirlist/ |
D | RenameDocumentFragment.java | 44 import com.android.documentsui.base.DocumentInfo; 57 private DocumentInfo mDocument; 62 public static void show(FragmentManager fm, DocumentInfo document) { in show() 206 private class RenameDocumentsTask extends AsyncTask<DocumentInfo, Void, DocumentInfo> { 221 protected DocumentInfo doInBackground(DocumentInfo... document) { in doInBackground() 228 protected void onPostExecute(DocumentInfo result) { in onPostExecute()
|
D | DirectoryFragment.java | 19 import static com.android.documentsui.base.DocumentInfo.getCursorString; 85 import com.android.documentsui.base.DocumentInfo; 713 DocumentInfo doc = selection.isEmpty() in handleMenuItemClick() 806 List<DocumentInfo> docs = mModel.getDocuments(selected); in openDocuments() 818 DocumentInfo doc = in showChooserForDoc() 819 DocumentInfo.fromDirectoryCursor(mModel.getItem(selected.iterator().next())); in showChooserForDoc() 849 final DocumentInfo parent = mActivity.getCurrentDirectory(); in transferDocuments() 901 List<DocumentInfo> docs = mModel.getDocuments(selected); in transferDocuments() 926 private static boolean hasDirectory(List<DocumentInfo> docs) { in hasDirectory() 927 for (DocumentInfo info : docs) { in hasDirectory() [all …]
|
/packages/apps/DocumentsUI/tests/common/com/android/documentsui/ui/ |
D | TestDialogController.java | 21 import com.android.documentsui.base.DocumentInfo; 38 private DocumentInfo mTarget; 47 public void confirmDelete(List<DocumentInfo> docs, ConfirmationCallback callback) { in confirmDelete() 82 public void confirmAction(FragmentManager fm, DocumentInfo pickTarget, int type) { in confirmAction() 110 public void assertOverwriteConfirmed(DocumentInfo expected) { in assertOverwriteConfirmed() 115 public void assertDocumentTreeConfirmed(DocumentInfo expected) { in assertDocumentTreeConfirmed()
|