Home
last modified time | relevance | path

Searched refs:documentId (Results 1 – 12 of 12) sorted by relevance

/frameworks/base/packages/Shell/src/com/android/shell/
DBugreportStorageProvider.java84 public Cursor queryDocument(String documentId, String[] projection) in queryDocument() argument
86 if (DOC_ID_ROOT.equals(documentId)) { in queryDocument()
91 return super.queryDocument(documentId, projection); in queryDocument()
97 String documentId, String mode, CancellationSignal signal) in openDocument() argument
100 throw new FileNotFoundException("Failed to open: " + documentId + ", mode = " + mode); in openDocument()
102 return ParcelFileDescriptor.open(getFileForDocId(documentId), in openDocument()
125 protected File getFileForDocId(String documentId, boolean visible) in getFileForDocId() argument
127 if (DOC_ID_ROOT.equals(documentId)) { in getFileForDocId()
130 final int splitIndex = documentId.indexOf(':', 1); in getFileForDocId()
131 final String name = documentId.substring(splitIndex + 1); in getFileForDocId()
[all …]
/frameworks/base/core/java/android/provider/
DDocumentsProvider.java216 public boolean isChildDocument(String parentDocumentId, String documentId) { in isChildDocument() argument
277 public String renameDocument(String documentId, String displayName) in renameDocument() argument
297 public void deleteDocument(String documentId) throws FileNotFoundException { in deleteDocument() argument
363 public void removeDocument(String documentId, String parentDocumentId) in removeDocument() argument
422 public IntentSender createWebLinkIntent(String documentId, @Nullable Bundle options) in createWebLinkIntent() argument
517 public abstract Cursor queryDocument(String documentId, String[] projection) in queryDocument() argument
746 public @Nullable Bundle getDocumentMetadata(@NonNull String documentId) in getDocumentMetadata() argument
761 public String getDocumentType(String documentId) throws FileNotFoundException { in getDocumentType() argument
762 final Cursor cursor = queryDocument(documentId, null); in getDocumentType()
804 String documentId, in openDocument() argument
[all …]
DDocumentsContract.java904 public static Uri buildTreeDocumentUri(String authority, String documentId) { in buildTreeDocumentUri() argument
906 .appendPath(PATH_TREE).appendPath(documentId).build(); in buildTreeDocumentUri()
917 public static Uri buildDocumentUri(String authority, String documentId) { in buildDocumentUri() argument
918 return getBaseDocumentUriBuilder(authority).appendPath(documentId).build(); in buildDocumentUri()
954 public static Uri buildDocumentUriUsingTree(Uri treeUri, String documentId) { in buildDocumentUriUsingTree() argument
958 .appendPath(documentId).build(); in buildDocumentUriUsingTree()
962 public static Uri buildDocumentUriMaybeUsingTree(Uri baseUri, String documentId) { in buildDocumentUriMaybeUsingTree() argument
964 return buildDocumentUriUsingTree(baseUri, documentId); in buildDocumentUriMaybeUsingTree()
966 return buildDocumentUri(baseUri.getAuthority(), documentId); in buildDocumentUriMaybeUsingTree()
/frameworks/base/packages/MtpDocumentsProvider/src/com/android/mtp/
DMtpDatabase.java255 String[] getStorageDocumentIds(String documentId) in getStorageDocumentIds() argument
257 Preconditions.checkArgument(createIdentifier(documentId).mDocumentType == in getStorageDocumentIds()
268 documentId, in getStorageDocumentIds() argument
287 Cursor queryDocument(String documentId, String[] projection) { in queryDocument() argument
292 strings(documentId), in queryDocument()
326 Identifier getParentIdentifier(String documentId) throws FileNotFoundException { in getParentIdentifier() argument
331 strings(documentId), in getParentIdentifier()
340 throw new FileNotFoundException("Cannot find a row having ID = " + documentId); in getParentIdentifier()
397 void deleteDocument(String documentId) { in deleteDocument() argument
398 deleteDocumentsAndRootsRecursively(SELECTION_DOCUMENT_ID, strings(documentId)); in deleteDocument()
[all …]
DMtpDocumentsProvider.java180 public Cursor queryDocument(String documentId, String[] projection) in queryDocument() argument
185 final Cursor cursor = mDatabase.queryDocument(documentId, projection); in queryDocument()
196 final Identifier identifier = mDatabase.createIdentifier(documentId); in queryDocument()
200 final String[] storageDocIds = mDatabase.getStorageDocumentIds(documentId); in queryDocument()
202 return mDatabase.queryDocument(documentId, projection); in queryDocument()
278 String documentId, String mode, CancellationSignal signal) in openDocument() argument
281 Log.d(TAG, "openDocument: " + documentId); in openDocument()
283 final Identifier identifier = mDatabase.createIdentifier(documentId); in openDocument()
293 fileSize = getFileSize(documentId); in openDocument()
302 new MtpProxyFileDescriptorCallback(Integer.parseInt(documentId))); in openDocument()
[all …]
DRootScanner.java157 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()
DIdentifier.java32 Identifier(int deviceId, int storageId, int objectHandle, String documentId, in Identifier() argument
37 mDocumentId = documentId; in Identifier()
DMtpFileWriter.java36 MtpFileWriter(Context context, String documentId) throws IOException { in MtpFileWriter() argument
37 mDocumentId = documentId; in MtpFileWriter()
/frameworks/base/core/tests/coretests/src/android/provider/
DTestDocumentsProvider.java65 public Cursor queryDocument(String documentId, String[] projection) in queryDocument() argument
77 public ParcelFileDescriptor openDocument(String documentId, String mode, in openDocument() argument
83 public boolean isChildDocument(String parentDocumentId, String documentId) { in isChildDocument() argument
88 public Path findDocumentPath(@Nullable String parentDocumentId, String documentId) { in findDocumentPath() argument
89 lastDocumentId = documentId; in findDocumentPath()
/frameworks/base/core/java/com/android/internal/content/
DFileSystemProvider.java136 public @Nullable Bundle getDocumentMetadata(String documentId) in getDocumentMetadata() argument
138 File file = getFileForDocId(documentId); in getDocumentMetadata()
141 throw new FileNotFoundException("Can't find the file for documentId: " + documentId); in getDocumentMetadata()
144 final String mimeType = getDocumentType(documentId); in getDocumentMetadata()
373 public Cursor queryDocument(String documentId, String[] projection) in queryDocument() argument
376 includeFile(result, documentId, null); in queryDocument()
445 public String getDocumentType(String documentId) throws FileNotFoundException { in getDocumentType() argument
446 return getDocumentType(documentId, getFileForDocId(documentId)); in getDocumentType()
449 private String getDocumentType(final String documentId, final File file) in getDocumentType() argument
454 final int lastDot = documentId.lastIndexOf('.'); in getDocumentType()
[all …]
/frameworks/base/packages/MtpDocumentsProvider/tests/src/com/android/mtp/
DMtpDocumentsProviderTest.java610 final String documentId = mProvider.createDocument("2", "text/plain", "test.txt"); in testOpenDocument_writing() local
612 final ParcelFileDescriptor fd = mProvider.openDocument(documentId, "w", null); in testOpenDocument_writing()
620 final ParcelFileDescriptor fd = mProvider.openDocument(documentId, "r", null); in testOpenDocument_writing()
757 final String documentId = mProvider.createDocument("1", "text/plain", "note.txt"); in testCreateDocument() local
764 try (final Cursor cursor = mProvider.queryDocument(documentId, null)) { in testCreateDocument()
984 String documentId; field in MtpDocumentsProviderTest.HierarchyDocument
998 .setName("doc_" + documentId) in toObjectInfo()
1007 private void setupHierarchyDocuments(String documentId) throws Exception { in setupHierarchyDocuments() argument
1011 firstDocument.documentId = documentId; in setupHierarchyDocuments()
1024 0, 0, document.objectHandle, document.documentId, new MtpObjectInfo[] { in setupHierarchyDocuments()
[all …]
/frameworks/base/packages/ExternalStorageProvider/src/com/android/externalstorage/
DTestDocumentsProvider.java145 public Cursor queryDocument(String documentId, String[] projection) in queryDocument() argument
151 includeFile(result, documentId, 0); in queryDocument()