/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() 141 public String getDocumentType(String documentId) throws FileNotFoundException { in getDocumentType() argument 142 final ArchiveId archiveId = ArchiveId.fromDocumentId(documentId); in getDocumentType() 147 final Loader loader = getLoaderOrThrow(documentId); in getDocumentType() 148 return loader.get().getDocumentType(documentId); in getDocumentType() 152 public boolean isChildDocument(String parentDocumentId, String documentId) { in isChildDocument() argument 153 final Loader loader = getLoaderOrThrow(documentId); in isChildDocument() [all …]
|
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 | 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 | 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/Traceur/src/com/android/traceur/ |
D | StorageProvider.java | 92 public Cursor queryDocument(String documentId, String[] projection) in queryDocument() argument 99 if (DOC_ID_ROOT.equals(documentId)) { in queryDocument() 103 file = getFileForDocId(documentId); in queryDocument() 107 row.add(Document.COLUMN_DOCUMENT_ID, documentId); in queryDocument() 134 String documentId, String mode, CancellationSignal signal) in openDocument() argument 138 "Attempt to open read-only file " + documentId + " in mode " + mode); in openDocument() 140 return ParcelFileDescriptor.open(getFileForDocId(documentId), in openDocument() 163 protected File getFileForDocId(String documentId, boolean visible) in getFileForDocId() argument 165 if (DOC_ID_ROOT.equals(documentId)) { in getFileForDocId() 168 final int splitIndex = documentId.indexOf(':', 1); in getFileForDocId() [all …]
|
/packages/apps/DocumentsUI/tests/common/com/android/documentsui/ |
D | StubProvider.java | 141 mStorage.put(rootInfo.document.documentId, rootInfo.document); in clearCacheAndBuildRoots() 167 row.add(Root.COLUMN_DOCUMENT_ID, info.document.documentId); in queryRoots() 174 public Cursor queryDocument(String documentId, String[] projection) in queryDocument() argument 178 final StubDocument file = mStorage.get(documentId); in queryDocument() 216 mStorage.put(document.documentId, document); in createDocument() 217 Log.d(TAG, "Created document " + document.documentId); in createDocument() 220 DocumentsContract.buildDocumentUri(mAuthority, document.documentId), in createDocument() 223 return document.documentId; in createDocument() 227 public void deleteDocument(String documentId) in deleteDocument() argument 229 final StubDocument document = mStorage.get(documentId); in deleteDocument() [all …]
|
D | DocumentsProviderHelper.java | 80 public RootInfo getRoot(String documentId) throws RemoteException { in getRoot() argument 86 if (documentId.equals(getCursorString(cursor, Root.COLUMN_ROOT_ID))) { in getRoot() 90 throw new IllegalArgumentException("Can't find matching root for id=" + documentId); in getRoot() 92 throw new RuntimeException("Can't load root for id=" + documentId , e); in getRoot() 117 return createDocument(root.documentId, mimeType, name); in createDocument() 120 public Uri createDocumentWithFlags(String documentId, String mimeType, String name, int flags, in createDocumentWithFlags() argument 125 in.putString(StubProvider.EXTRA_PARENT_ID, documentId); in createDocumentWithFlags() 190 assertChildCount(root.documentId, expected); in assertChildCount() 209 assertHasFile(root.documentId, name); in assertHasFile() 228 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()
|
/packages/apps/DocumentsUI/tests/functional/com/android/documentsui/archives/ |
D | ResourcesProvider.java | 90 public Cursor queryDocument(String documentId, String[] projection) in queryDocument() argument 94 if ("root-document-id".equals(documentId)) { in queryDocument() 104 includeDocument(result, documentId); in queryDocument() 118 for (String documentId : RESOURCES.keySet()) { in queryChildDocuments() 119 includeDocument(result, documentId); in queryChildDocuments() 134 void includeDocument(MatrixCursor result, String documentId) throws FileNotFoundException { in includeDocument() argument 135 final Integer resourceId = RESOURCES.get(documentId); in includeDocument() 144 row.add(Document.COLUMN_DOCUMENT_ID, documentId); in includeDocument() 146 row.add(Document.COLUMN_DISPLAY_NAME, documentId); in includeDocument() 148 final int lastDot = documentId.lastIndexOf('.'); in includeDocument() [all …]
|
D | WriteableArchiveTest.java | 88 final String documentId = mArchive.createDocument(dirDocumentId, "image/jpeg", "test.jpeg"); in testCreateDocument() local 89 assertEquals(createArchiveId("/dir/test.jpeg").toDocumentId(), documentId); in testCreateDocument() 149 final String documentId = mArchive.createDocument(createArchiveId("/").toDocumentId(), in testAddDirectory() local 153 final Cursor cursor = mArchive.queryDocument(documentId, null); in testAddDirectory() 155 assertEquals(documentId, in testAddDirectory() 170 assertEquals(documentId, in testAddDirectory() 199 final String documentId = mArchive.createDocument(createArchiveId("/").toDocumentId(), in testAddFile() local 203 final Cursor cursor = mArchive.queryDocument(documentId, null); in testAddFile() 205 assertEquals(documentId, in testAddFile() 216 mArchive.openDocument(documentId, "r", null); in testAddFile() [all …]
|
/packages/services/Mtp/src/com/android/mtp/ |
D | MtpDatabase.java | 259 String[] getStorageDocumentIds(String documentId) in getStorageDocumentIds() argument 261 Preconditions.checkArgument(createIdentifier(documentId).mDocumentType == in getStorageDocumentIds() 272 documentId, in getStorageDocumentIds() argument 291 Cursor queryDocument(String documentId, String[] projection) { in queryDocument() argument 296 strings(documentId), in queryDocument() 330 Identifier getParentIdentifier(String documentId) throws FileNotFoundException { in getParentIdentifier() argument 335 strings(documentId), in getParentIdentifier() 344 throw new FileNotFoundException("Cannot find a row having ID = " + documentId); in getParentIdentifier() 401 void deleteDocument(String documentId) { in deleteDocument() argument 402 deleteDocumentsAndRootsRecursively(SELECTION_DOCUMENT_ID, strings(documentId)); in deleteDocument() [all …]
|
D | MtpDocumentsProvider.java | 184 public Cursor queryDocument(String documentId, String[] projection) in queryDocument() argument 189 final Cursor cursor = mDatabase.queryDocument(documentId, projection); in queryDocument() 200 final Identifier identifier = mDatabase.createIdentifier(documentId); in queryDocument() 204 final String[] storageDocIds = mDatabase.getStorageDocumentIds(documentId); in queryDocument() 206 return mDatabase.queryDocument(documentId, projection); in queryDocument() 282 String documentId, String mode, CancellationSignal signal) in openDocument() argument 285 Log.d(TAG, "openDocument: " + documentId); in openDocument() 287 final Identifier identifier = mDatabase.createIdentifier(documentId); in openDocument() 297 fileSize = getFileSize(documentId); in openDocument() 306 new MtpProxyFileDescriptorCallback(Integer.parseInt(documentId))); in openDocument() [all …]
|
D | RootScanner.java | 157 final String documentId = mDatabase.getDocumentIdForDevice(device.deviceId); in run() local 158 if (documentId == null) { in run() 162 mDatabase.getMapper().startAddingDocuments(documentId); in run() 164 documentId, device.operationsSupported, device.roots)) { in run() 167 if (mDatabase.getMapper().stopAddingDocuments(documentId)) { in run()
|
/packages/providers/MediaProvider/src/com/android/providers/media/util/ |
D | XmpInterface.java | 41 private XmpInterface(String format, String documentId, in XmpInterface() argument 44 mDocumentId = documentId; in XmpInterface() 62 Builder documentId(String documentId) { in documentId() method in XmpInterface.Builder 63 mDocumentId = maybeOverride(mDocumentId, documentId); in documentId()
|
/packages/apps/DocumentsUI/tests/functional/com/android/documentsui/services/ |
D | AbstractCopyJobTest.java | 60 mDocs.assertFileContents(mDestRoot.documentId, "test1.txt", HAM_BYTES); in runCopyFilesTest() 61 mDocs.assertFileContents(mDestRoot.documentId, "test2.txt", FRUITY_BYTES); in runCopyFilesTest() 75 mDocs.assertFileContents(mDestRoot.documentId, "virtual.sth.pdf", FRUITY_BYTES); in runCopyVirtualTypedFileTest() 121 DocumentInfo dir1Copy = mDocs.findDocument(mDestRoot.documentId, "dir1"); in runCopyDirRecursivelyTest() 127 DocumentInfo dir2Copy = mDocs.findDocument(dir1Copy.documentId, "dir2"); in runCopyDirRecursivelyTest() 137 DocumentsContract.buildDocumentUri(AUTHORITY, mSrcRoot.documentId), in runNoCopyDirToSelfTest() 153 DocumentsContract.buildDocumentUri(AUTHORITY, mSrcRoot.documentId), in runNoCopyDirToDescendentTest() 258 Uri srcParent = DocumentsContract.buildDocumentUri(AUTHORITY, mSrcRoot.documentId); in createJob() 263 Uri destination = DocumentsContract.buildDocumentUri(AUTHORITY, mDestRoot.documentId); in createJob()
|
D | JobErrorHandlingTest.java | 44 DocumentsContract.buildDocumentUri(AUTHORITY, mSrcRoot.documentId)).run(); in testRecoversFromInvalidUri() 59 DocumentsContract.buildDocumentUri(AUTHORITY, mSrcRoot.documentId)).run(); in testRecordsInvalidUris() 73 DocumentsContract.buildDocumentUri(AUTHORITY, mSrcRoot.documentId)).run(); in testReportsCorrectFailureCount() 83 Uri stack = DocumentsContract.buildDocumentUri(AUTHORITY, mSrcRoot.documentId); in createJob()
|
D | MoveJobTest.java | 54 mDocs.assertFileContents(mDestRoot.documentId, "test1.txt", HAM_BYTES); in testMoveFiles_NoSrcParent() 55 mDocs.assertFileContents(mDestRoot.documentId, "test2.txt", FRUITY_BYTES); in testMoveFiles_NoSrcParent() 82 mSrcRoot.documentId, "virtual/mime-type", "tokyo.sth", in testMove_BackendSideVirtualTypedFile_Fallback()
|
/packages/apps/DocumentsUI/src/com/android/documentsui/base/ |
D | DocumentInfo.java | 62 public String documentId; field in DocumentInfo 82 documentId = null; in reset() 104 documentId = DurableUtils.readNullableString(in); in read() 126 DurableUtils.writeNullableString(out, documentId); in write() 178 this.documentId = getCursorString(cursor, Document.COLUMN_DOCUMENT_ID); in updateFromCursor() 230 derivedUri = DocumentsContract.buildDocumentUri(authority, documentId); in deriveFields() 236 + "docId=" + documentId in toString() 342 return userId.buildDocumentUriAsUser(authority, documentId); in getDocumentUri() 352 return DocumentsContract.buildTreeDocumentUri(authority, documentId); in getTreeDocumentUri() 354 return userId.buildTreeDocumentUriAsUser(authority, documentId); in getTreeDocumentUri()
|
D | UserId.java | 173 public Uri buildDocumentUriAsUser(String authority, String documentId) { in buildDocumentUriAsUser() argument 174 return DocumentsContract.buildDocumentUriAsUser(authority, documentId, mUserHandle); in buildDocumentUriAsUser() 180 public Uri buildTreeDocumentUriAsUser(String authority, String documentId) { in buildTreeDocumentUriAsUser() argument 181 String authorityWithUserInfo = buildDocumentUriAsUser(authority, documentId).getAuthority(); in buildTreeDocumentUriAsUser() 182 Uri treeUri = DocumentsContract.buildTreeDocumentUri(authority, documentId); in buildTreeDocumentUriAsUser()
|
/packages/modules/AppSearch/framework/java/external/android/app/appsearch/ |
D | ReportSystemUsageRequest.java | 45 @NonNull String documentId, in ReportSystemUsageRequest() argument 50 mDocumentId = Objects.requireNonNull(documentId); in ReportSystemUsageRequest() 113 @NonNull String documentId) { in Builder() argument 117 mDocumentId = Objects.requireNonNull(documentId); in Builder()
|
D | ReportUsageRequest.java | 62 @Param(id = 2) @NonNull String documentId, in ReportUsageRequest() 65 mDocumentId = Objects.requireNonNull(documentId); in ReportUsageRequest() 112 public Builder(@NonNull String namespace, @NonNull String documentId) { in Builder() argument 114 mDocumentId = Objects.requireNonNull(documentId); in Builder()
|
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/ |
D | AbstractActionHandlerTest.java | 157 Arrays.asList(TestEnv.FOLDER_1.documentId, TestEnv.FOLDER_2.documentId)); in testOpensContainerDocuments_OpenFolderInSearch_JumpsToNewLocation() 201 Arrays.asList(TestEnv.FOLDER_1.documentId, TestEnv.FOLDER_2.documentId, in testOpensContainerDocuments_ClickArchiveInSearch_opensArchiveInArchiveProvider() 202 TestEnv.FILE_ARCHIVE.documentId)); in testOpensContainerDocuments_ClickArchiveInSearch_opensArchiveInArchiveProvider() 237 TestEnv.FOLDER_0.documentId, in testLaunchToDocuments() 238 TestEnv.FOLDER_1.documentId, in testLaunchToDocuments() 239 TestEnv.FILE_GIF.documentId)); in testLaunchToDocuments() 263 TestEnv.FOLDER_0.documentId, in testLaunchToDocuments_convertsTreeUriToDocumentUri() 264 TestEnv.FOLDER_1.documentId, in testLaunchToDocuments_convertsTreeUriToDocumentUri() 265 TestEnv.FILE_GIF.documentId)); in testLaunchToDocuments_convertsTreeUriToDocumentUri() 270 TestProvidersAccess.HOME.authority, TestEnv.FOLDER_0.documentId); in testLaunchToDocuments_convertsTreeUriToDocumentUri() [all …]
|
/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/services/Mtp/tests/src/com/android/mtp/ |
D | MtpDocumentsProviderTest.java | 611 final String documentId = mProvider.createDocument("2", "text/plain", "test.txt"); in testOpenDocument_writing() local 613 final ParcelFileDescriptor fd = mProvider.openDocument(documentId, "w", null); in testOpenDocument_writing() 621 final ParcelFileDescriptor fd = mProvider.openDocument(documentId, "r", null); in testOpenDocument_writing() 758 final String documentId = mProvider.createDocument("1", "text/plain", "note.txt"); in testCreateDocument() local 765 try (final Cursor cursor = mProvider.queryDocument(documentId, null)) { in testCreateDocument() 985 String documentId; field in MtpDocumentsProviderTest.HierarchyDocument 999 .setName("doc_" + documentId) in toObjectInfo() 1008 private void setupHierarchyDocuments(String documentId) throws Exception { in setupHierarchyDocuments() argument 1012 firstDocument.documentId = documentId; in setupHierarchyDocuments() 1025 0, 0, document.objectHandle, document.documentId, new MtpObjectInfo[] { in setupHierarchyDocuments() [all …]
|
/packages/apps/DocumentsUI/tests/functional/com/android/documentsui/ |
D | FileCopyUiTest.java | 254 DocumentInfo parent = helper.findDocument(root.documentId, TARGET_FOLDER); in createDocuments() 255 List<DocumentInfo> children = helper.listChildren(parent.documentId, TARGET_COUNT); in createDocuments() 417 DocumentInfo parent = helper.findDocument(rootInfo.documentId, TARGET_FOLDER); in assertFilesCopied() 418 List<DocumentInfo> children = helper.listChildren(parent.documentId, TARGET_COUNT); in assertFilesCopied() 495 DocumentInfo info = mStorageDocsHelper.findFile(mPrimaryRoot.documentId, "Download"); in ignored_testRecursiveCopyDocuments_InternalStorageToDownloadsProvider() 499 Uri uri = mStorageDocsHelper.createFolder(mPrimaryRoot.documentId, "Download"); in ignored_testRecursiveCopyDocuments_InternalStorageToDownloadsProvider() 507 assertNull(mStorageDocsHelper.findFile(info.documentId, randomFolder)); in ignored_testRecursiveCopyDocuments_InternalStorageToDownloadsProvider() 509 Uri subFolderUri = mStorageDocsHelper.createFolder(info.documentId, randomFolder); in ignored_testRecursiveCopyDocuments_InternalStorageToDownloadsProvider()
|