/packages/apps/DocumentsUI/tests/common/com/android/documentsui/ |
D | DocumentsProviderHelper.java | 22 import static com.android.documentsui.base.DocumentInfo.getCursorString; 43 import com.android.documentsui.base.DocumentInfo; 161 List<DocumentInfo> children = listChildren(parentUri); in assertChildCount() 166 List<DocumentInfo> children = listChildren(parentId, -1); in assertChildCount() 175 List<DocumentInfo> children = listChildren(parentUri); in assertHasFile() 176 for (DocumentInfo child : children) { in assertHasFile() 194 List<DocumentInfo> children = listChildren(parentUri); in assertHasDirectory() 195 for (DocumentInfo child : children) { in assertHasDirectory() 213 List<DocumentInfo> children = listChildren(parentUri); in assertDoesNotExist() 214 for (DocumentInfo child : children) { in assertDoesNotExist() [all …]
|
/packages/apps/DocumentsUI/tests/common/com/android/documentsui/testing/ |
D | TestEnv.java | 25 import com.android.documentsui.base.DocumentInfo; 44 public static DocumentInfo FOLDER_0; 45 public static DocumentInfo FOLDER_1; 46 public static DocumentInfo FOLDER_2; 47 public static DocumentInfo FILE_TXT; 48 public static DocumentInfo FILE_PNG; 49 public static DocumentInfo FILE_JPG; 50 public static DocumentInfo FILE_GIF; 51 public static DocumentInfo FILE_PDF; 52 public static DocumentInfo FILE_APK; [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; 71 public DocumentInfo createFile(String name) { in createFile() 79 public DocumentInfo createFile(String name, int flags) { in createFile() 86 public DocumentInfo createFolder(String name) { in createFolder() 95 public DocumentInfo createFolder(String name, int flags) { in createFolder() 102 public DocumentInfo createDocument(String name, String mimeType, int flags) { in createDocument() 103 DocumentInfo doc = new DocumentInfo(); in createDocument() 117 private void addToCursor(DocumentInfo doc) { in addToCursor()
|
D | TestDragAndDropManager.java | 30 import com.android.documentsui.base.DocumentInfo; 40 public final TestEventListener<List<DocumentInfo>> startDragHandler = new TestEventListener<>(); 50 public void startDrag(View v, List<DocumentInfo> srcs, RootInfo root, List<Uri> invalidDest, in startDrag() 51 SelectionDetails details, IconHelper iconHelper, @Nullable DocumentInfo parent) { in startDrag() 56 public boolean canSpringOpen(RootInfo root, DocumentInfo doc) { in canSpringOpen() 64 public int updateState(View v, RootInfo destRoot, @Nullable DocumentInfo destDoc) { in updateState()
|
/packages/apps/DocumentsUI/src/com/android/documentsui/base/ |
D | DocumentInfo.java | 50 public class DocumentInfo implements Durable, Parcelable { class 67 public DocumentInfo() { in DocumentInfo() method in DocumentInfo 132 public static final Creator<DocumentInfo> CREATOR = new Creator<DocumentInfo>() { 134 public DocumentInfo createFromParcel(Parcel in) { 135 final DocumentInfo doc = new DocumentInfo(); 141 public DocumentInfo[] newArray(int size) { 142 return new DocumentInfo[size]; 146 public static DocumentInfo fromDirectoryCursor(Cursor cursor) { in fromDirectoryCursor() 152 public static DocumentInfo fromCursor(Cursor cursor, String authority) { in fromCursor() 154 final DocumentInfo info = new DocumentInfo(); in fromCursor() [all …]
|
D | DocumentStack.java | 53 private LinkedList<DocumentInfo> mList; 66 public DocumentStack(RootInfo root, DocumentInfo... docs) { in DocumentStack() 79 public DocumentStack(RootInfo root, List<DocumentInfo> docs) { in DocumentStack() 88 public DocumentStack(DocumentStack src, DocumentInfo... docs) { in DocumentStack() 90 for (DocumentInfo doc : docs) { in DocumentStack() 114 public DocumentInfo peek() { in peek() 121 public DocumentInfo get(int index) { in get() 125 public void push(DocumentInfo info) { in push() 135 public DocumentInfo pop() { in pop() 137 final DocumentInfo result = mList.removeLast(); in pop() [all …]
|
/packages/apps/DocumentsUI/src/com/android/documentsui/ |
D | DocumentsAccess.java | 32 import com.android.documentsui.base.DocumentInfo; 45 @Nullable DocumentInfo getRootDocument(RootInfo root); in getRootDocument() 46 @Nullable DocumentInfo getDocument(Uri uri); in getDocument() 47 @Nullable DocumentInfo getArchiveDocument(Uri uri); in getArchiveDocument() 52 List<DocumentInfo> getDocuments(String authority, List<String> docIds) throws RemoteException; in getDocuments() 54 @Nullable Uri createDocument(DocumentInfo parentDoc, String mimeType, String displayName); in createDocument() 71 public @Nullable DocumentInfo getRootDocument(RootInfo root) { in getRootDocument() 77 public @Nullable DocumentInfo getDocument(Uri uri) { in getDocument() 79 return DocumentInfo.fromUri(mContext.getContentResolver(), uri); in getDocument() 88 public List<DocumentInfo> getDocuments(String authority, List<String> docIds) in getDocuments() [all …]
|
D | AbstractActionHandler.java | 19 import static com.android.documentsui.base.DocumentInfo.getCursorInt; 20 import static com.android.documentsui.base.DocumentInfo.getCursorString; 45 import com.android.documentsui.base.DocumentInfo; 182 public void getRootDocument(RootInfo root, int timeout, Consumer<DocumentInfo> callback) { in getRootDocument() 194 public void refreshDocument(DocumentInfo doc, BooleanConsumer callback) { in refreshDocument() 233 public void showInspector(DocumentInfo doc) { in showInspector() 238 public void springOpenDirectory(DocumentInfo doc) { in springOpenDirectory() 309 public DocumentInfo renameDocument(String name, DocumentInfo document) { in renameDocument() 314 public void showChooserForDoc(DocumentInfo doc) { in showChooserForDoc() 319 public void openRootDocument(@Nullable DocumentInfo rootDoc) { in openRootDocument() [all …]
|
D | DragAndDropManager.java | 32 import com.android.documentsui.base.DocumentInfo; 79 List<DocumentInfo> srcs, in startDrag() 84 @Nullable DocumentInfo parent); in startDrag() 92 boolean canSpringOpen(RootInfo root, DocumentInfo doc); in canSpringOpen() 111 View v, RootInfo destRoot, @Nullable DocumentInfo destDoc); in updateState() 178 private DocumentInfo mDestDoc; 228 List<DocumentInfo> srcs, in startDrag() 233 @Nullable DocumentInfo parent) { in startDrag() 240 for (DocumentInfo doc : srcs) { in startDrag() 265 private void updateShadow(List<DocumentInfo> srcs, IconHelper iconHelper) { in updateShadow() [all …]
|
D | ActionHandler.java | 29 import com.android.documentsui.base.DocumentInfo; 73 void getRootDocument(RootInfo root, int timeout, Consumer<DocumentInfo> callback); in getRootDocument() 79 void refreshDocument(DocumentInfo doc, BooleanConsumer callback); in refreshDocument() 106 void showInspector(DocumentInfo doc); in showInspector() 108 @Nullable DocumentInfo renameDocument(String name, DocumentInfo document); in renameDocument() 121 void springOpenDirectory(DocumentInfo doc); in springOpenDirectory() 123 void showChooserForDoc(DocumentInfo doc); in showChooserForDoc() 125 void openRootDocument(@Nullable DocumentInfo rootDoc); in openRootDocument() 127 void openContainerDocument(DocumentInfo doc); in openContainerDocument()
|
D | Model.java | 19 import static com.android.documentsui.base.DocumentInfo.getCursorString; 37 import com.android.documentsui.base.DocumentInfo; 63 public @Nullable DocumentInfo doc; 206 public List<DocumentInfo> getDocuments(Selection selection) { in getDocuments() 210 public @Nullable DocumentInfo getDocument(String modelId) { in getDocument() 214 : DocumentInfo.fromDirectoryCursor(cursor); in getDocument() 217 public List<DocumentInfo> loadDocuments(Selection selection, Predicate<Cursor> filter) { in loadDocuments() 220 final List<DocumentInfo> docs = new ArrayList<>(size); in loadDocuments() 221 DocumentInfo doc; in loadDocuments() 243 private @Nullable DocumentInfo loadDocument(String modelId, Predicate<Cursor> filter) { in loadDocument() [all …]
|
D | CreateDirectoryFragment.java | 46 import com.android.documentsui.base.DocumentInfo; 112 final DocumentInfo cwd = activity.getCurrentDirectory(); in createDirectory() 118 private class CreateDirectoryTask extends AsyncTask<Void, Void, DocumentInfo> { 120 private final DocumentInfo mCwd; 124 BaseActivity activity, DocumentInfo cwd, String displayName) { in CreateDirectoryTask() 136 protected DocumentInfo doInBackground(Void... params) { in doInBackground() 144 return DocumentInfo.fromUri(resolver, childUri); in doInBackground() 154 protected void onPostExecute(DocumentInfo result) { in onPostExecute()
|
/packages/apps/DocumentsUI/src/com/android/documentsui/files/ |
D | ActionHandler.java | 47 import com.android.documentsui.base.DocumentInfo; 138 DocumentInfo doc = mModel.getDocument(selection.iterator().next()); in openSelectedInNewWindow() 156 (DocumentInfo doc) -> pasteIntoFolder(root, doc)); in pasteIntoFolder() 159 private void pasteIntoFolder(RootInfo root, @Nullable DocumentInfo doc) { in pasteIntoFolder() 165 public @Nullable DocumentInfo renameDocument(String name, DocumentInfo document) { in renameDocument() 174 return DocumentInfo.fromUri(resolver, newUri); in renameDocument() 192 DocumentInfo doc = mModel.getDocument(details.getModelId()); in openDocument() 204 public boolean openDocument(DocumentInfo doc, @ViewType int type, @ViewType int fallback) { in openDocument() 214 public void springOpenDirectory(DocumentInfo doc) { in springOpenDirectory() 276 DocumentInfo doc = mModel.getDocument(selection.iterator().next()); in viewInOwner() [all …]
|
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/inspector/ |
D | InspectorControllerTest.java | 39 import com.android.documentsui.base.DocumentInfo; 68 private TestConsumer<DocumentInfo> mHeaderTestDouble; 72 private TestConsumer<DocumentInfo> mDebugTestDouble; 121 mController.updateView(new DocumentInfo()); in testHideDebugByDefault() 147 mController.updateView(new DocumentInfo()); in testShowDebugUpdatesView() 180 mController.updateView(new DocumentInfo()); in testUpdateViewWithValidInput() 193 DocumentInfo doc = new DocumentInfo(); in testShowInProvider_visible() 209 DocumentInfo doc = new DocumentInfo(); in testShowInProvider_invisible() 227 DocumentInfo doc = new DocumentInfo(); in testAppDefaults_visible() 243 DocumentInfo doc = new DocumentInfo(); in testAppDefaults_invisible() [all …]
|
D | DocumentLoaderTest.java | 27 import com.android.documentsui.base.DocumentInfo; 126 DocumentInfo info = DocumentInfo.fromUri(mResolver, dirUri); in testDir_loadNumberOfChildren() 141 DocumentInfo info = DocumentInfo.fromUri(mResolver, uri); in testDir_notADirectory() 154 private static class TestDocConsumer implements Consumer<DocumentInfo> { 156 private DocumentInfo info; 165 public void accept(DocumentInfo documentInfo) { in accept()
|
/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; 67 import com.android.documentsui.base.DocumentInfo; 91 final ArrayList<DocumentInfo> convertedFiles = new ArrayList<>(); 92 DocumentInfo mDstInfo; 271 DocumentInfo srcInfo; in start() 367 void processDocument(DocumentInfo src, DocumentInfo srcParent, in processDocument() 368 DocumentInfo dstDirInfo) throws ResourceException { in processDocument() 400 void byteCopyDocument(DocumentInfo src, DocumentInfo dest) throws ResourceException { in byteCopyDocument() 457 DocumentInfo dstInfo = null; in byteCopyDocument() [all …]
|
D | MoveJob.java | 35 import com.android.documentsui.base.DocumentInfo; 52 private @Nullable DocumentInfo mSrcParent; 97 mSrcParent = DocumentInfo.fromUri(resolver, mSrcParentUri); in setUp() 119 for (DocumentInfo src : mResolvedDocs) { in checkSpace() 139 void processDocument(DocumentInfo src, DocumentInfo srcParent, DocumentInfo dest) in processDocument()
|
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/sorting/ |
D | SortingCursorWrapperTest.java | 19 import static com.android.documentsui.base.DocumentInfo.getCursorString; 32 import com.android.documentsui.base.DocumentInfo; 145 DocumentInfo.getCursorString(cursor, Document.COLUMN_DOCUMENT_ID))); in testSort_names_ascending() 169 DocumentInfo.getCursorString(cursor, Document.COLUMN_DOCUMENT_ID))); in testSort_names_descending() 192 DocumentInfo.getCursorString(cursor, Document.COLUMN_DOCUMENT_ID))); in testSort_sizes_ascending() 194 int size = DocumentInfo.getCursorInt(cursor, Document.COLUMN_SIZE); in testSort_sizes_ascending() 215 DocumentInfo.getCursorString(cursor, Document.COLUMN_DOCUMENT_ID))); in testSort_sizes_descending() 217 int size = DocumentInfo.getCursorInt(cursor, Document.COLUMN_SIZE); in testSort_sizes_descending() 254 DocumentInfo.getCursorString(cursor, Document.COLUMN_DOCUMENT_ID))); in testSort_sizesWithBucketing_ascending() 268 int size = DocumentInfo.getCursorInt(c, Document.COLUMN_SIZE); in testSort_sizesWithBucketing_ascending() [all …]
|
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/services/ |
D | FileOperationServiceTest.java | 36 import com.android.documentsui.base.DocumentInfo; 54 private static final DocumentInfo ALPHA_DOC = createDoc("alpha"); 55 private static final DocumentInfo BETA_DOC = createDoc("alpha"); 56 private static final DocumentInfo GAMMA_DOC = createDoc("gamma"); 57 private static final DocumentInfo DELTA_DOC = createDoc("delta"); 296 private Intent createCopyIntent(ArrayList<DocumentInfo> files, DocumentInfo dest) in createCopyIntent() 302 for (DocumentInfo file: files) { in createCopyIntent() 312 private Intent createDeleteIntent(ArrayList<DocumentInfo> files) { in createDeleteIntent() 316 for (DocumentInfo file: files) { in createDeleteIntent() 326 private static DocumentInfo createDoc(String name) { in createDoc() [all …]
|
/packages/apps/DocumentsUI/src/com/android/documentsui/dirlist/ |
D | DirectoryFragment.java | 19 import static com.android.documentsui.base.DocumentInfo.getCursorInt; 20 import static com.android.documentsui.base.DocumentInfo.getCursorString; 77 import com.android.documentsui.base.DocumentInfo; 675 DocumentInfo doc = mModel.getDocuments(selection).get(0); in handleMenuItemClick() 741 List<DocumentInfo> docs = mModel.getDocuments(selected); in openDocuments() 753 DocumentInfo doc = in showChooserForDoc() 754 DocumentInfo.fromDirectoryCursor(mModel.getItem(selected.iterator().next())); in showChooserForDoc() 783 final DocumentInfo parent = mState.stack.peek(); in transferDocuments() 835 List<DocumentInfo> docs = mModel.getDocuments(selected); in transferDocuments() 860 private static boolean hasDirectory(List<DocumentInfo> docs) { in hasDirectory() [all …]
|
D | RenameDocumentFragment.java | 51 import com.android.documentsui.base.DocumentInfo; 60 private DocumentInfo mDocument; 65 public static void show(FragmentManager fm, DocumentInfo document) { in show() 207 private class RenameDocumentsTask extends AsyncTask<DocumentInfo, Void, DocumentInfo> { 222 protected DocumentInfo doInBackground(DocumentInfo... document) { in doInBackground() 229 protected void onPostExecute(DocumentInfo result) { in onPostExecute()
|
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/base/ |
D | DocumentInfoTest.java | 22 import com.android.documentsui.base.DocumentInfo; 27 private static final DocumentInfo TEST_DOC 40 assertFalse(TEST_DOC.equals(new DocumentInfo())); in testEquals_HandlesNullFields() 41 assertFalse(new DocumentInfo().equals(TEST_DOC)); in testEquals_HandlesNullFields() 56 private static DocumentInfo createDocInfo(String authority, String docId, String mimeType) { in createDocInfo() 57 DocumentInfo doc = new DocumentInfo(); in createDocInfo()
|
/packages/apps/DocumentsUI/src/com/android/documentsui/inspector/ |
D | InspectorController.java | 35 import com.android.documentsui.base.DocumentInfo; 50 private final Consumer<DocumentInfo> mHeader; 54 private final Consumer<DocumentInfo> mDebugView; 67 ProvidersAccess providers, boolean showDebug, Consumer<DocumentInfo> header, in InspectorController() 69 Consumer<DocumentInfo> debugView, Lookup<String, Executor> executors, in InspectorController() 133 public void updateView(@Nullable DocumentInfo docInfo) { in updateView() 224 void loadDocInfo(Uri uri, Consumer<DocumentInfo> callback); in loadDocInfo() 232 void loadDirCount(DocumentInfo directory, Consumer<Integer> callback); in loadDirCount() 271 void accept(DocumentInfo info); in accept()
|
/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()
|