/packages/providers/DownloadProvider/src/com/android/providers/downloads/ |
DownloadStorageProvider.java | 134 public Path findDocumentPath(@Nullable String parentDocId, String docId) throws FileNotFoundException { 146 final File doc = getFileForDocId(docId); 177 public void deleteDocument(String docId) throws FileNotFoundException { 181 if (RawDocumentsHelper.isRawDocId(docId)) { 182 super.deleteDocument(docId); 185 if (mDm.remove(Long.parseLong(docId)) != 1) { 186 throw new IllegalStateException("Failed to delete " + docId); 194 public String renameDocument(String docId, String displayName) 199 if (RawDocumentsHelper.isRawDocId(docId)) { 200 return super.renameDocument(docId, displayName) [all...] |
RawDocumentsHelper.java | 37 public static boolean isRawDocId(String docId) { 38 return docId != null && docId.startsWith(RAW_PREFIX);
|
/frameworks/base/packages/ExternalStorageProvider/src/com/android/externalstorage/ |
ExternalStorageProvider.java | 74 // docId format: root:path/to/file 92 public String docId; 248 root.docId = getDocIdForFile(root.path); 279 root.docId = getDocIdForFile(root.path); 365 protected File getFileForDocId(String docId, boolean visible) throws FileNotFoundException { 366 return getFileForDocId(docId, visible, true); 369 private File getFileForDocId(String docId, boolean visible, boolean mustExist) 371 RootInfo root = getRootFromDocId(docId); 372 return buildFile(root, docId, visible, mustExist); 375 private Pair<RootInfo, File> resolveDocId(String docId, boolean visible [all...] |
TestDocumentsProvider.java | 311 public ParcelFileDescriptor openDocument(String docId, String mode, CancellationSignal signal) 319 String docId, Point sizeHint, CancellationSignal signal) throws FileNotFoundException { 393 private static void includeFile(MatrixCursor result, String docId, int flags) { 395 row.add(Document.COLUMN_DOCUMENT_ID, docId); 396 row.add(Document.COLUMN_DISPLAY_NAME, docId); 400 if (MY_DOC_ID.equals(docId)) { 403 } else if (MY_DOC_NULL.equals(docId)) {
|
/frameworks/base/core/java/com/android/internal/content/ |
FileSystemProvider.java | 81 protected abstract File getFileForDocId(String docId, boolean visible) 86 protected abstract Uri buildNotificationUri(String docId); 92 protected void onDocIdChanged(String docId) { 109 public boolean isChildDocument(String parentDocId, String docId) { 112 final File doc = getFileForDocId(docId).getCanonicalFile(); 116 "Failed to determine if " + docId + " is child of " + parentDocId + ": " + e); 180 public String createDocument(String docId, String mimeType, String displayName) 184 final File parent = getFileForDocId(docId); 233 public String renameDocument(String docId, String displayName) throws FileNotFoundException { 235 // docId, we're okay with letting the MIME type change [all...] |
/development/samples/Vault/src/com/example/android/vault/ |
VaultProvider.java | 222 private EncryptedDocument getDocument(long docId) throws GeneralSecurityException { 223 final File file = new File(mDocumentsDir, String.valueOf(docId)); 224 return new EncryptedDocument(docId, file, mDataKey, mMacKey); 230 private void includeDocument(MatrixCursor result, long docId) 232 final EncryptedDocument doc = getDocument(docId); 234 throw new FileNotFoundException("Missing document " + docId); 332 private void initDocument(long docId, String mimeType, String displayName) 334 final EncryptedDocument doc = getDocument(docId); 339 meta.put(Document.COLUMN_DOCUMENT_ID, docId); 355 final long docId = Long.parseLong(documentId) [all...] |
EncryptedDocument.java | 95 * @param docId the expected {@link Document#COLUMN_DOCUMENT_ID} to be 100 public EncryptedDocument(long docId, File file, SecretKey dataKey, SecretKey macKey) 113 mDocId = docId;
|
/cts/hostsidetests/appsecurity/test-apps/DocumentProvider/src/com/android/cts/documentprovider/ |
MyDocumentsProvider.java | 118 private Doc buildDoc(String docId, String displayName, String mimeType, 121 doc.docId = docId; 125 mDocs.put(doc.docId, doc); 203 public String docId; 215 row.add(Document.COLUMN_DOCUMENT_ID, docId); 227 if (doc.docId.equals(documentId)) { 231 if (isChildDocument(doc.docId, documentId)) { 242 final String docId = "doc:" + mNextDocId.getAndIncrement(); 243 final Doc doc = buildDoc(docId, displayName, mimeType, null) [all...] |
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/base/ |
DocumentInfoTest.java | 56 private static DocumentInfo createDocInfo(String authority, String docId, String mimeType) { 59 doc.documentId = docId;
|
DocumentStackTest.java | 57 private static DocumentInfo createDir(String docId) { 60 info.documentId = docId; 61 info.displayName = docId;
|
/frameworks/base/packages/Shell/src/com/android/shell/ |
BugreportStorageProvider.java | 94 protected Uri buildNotificationUri(String docId) { 95 return DocumentsContract.buildChildDocumentsUri(AUTHORITY, docId); 132 protected RowBuilder includeFile(MatrixCursor result, String docId, File file) 134 RowBuilder row = super.includeFile(result, docId, file);
|
/packages/providers/MediaProvider/src/com/android/providers/media/ |
MediaDocumentsProvider.java | 244 private static Ident getIdentForDocId(String docId) { 246 final int split = docId.indexOf(':'); 248 ident.type = docId; 251 ident.type = docId.substring(0, split); 252 ident.id = Long.parseLong(docId.substring(split + 1)); 269 private Uri getUriForDocumentId(String docId) { 270 final Ident ident = getIdentForDocId(docId); 281 throw new UnsupportedOperationException("Unsupported document " + docId); 286 public void deleteDocument(String docId) throws FileNotFoundException { 287 final Uri target = getUriForDocumentId(docId); [all...] |
/packages/apps/DocumentsUI/src/com/android/documentsui/base/ |
SharedMinimal.java | 213 final String docId = bundle == null ? null : bundle.getString("DOC_ID"); 214 if (docId == null) { 219 if (DEBUG) Log.d(TAG, "doc id for " + file + ": " + docId); 221 final Uri uri = DocumentsContract.buildTreeDocumentUri(Providers.AUTHORITY_STORAGE, docId); 223 Log.e(TAG, "Could not get URI for doc id " + docId);
|
/packages/apps/DocumentsUI/src/com/android/documentsui/ |
LoadDocStackTask.java | 68 final String docId = DocumentsContract.getDocumentId(uris[0]); 69 docUri = DocumentsContract.buildDocumentUri(uris[0].getAuthority(), docId);
|
DocumentsAccess.java | 95 for (String docId : docIds) { 96 final Uri uri = DocumentsContract.buildDocumentUri(authority, docId);
|
IconUtils.java | 43 Context context, String mimeType, String authority, String docId, int mode) {
|
/packages/apps/DocumentsUI/tests/common/com/android/documentsui/dirlist/ |
TestDocumentsAdapter.java | 118 public int getAdapterPosition(String docId) { 119 return mModelIds.indexOf(docId);
|
/developers/build/prebuilts/gradle/StorageProvider/Application/src/main/java/com/example/android/storageprovider/ |
MyCloudProvider.java | 470 * @param docId the document ID representing the desired file (may be null if given file) 471 * @param file the File object representing the desired file (may be null if given docID) 474 private void includeFile(MatrixCursor result, String docId, File file) 476 if (docId == null) { 477 docId = getDocIdForFile(file); 479 file = getFileForDocId(docId); 509 row.add(Document.COLUMN_DOCUMENT_ID, docId); 523 * @param docId the document ID representing the desired file 527 private File getFileForDocId(String docId) throws FileNotFoundException { 529 if (docId.equals(ROOT)) [all...] |
/developers/samples/android/content/documentsUi/StorageProvider/Application/src/main/java/com/example/android/storageprovider/ |
MyCloudProvider.java | 470 * @param docId the document ID representing the desired file (may be null if given file) 471 * @param file the File object representing the desired file (may be null if given docID) 474 private void includeFile(MatrixCursor result, String docId, File file) 476 if (docId == null) { 477 docId = getDocIdForFile(file); 479 file = getFileForDocId(docId); 509 row.add(Document.COLUMN_DOCUMENT_ID, docId); 523 * @param docId the document ID representing the desired file 527 private File getFileForDocId(String docId) throws FileNotFoundException { 529 if (docId.equals(ROOT)) [all...] |
/development/samples/browseable/StorageProvider/src/com.example.android.storageprovider/ |
MyCloudProvider.java | 470 * @param docId the document ID representing the desired file (may be null if given file) 471 * @param file the File object representing the desired file (may be null if given docID) 474 private void includeFile(MatrixCursor result, String docId, File file) 476 if (docId == null) { 477 docId = getDocIdForFile(file); 479 file = getFileForDocId(docId); 509 row.add(Document.COLUMN_DOCUMENT_ID, docId); 523 * @param docId the document ID representing the desired file 527 private File getFileForDocId(String docId) throws FileNotFoundException { 529 if (docId.equals(ROOT)) [all...] |
/frameworks/base/core/tests/coretests/src/android/provider/ |
DocumentsProviderTest.java | 36 private static final String DOCUMENT_ID = "docId"; 114 private static Uri buildTreeDocumentUri(String authority, String parentDocId, String docId) { 116 return DocumentsContract.buildDocumentUriUsingTree(treeUri, docId);
|
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/ |
ModelTest.java | 145 String docId = DocumentInfo.getCursorString(cOut, Document.COLUMN_DOCUMENT_ID); 149 b0.set(Integer.parseInt(docId)); 152 b1.set(Integer.parseInt(docId));
|
/packages/apps/DocumentsUI/perf-tests/src/com/android/documentsui/ |
StressProvider.java | 164 public AssetFileDescriptor openDocumentThumbnail(String docId, Point sizeHint, 167 final StubDocument document = mDocuments.get(docId); 172 public ParcelFileDescriptor openDocument(String docId, String mode,
|
/packages/apps/DocumentsUI/tests/common/com/android/documentsui/ |
StubProvider.java | 183 public boolean isChildDocument(String parentDocId, String docId) { 185 final StubDocument childDocument = mStorage.get(docId); 338 public ParcelFileDescriptor openDocument(String docId, String mode, CancellationSignal signal) 341 final StubDocument document = mStorage.get(docId); 350 if (mSimulateReadErrorIds.contains(docId)) { 379 String docId, Point sizeHint, CancellationSignal signal) throws FileNotFoundException { 385 String docId, String mimeTypeFilter, Bundle opts, CancellationSignal signal) 387 final StubDocument document = mStorage.get(docId); 397 if (mSimulateReadErrorIds.contains(docId)) { [all...] |
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/archives/ |
ResourcesProvider.java | 123 public ParcelFileDescriptor openDocument(String docId, String mode, CancellationSignal signal) 125 final Integer resourceId = RESOURCES.get(docId);
|