Home
last modified time | relevance | path

Searched refs:docId (Results 1 – 21 of 21) sorted by relevance

/packages/providers/DownloadProvider/src/com/android/providers/downloads/
DMediaStoreDownloadsHelper.java31 public static boolean isMediaStoreDownload(String docId) { in isMediaStoreDownload() argument
32 return docId != null && (docId.startsWith(MEDIASTORE_DOWNLOAD_FILE_PREFIX) in isMediaStoreDownload()
33 || docId.startsWith(MEDIASTORE_DOWNLOAD_DIR_PREFIX)); in isMediaStoreDownload()
36 public static long getMediaStoreId(String docId) { in getMediaStoreId() argument
37 return Long.parseLong(getMediaStoreIdString(docId)); in getMediaStoreId()
41 public static String getMediaStoreIdString(String docId) { in getMediaStoreIdString() argument
42 final int index = docId.indexOf(":"); in getMediaStoreIdString()
43 return docId.substring(index + 1); in getMediaStoreIdString()
46 public static boolean isMediaStoreDownloadDir(String docId) { in isMediaStoreDownloadDir() argument
47 return docId != null && docId.startsWith(MEDIASTORE_DOWNLOAD_DIR_PREFIX); in isMediaStoreDownloadDir()
[all …]
DDownloadStorageProvider.java180 …public Path findDocumentPath(@Nullable String parentDocId, String docId) throws FileNotFoundExcept… in findDocumentPath() argument
192 final File doc = getFileForDocId(docId); in findDocumentPath()
224 public void deleteDocument(String docId) throws FileNotFoundException { in deleteDocument() argument
228 if (RawDocumentsHelper.isRawDocId(docId) || isMediaStoreDownload(docId)) { in deleteDocument()
229 super.deleteDocument(docId); in deleteDocument()
233 if (mDm.remove(Long.parseLong(docId)) != 1) { in deleteDocument()
234 throw new IllegalStateException("Failed to delete " + docId); in deleteDocument()
242 public String renameDocument(String docId, String displayName) in renameDocument() argument
247 if (RawDocumentsHelper.isRawDocId(docId) in renameDocument()
248 || isMediaStoreDownloadDir(docId)) { in renameDocument()
[all …]
DRawDocumentsHelper.java37 public static boolean isRawDocId(String docId) { in isRawDocId() argument
38 return docId != null && docId.startsWith(RAW_PREFIX); in isRawDocId()
/packages/providers/MediaProvider/src/com/android/providers/media/
DMediaDocumentsProvider.java268 private static Ident getIdentForDocId(String docId) { in getIdentForDocId() argument
270 final int split = docId.indexOf(':'); in getIdentForDocId()
272 ident.type = docId; in getIdentForDocId()
275 ident.type = docId.substring(0, split); in getIdentForDocId()
276 ident.id = Long.parseLong(docId.substring(split + 1)); in getIdentForDocId()
417 private Uri getUriForDocumentId(String docId) { in getUriForDocumentId() argument
418 final Ident ident = getIdentForDocId(docId); in getUriForDocumentId()
432 throw new UnsupportedOperationException("Unsupported document " + docId); in getUriForDocumentId()
445 final String docId = DocumentsContract.getDocumentId(documentUri); in call() local
447 final Uri uri = getUriForDocumentId(docId); in call()
[all …]
/packages/apps/DocumentsUI/src/com/android/documentsui/
DModelId.java23 public static final String build(UserId userId, String authority, String docId) { in build() argument
24 if (userId == null || authority == null || authority.isEmpty() || docId == null in build()
25 || docId.isEmpty()) { in build()
28 return userId + "|" + authority + "|" + docId; in build()
DLoadDocStackTask.java73 final String docId = DocumentsContract.getDocumentId(uris[0]); in run() local
74 docUri = DocumentsContract.buildDocumentUri(uris[0].getAuthority(), docId); in run()
DDocumentsAccess.java110 for (String docId : docIds) { in getDocuments()
111 final Uri uri = DocumentsContract.buildDocumentUri(authority, docId); in getDocuments()
DIconUtils.java52 Context context, String mimeType, String authority, String docId, int mode) { in loadMimeIcon() argument
/packages/apps/DocumentsUI/src/com/android/documentsui/util/
DFileUtils.java48 public static String getPathFromStorageDocId(String docId) throws IOException { in getPathFromStorageDocId() argument
51 final String docIdPath = docId.substring(docId.indexOf(':', 1) + 1); in getPathFromStorageDocId()
/packages/providers/MediaProvider/tests/src/com/android/providers/media/
DMediaDocumentsProviderTest.java174 final String docId = c.getString(c.getColumnIndex(Root.COLUMN_DOCUMENT_ID)); in testTraverse() local
175 final Uri children = DocumentsContract.buildChildDocumentsUri(AUTHORITY, docId); in testTraverse()
187 final String docId = c.getString(c.getColumnIndex(Document.COLUMN_DOCUMENT_ID)); in doTraversal() local
190 final Uri uri = DocumentsContract.buildDocumentUri(AUTHORITY, docId); in doTraversal()
191 final Uri grandchild = DocumentsContract.buildChildDocumentsUri(AUTHORITY, docId); in doTraversal()
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/base/
DDocumentStackTest.java59 private static DocumentInfo createDir(String docId) { in createDir() argument
62 info.documentId = docId; in createDir()
63 info.displayName = docId; in createDir()
DDocumentInfoTest.java69 private static DocumentInfo createDocInfo(String authority, String docId, String mimeType) { in createDocInfo() argument
73 doc.documentId = docId; in createDocInfo()
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/
DModelTest.java146 String docId = DocumentInfo.getCursorString(cOut, Document.COLUMN_DOCUMENT_ID); in testModelIdIsUnique() local
150 b0.set(Integer.parseInt(docId)); in testModelIdIsUnique()
153 b1.set(Integer.parseInt(docId)); in testModelIdIsUnique()
/packages/providers/MediaProvider/pdf/framework/java/android/graphics/pdf/logging/
DPdfEventLogger.java41 public PdfEventLogger(int processId, long docId) { in PdfEventLogger() argument
43 mDocId = docId; in PdfEventLogger()
/packages/apps/DocumentsUI/tests/common/com/android/documentsui/
DStubProvider.java187 public boolean isChildDocument(String parentDocId, String docId) { in isChildDocument() argument
189 final StubDocument childDocument = mStorage.get(docId); in isChildDocument()
358 public ParcelFileDescriptor openDocument(String docId, String mode, CancellationSignal signal) in openDocument() argument
361 final StubDocument document = mStorage.get(docId); in openDocument()
370 if (mSimulateReadErrorIds.contains(docId)) { in openDocument()
399 String docId, Point sizeHint, CancellationSignal signal) throws FileNotFoundException { in openDocumentThumbnail() argument
405 String docId, String mimeTypeFilter, Bundle opts, CancellationSignal signal) in openTypedDocument() argument
407 final StubDocument document = mStorage.get(docId); in openTypedDocument()
417 if (mSimulateReadErrorIds.contains(docId)) { in openTypedDocument()
/packages/apps/DocumentsUI/tests/common/com/android/documentsui/dirlist/
DTestDocumentsAdapter.java118 public int getAdapterPosition(String docId) { in getAdapterPosition() argument
119 return mModelIds.indexOf(docId); in getAdapterPosition()
/packages/apps/DocumentsUI/perf-tests/src/com/android/documentsui/
DStressProvider.java164 public AssetFileDescriptor openDocumentThumbnail(String docId, Point sizeHint, in openDocumentThumbnail() argument
167 final StubDocument document = mDocuments.get(docId); in openDocumentThumbnail()
172 public ParcelFileDescriptor openDocument(String docId, String mode, in openDocument() argument
/packages/apps/Traceur/src/com/android/traceur/
DStorageProvider.java153 protected Uri buildNotificationUri(String docId) { in buildNotificationUri() argument
154 return DocumentsContract.buildChildDocumentsUri(AUTHORITY, docId); in buildNotificationUri()
/packages/apps/DocumentsUI/tests/functional/com/android/documentsui/archives/
DResourcesProvider.java125 public ParcelFileDescriptor openDocument(String docId, String mode, CancellationSignal signal) in openDocument() argument
127 final Integer resourceId = RESOURCES.get(docId); in openDocument()
/packages/apps/DocumentsUI/src/com/android/documentsui/picker/
DActionHandler.java241 final String docId = DocumentsContract.getDocumentId(uri); in shouldPreemptivelyRestrictRequestedInitialUri() local
244 filePath = FileUtils.getPathFromStorageDocId(docId); in shouldPreemptivelyRestrictRequestedInitialUri()
246 Log.w(TAG, "Could not get canonical file path from docId '" + docId + "'"); in shouldPreemptivelyRestrictRequestedInitialUri()
/packages/services/Mtp/src/com/android/mtp/
DMtpDocumentsProvider.java560 public @Nullable Bundle getDocumentMetadata(String docId) throws FileNotFoundException { in getDocumentMetadata() argument
561 String mimeType = getDocumentType(docId); in getDocumentMetadata()
570 openDocument(docId, "r", null)); in getDocumentMetadata()