/packages/apps/DocumentsUI/src/com/android/documentsui/archives/ |
D | ArchivesProvider.java | 97 public Cursor queryChildDocuments(String documentId, @Nullable String[] projection, in queryChildDocuments() argument 100 final ArchiveId archiveId = ArchiveId.fromDocumentId(documentId); in queryChildDocuments() 101 final Loader loader = getLoaderOrThrow(documentId); in queryChildDocuments() 105 return loader.get().queryChildDocuments(documentId, projection, sortOrder); in queryChildDocuments() 133 public String getDocumentType(String documentId) throws FileNotFoundException { in getDocumentType() argument 134 final ArchiveId archiveId = ArchiveId.fromDocumentId(documentId); in getDocumentType() 139 final Loader loader = getLoaderOrThrow(documentId); in getDocumentType() 140 return loader.get().getDocumentType(documentId); in getDocumentType() 144 public boolean isChildDocument(String parentDocumentId, String documentId) { in isChildDocument() argument 145 final Loader loader = getLoaderOrThrow(documentId); in isChildDocument() [all …]
|
D | Archive.java | 133 public Cursor queryChildDocuments(String documentId, @Nullable String[] projection, in queryChildDocuments() argument 135 final ArchiveId parsedParentId = ArchiveId.fromDocumentId(documentId); in queryChildDocuments() 162 public String getDocumentType(String documentId) throws FileNotFoundException { in getDocumentType() argument 163 final ArchiveId parsedId = ArchiveId.fromDocumentId(documentId); in getDocumentType() 182 public boolean isChildDocument(String parentDocumentId, String documentId) { in isChildDocument() argument 184 final ArchiveId parsedId = ArchiveId.fromDocumentId(documentId); in isChildDocument() 214 public Cursor queryDocument(String documentId, @Nullable String[] projection) in queryDocument() argument 216 final ArchiveId parsedId = ArchiveId.fromDocumentId(documentId); in queryDocument() 252 String documentId, String mode, @Nullable final CancellationSignal signal) in openDocument() argument 263 String documentId, Point sizeHint, final CancellationSignal signal) in openDocumentThumbnail() argument
|
D | ArchiveId.java | 37 static public ArchiveId fromDocumentId(String documentId) { in fromDocumentId() argument 38 final int delimiterPosition = documentId.indexOf(DELIMITER); in fromDocumentId() 41 final int secondDelimiterPosition = documentId.indexOf(DELIMITER, delimiterPosition + 1); in fromDocumentId() 44 final String archiveUriPart = documentId.substring(0, delimiterPosition); in fromDocumentId() 45 final String accessModePart = documentId.substring(delimiterPosition + 1, in fromDocumentId() 48 final String pathPart = documentId.substring(secondDelimiterPosition + 1); in fromDocumentId()
|
D | ReadableArchive.java | 264 String documentId, String mode, @Nullable final CancellationSignal signal) in openDocument() argument 268 final ArchiveId parsedId = ArchiveId.fromDocumentId(documentId); in openDocument() 291 String documentId, Point sizeHint, final CancellationSignal signal) in openDocumentThumbnail() argument 293 final ArchiveId parsedId = ArchiveId.fromDocumentId(documentId); in openDocumentThumbnail() 296 Preconditions.checkArgument(getDocumentType(documentId).startsWith("image/"), in openDocumentThumbnail() 326 openDocument(documentId, "r", signal), range[0], range[1], extras); in openDocumentThumbnail() 340 openDocument(documentId, "r", signal), 0, entry.getSize(), null); in openDocumentThumbnail()
|
/packages/apps/DocumentsUI/tests/common/com/android/documentsui/ |
D | StubProvider.java | 137 mStorage.put(rootInfo.document.documentId, rootInfo.document); in clearCacheAndBuildRoots() 163 row.add(Root.COLUMN_DOCUMENT_ID, info.document.documentId); in queryRoots() 170 public Cursor queryDocument(String documentId, String[] projection) in queryDocument() argument 174 final StubDocument file = mStorage.get(documentId); in queryDocument() 196 mStorage.put(document.documentId, document); in createDocument() 197 Log.d(TAG, "Created document " + document.documentId); in createDocument() 200 DocumentsContract.buildDocumentUri(mAuthority, document.documentId), in createDocument() 203 return document.documentId; in createDocument() 207 public void deleteDocument(String documentId) in deleteDocument() argument 209 final StubDocument document = mStorage.get(documentId); in deleteDocument() [all …]
|
D | DocumentsProviderHelper.java | 76 public RootInfo getRoot(String documentId) throws RemoteException { in getRoot() argument 82 if (documentId.equals(getCursorString(cursor, Root.COLUMN_ROOT_ID))) { in getRoot() 86 throw new IllegalArgumentException("Can't find matching root for id=" + documentId); in getRoot() 88 throw new RuntimeException("Can't load root for id=" + documentId , e); in getRoot() 113 return createDocument(root.documentId, mimeType, name); in createDocument() 116 public Uri createDocumentWithFlags(String documentId, String mimeType, String name, int flags, in createDocumentWithFlags() argument 121 in.putString(StubProvider.EXTRA_PARENT_ID, documentId); in createDocumentWithFlags() 186 assertChildCount(root.documentId, expected); in assertChildCount() 205 assertHasFile(root.documentId, name); in assertHasFile() 224 assertHasDirectory(root.documentId, name); in assertHasDirectory() [all …]
|
D | InspectorProvider.java | 68 public Cursor queryDocument(String documentId, String[] projection) in queryDocument() argument 71 if (OPEN_IN_PROVIDER_TEST.equals(documentId)) { in queryDocument() 78 addFolder(c, documentId); in queryDocument() 145 public Bundle getDocumentMetadata(String documentId) throws FileNotFoundException { in getDocumentMetadata() argument 146 if (TEST_JPEG.contentEquals(documentId)) { in getDocumentMetadata() 151 } else if (INVALID_JPEG.contentEquals(documentId)) { in getDocumentMetadata() 158 return super.getDocumentMetadata(documentId); in getDocumentMetadata()
|
D | BrokenProvider.java | 47 public Cursor queryDocument(String documentId, String[] projection) in queryDocument() argument 49 if (BROKEN_ROOT_DOCUMENT_ID.equals(documentId)) { in queryDocument()
|
D | BrokenSettingsEnabledProvider.java | 42 public Cursor queryDocument(String documentId, String[] projection) in queryDocument() argument 49 addFolder(c, documentId); in queryDocument()
|
/packages/apps/Traceur/src/com/android/traceur/ |
D | StorageProvider.java | 100 public Cursor queryDocument(String documentId, String[] projection) in queryDocument() argument 107 if (DOC_ID_ROOT.equals(documentId)) { in queryDocument() 111 file = getFileForDocId(documentId); in queryDocument() 115 row.add(Document.COLUMN_DOCUMENT_ID, documentId); in queryDocument() 141 String documentId, String mode, CancellationSignal signal) in openDocument() argument 145 "Attempt to open read-only file " + documentId + " in mode " + mode); in openDocument() 147 return ParcelFileDescriptor.open(getFileForDocId(documentId), in openDocument() 170 protected File getFileForDocId(String documentId, boolean visible) in getFileForDocId() argument 172 if (DOC_ID_ROOT.equals(documentId)) { in getFileForDocId() 175 final int splitIndex = documentId.indexOf(':', 1); in getFileForDocId() [all …]
|
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/archives/ |
D | WriteableArchiveTest.java | 89 final String documentId = mArchive.createDocument(dirDocumentId, "image/jpeg", "test.jpeg"); in testCreateDocument() local 90 assertEquals(createArchiveId("/dir/test.jpeg").toDocumentId(), documentId); in testCreateDocument() 150 final String documentId = mArchive.createDocument(createArchiveId("/").toDocumentId(), in testAddDirectory() local 154 final Cursor cursor = mArchive.queryDocument(documentId, null); in testAddDirectory() 156 assertEquals(documentId, in testAddDirectory() 171 assertEquals(documentId, in testAddDirectory() 200 final String documentId = mArchive.createDocument(createArchiveId("/").toDocumentId(), in testAddFile() local 204 final Cursor cursor = mArchive.queryDocument(documentId, null); in testAddFile() 206 assertEquals(documentId, in testAddFile() 217 mArchive.openDocument(documentId, "r", null); in testAddFile() [all …]
|
D | ResourcesProvider.java | 93 public Cursor queryDocument(String documentId, String[] projection) in queryDocument() argument 97 if ("root-document-id".equals(documentId)) { in queryDocument() 107 includeDocument(result, documentId); in queryDocument() 121 for (String documentId : RESOURCES.keySet()) { in queryChildDocuments() 122 includeDocument(result, documentId); in queryChildDocuments() 137 void includeDocument(MatrixCursor result, String documentId) throws FileNotFoundException { in includeDocument() argument 138 final Integer resourceId = RESOURCES.get(documentId); in includeDocument() 147 row.add(Document.COLUMN_DOCUMENT_ID, documentId); in includeDocument() 149 row.add(Document.COLUMN_DISPLAY_NAME, documentId); in includeDocument() 151 final int lastDot = documentId.lastIndexOf('.'); in includeDocument() [all …]
|
D | ReadableArchiveTest.java | 286 final String documentId = createArchiveId("/").toDocumentId(); in testIsChildDocument() local 287 assertTrue(mArchive.isChildDocument(documentId, in testIsChildDocument() 289 assertFalse(mArchive.isChildDocument(documentId, in testIsChildDocument() 294 assertTrue(mArchive.isChildDocument(documentId, in testIsChildDocument() 321 final String documentId = createArchiveId("/hello/hello.txt").toDocumentId(); in queryDocumentByResIdWithMimeTypeAndVerify() local 323 final Cursor cursor = mArchive.queryDocument(documentId, null); in queryDocumentByResIdWithMimeTypeAndVerify() 327 .isEqualTo(documentId); in queryDocumentByResIdWithMimeTypeAndVerify()
|
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/ |
D | AbstractActionHandlerTest.java | 125 Arrays.asList(TestEnv.FOLDER_1.documentId, TestEnv.FOLDER_2.documentId)); in testOpensContainerDocuments_OpenFolderInSearch_JumpsToNewLocation() 169 Arrays.asList(TestEnv.FOLDER_1.documentId, TestEnv.FOLDER_2.documentId, in testOpensContainerDocuments_ClickArchiveInSearch_opensArchiveInArchiveProvider() 170 TestEnv.FILE_ARCHIVE.documentId)); in testOpensContainerDocuments_ClickArchiveInSearch_opensArchiveInArchiveProvider() 205 TestEnv.FOLDER_0.documentId, in testLaunchToDocuments() 206 TestEnv.FOLDER_1.documentId, in testLaunchToDocuments() 207 TestEnv.FILE_GIF.documentId)); in testLaunchToDocuments() 231 TestEnv.FOLDER_0.documentId, in testLaunchToDocuments_convertsTreeUriToDocumentUri() 232 TestEnv.FOLDER_1.documentId, in testLaunchToDocuments_convertsTreeUriToDocumentUri() 233 TestEnv.FILE_GIF.documentId)); in testLaunchToDocuments_convertsTreeUriToDocumentUri() 238 TestProvidersAccess.HOME.authority, TestEnv.FOLDER_0.documentId); in testLaunchToDocuments_convertsTreeUriToDocumentUri() [all …]
|
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/services/ |
D | AbstractCopyJobTest.java | 59 mDocs.assertFileContents(mDestRoot.documentId, "test1.txt", HAM_BYTES); in runCopyFilesTest() 60 mDocs.assertFileContents(mDestRoot.documentId, "test2.txt", FRUITY_BYTES); in runCopyFilesTest() 74 mDocs.assertFileContents(mDestRoot.documentId, "virtual.sth.pdf", FRUITY_BYTES); in runCopyVirtualTypedFileTest() 120 DocumentInfo dir1Copy = mDocs.findDocument(mDestRoot.documentId, "dir1"); in runCopyDirRecursivelyTest() 126 DocumentInfo dir2Copy = mDocs.findDocument(dir1Copy.documentId, "dir2"); in runCopyDirRecursivelyTest() 136 DocumentsContract.buildDocumentUri(AUTHORITY, mSrcRoot.documentId), in runNoCopyDirToSelfTest() 152 DocumentsContract.buildDocumentUri(AUTHORITY, mSrcRoot.documentId), in runNoCopyDirToDescendentTest() 257 Uri srcParent = DocumentsContract.buildDocumentUri(AUTHORITY, mSrcRoot.documentId); in createJob() 262 Uri destination = DocumentsContract.buildDocumentUri(AUTHORITY, mDestRoot.documentId); in createJob()
|
D | JobErrorHandlingTest.java | 43 DocumentsContract.buildDocumentUri(AUTHORITY, mSrcRoot.documentId)).run(); in testRecoversFromInvalidUri() 58 DocumentsContract.buildDocumentUri(AUTHORITY, mSrcRoot.documentId)).run(); in testRecordsInvalidUris() 72 DocumentsContract.buildDocumentUri(AUTHORITY, mSrcRoot.documentId)).run(); in testReportsCorrectFailureCount() 82 Uri stack = DocumentsContract.buildDocumentUri(AUTHORITY, mSrcRoot.documentId); in createJob()
|
D | MoveJobTest.java | 53 mDocs.assertFileContents(mDestRoot.documentId, "test1.txt", HAM_BYTES); in testMoveFiles_NoSrcParent() 54 mDocs.assertFileContents(mDestRoot.documentId, "test2.txt", FRUITY_BYTES); in testMoveFiles_NoSrcParent() 81 mSrcRoot.documentId, "virtual/mime-type", "tokyo.sth", in testMove_BackendSideVirtualTypedFile_Fallback()
|
/packages/apps/DocumentsUI/perf-tests/src/com/android/documentsui/ |
D | StressProvider.java | 141 public Cursor queryDocument(String documentId, String[] projection) in queryDocument() argument 144 final StubDocument document = mDocuments.get(documentId); in queryDocument() 183 row.add(Root.COLUMN_DOCUMENT_ID, root.documentId); in includeRoot() 258 final String documentId; field in StressProvider.StubRoot 260 public StubRoot(String id, String documentId) { in StubRoot() argument 262 this.documentId = documentId; in StubRoot()
|
/packages/apps/DocumentsUI/src/com/android/documentsui/base/ |
D | DocumentInfo.java | 59 public String documentId; field in DocumentInfo 78 documentId = null; in reset() 97 documentId = DurableUtils.readNullableString(in); in read() 116 DurableUtils.writeNullableString(out, documentId); in write() 165 this.documentId = getCursorString(cursor, Document.COLUMN_DOCUMENT_ID); in updateFromCursor() 212 derivedUri = DocumentsContract.buildDocumentUri(authority, documentId); in deriveFields() 218 + "docId=" + documentId in toString()
|
D | RootInfo.java | 94 public String documentId; field in RootInfo 119 documentId = null; in reset() 143 documentId = DurableUtils.readNullableString(in); in read() 163 DurableUtils.writeNullableString(out, documentId); in write() 200 root.documentId = getCursorString(cursor, Root.COLUMN_DOCUMENT_ID); in fromRootsCursor()
|
/packages/apps/DocumentsUI/src/com/android/documentsui/ |
D | ModelId.java | 20 String documentId; in build() local 22 documentId = DocumentsContract.getDocumentId(uri); in build() 29 return ModelId.build(authority, documentId); in build() 36 return ModelId.build(docInfo.authority, docInfo.documentId); in build()
|
/packages/apps/DocumentsUI/tests/common/com/android/documentsui/testing/ |
D | TestModel.java | 106 doc.documentId = Integer.toString(++mLastId); in createDocument() 107 doc.derivedUri = DocumentsContract.buildDocumentUri(doc.authority, doc.documentId); in createDocument() 120 row.add(Document.COLUMN_DOCUMENT_ID, doc.documentId); in addToCursor()
|
D | TestDocumentsProvider.java | 71 public Cursor queryDocument(String documentId, String[] projection) in queryDocument() argument 83 public ParcelFileDescriptor openDocument(String documentId, String mode, in openDocument() argument 123 .add(Document.COLUMN_DOCUMENT_ID, doc.documentId) in createDocumentsCursor()
|
D | TestEnv.java | 199 ids.add(ModelId.build(info.authority, info.documentId)); in selectDocument() 207 b.documentId = a.documentId; in clone()
|
/packages/apps/DocumentsUI/tests/functional/com/android/documentsui/ |
D | FileCopyUiTest.java | 215 DocumentInfo parent = helper.findDocument(root.documentId, TARGET_FOLDER); in createDocuments() 216 List<DocumentInfo> children = helper.listChildren(parent.documentId, TARGET_COUNT); in createDocuments() 374 DocumentInfo parent = helper.findDocument(rootInfo.documentId, TARGET_FOLDER); in assertFilesCopied() 375 List<DocumentInfo> children = helper.listChildren(parent.documentId, TARGET_COUNT); in assertFilesCopied()
|