/packages/apps/DocumentsUI/src/com/android/documentsui/archives/ |
ArchiveId.java | 37 static public ArchiveId fromDocumentId(String documentId) { 38 final int delimiterPosition = documentId.indexOf(DELIMITER); 41 final int secondDelimiterPosition = documentId.indexOf(DELIMITER, delimiterPosition + 1); 44 final String archiveUriPart = documentId.substring(0, delimiterPosition); 45 final String accessModePart = documentId.substring(delimiterPosition + 1, 48 final String pathPart = documentId.substring(secondDelimiterPosition + 1);
|
ArchivesProvider.java | 103 public Cursor queryChildDocuments(String documentId, @Nullable String[] projection, 106 final ArchiveId archiveId = ArchiveId.fromDocumentId(documentId); 107 final Loader loader = getLoaderOrThrow(documentId); 111 return loader.get().queryChildDocuments(documentId, projection, sortOrder); 139 public String getDocumentType(String documentId) throws FileNotFoundException { 140 final ArchiveId archiveId = ArchiveId.fromDocumentId(documentId); 145 final Loader loader = getLoaderOrThrow(documentId); 146 return loader.get().getDocumentType(documentId); 150 public boolean isChildDocument(String parentDocumentId, String documentId) { 151 final Loader loader = getLoaderOrThrow(documentId); [all...] |
Archive.java | 127 public Cursor queryChildDocuments(String documentId, @Nullable String[] projection, 129 final ArchiveId parsedParentId = ArchiveId.fromDocumentId(documentId); 156 public String getDocumentType(String documentId) throws FileNotFoundException { 157 final ArchiveId parsedId = ArchiveId.fromDocumentId(documentId); 176 public boolean isChildDocument(String parentDocumentId, String documentId) { 178 final ArchiveId parsedId = ArchiveId.fromDocumentId(documentId); 208 public Cursor queryDocument(String documentId, @Nullable String[] projection) 210 final ArchiveId parsedId = ArchiveId.fromDocumentId(documentId); 246 String documentId, String mode, @Nullable final CancellationSignal signal) 257 String documentId, Point sizeHint, final CancellationSignal signal [all...] |
ReadableArchive.java | 225 String documentId, String mode, @Nullable final CancellationSignal signal) 229 final ArchiveId parsedId = ArchiveId.fromDocumentId(documentId); 248 String documentId, Point sizeHint, final CancellationSignal signal) 250 final ArchiveId parsedId = ArchiveId.fromDocumentId(documentId); 253 Preconditions.checkArgument(getDocumentType(documentId).startsWith("image/"), 283 openDocument(documentId, "r", signal), range[0], range[1], extras); 293 openDocument(documentId, "r", signal), 0, entry.getSize(), null);
|
/frameworks/base/packages/Shell/src/com/android/shell/ |
BugreportStorageProvider.java | 71 public Cursor queryDocument(String documentId, String[] projection) 73 if (DOC_ID_ROOT.equals(documentId)) { 78 return super.queryDocument(documentId, projection); 84 String documentId, String mode, CancellationSignal signal) 87 throw new FileNotFoundException("Failed to open: " + documentId + ", mode = " + mode); 89 return ParcelFileDescriptor.open(getFileForDocId(documentId), 112 protected File getFileForDocId(String documentId, boolean visible) 114 if (DOC_ID_ROOT.equals(documentId)) { 117 final int splitIndex = documentId.indexOf(':', 1); 118 final String name = documentId.substring(splitIndex + 1) [all...] |
/packages/apps/DocumentsUI/tests/common/com/android/documentsui/ |
BrokenProvider.java | 47 public Cursor queryDocument(String documentId, String[] projection) 49 if (BROKEN_ROOT_DOCUMENT_ID.equals(documentId)) {
|
BrokenSettingsEnabledProvider.java | 42 public Cursor queryDocument(String documentId, String[] projection) 49 addFolder(c, documentId);
|
StubProvider.java | 137 mStorage.put(rootInfo.document.documentId, rootInfo.document); 163 row.add(Root.COLUMN_DOCUMENT_ID, info.document.documentId); 170 public Cursor queryDocument(String documentId, String[] projection) 174 final StubDocument file = mStorage.get(documentId); 196 mStorage.put(document.documentId, document); 197 Log.d(TAG, "Created document " + document.documentId); 200 DocumentsContract.buildDocumentUri(mAuthority, document.documentId), 203 return document.documentId; 207 public void deleteDocument(String documentId) 209 final StubDocument document = mStorage.get(documentId); [all...] |
DocumentsProviderHelper.java | 70 public RootInfo getRoot(String documentId) throws RemoteException { 76 if (documentId.equals(getCursorString(cursor, Root.COLUMN_ROOT_ID))) { 80 throw new IllegalArgumentException("Can't find matching root for id=" + documentId); 82 throw new RuntimeException("Can't load root for id=" + documentId , e); 107 return createDocument(root.documentId, mimeType, name); 110 public Uri createDocumentWithFlags(String documentId, String mimeType, String name, int flags, 115 in.putString(StubProvider.EXTRA_PARENT_ID, documentId); 171 assertChildCount(root.documentId, expected); 190 assertHasFile(root.documentId, name); 209 assertHasDirectory(root.documentId, name) [all...] |
InspectorProvider.java | 50 public Cursor queryDocument(String documentId, String[] projection) 53 if (OPEN_IN_PROVIDER_TEST.equals(documentId)) { 60 addFolder(c, documentId);
|
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/services/ |
JobErrorHandlingTest.java | 42 DocumentsContract.buildDocumentUri(AUTHORITY, mSrcRoot.documentId)).run(); 57 DocumentsContract.buildDocumentUri(AUTHORITY, mSrcRoot.documentId)).run(); 71 DocumentsContract.buildDocumentUri(AUTHORITY, mSrcRoot.documentId)).run(); 81 Uri stack = DocumentsContract.buildDocumentUri(AUTHORITY, mSrcRoot.documentId);
|
AbstractCopyJobTest.java | 52 mDocs.assertFileContents(mDestRoot.documentId, "test1.txt", HAM_BYTES); 53 mDocs.assertFileContents(mDestRoot.documentId, "test2.txt", FRUITY_BYTES); 67 mDocs.assertFileContents(mDestRoot.documentId, "virtual.sth.pdf", FRUITY_BYTES); 105 DocumentInfo dir1Copy = mDocs.findDocument(mDestRoot.documentId, "dir1"); 111 DocumentInfo dir2Copy = mDocs.findDocument(dir1Copy.documentId, "dir2"); 121 DocumentsContract.buildDocumentUri(AUTHORITY, mSrcRoot.documentId), 137 DocumentsContract.buildDocumentUri(AUTHORITY, mSrcRoot.documentId), 174 Uri srcParent = DocumentsContract.buildDocumentUri(AUTHORITY, mSrcRoot.documentId); 179 Uri destination = DocumentsContract.buildDocumentUri(AUTHORITY, mDestRoot.documentId);
|
DeleteJobTest.java | 40 DocumentsContract.buildDocumentUri(AUTHORITY, mSrcRoot.documentId)).run(); 63 Uri stack = DocumentsContract.buildDocumentUri(AUTHORITY, mSrcRoot.documentId);
|
MoveJobTest.java | 52 mDocs.assertFileContents(mDestRoot.documentId, "test1.txt", HAM_BYTES); 53 mDocs.assertFileContents(mDestRoot.documentId, "test2.txt", FRUITY_BYTES); 80 mSrcRoot.documentId, "virtual/mime-type", "tokyo.sth",
|
/frameworks/base/core/tests/coretests/src/android/provider/ |
TestDocumentsProvider.java | 65 public Cursor queryDocument(String documentId, String[] projection) 77 public ParcelFileDescriptor openDocument(String documentId, String mode, 83 public boolean isChildDocument(String parentDocumentId, String documentId) { 88 public Path findDocumentPath(@Nullable String parentDocumentId, String documentId) { 89 lastDocumentId = documentId;
|
/frameworks/base/packages/MtpDocumentsProvider/src/com/android/mtp/ |
RootScanner.java | 157 final String documentId = mDatabase.getDocumentIdForDevice(device.deviceId); 158 if (documentId == null) { 162 mDatabase.getMapper().startAddingDocuments(documentId); 164 documentId, device.operationsSupported, device.roots)) { 167 if (mDatabase.getMapper().stopAddingDocuments(documentId)) {
|
Identifier.java | 32 Identifier(int deviceId, int storageId, int objectHandle, String documentId, 37 mDocumentId = documentId;
|
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/archives/ |
ResourcesProvider.java | 87 public Cursor queryDocument(String documentId, String[] projection) 91 if ("root-document-id".equals(documentId)) { 101 includeDocument(result, documentId); 115 for (String documentId : RESOURCES.keySet()) { 116 includeDocument(result, documentId); 131 void includeDocument(MatrixCursor result, String documentId) throws FileNotFoundException { 132 final Integer resourceId = RESOURCES.get(documentId); 141 row.add(Document.COLUMN_DOCUMENT_ID, documentId); 143 row.add(Document.COLUMN_DISPLAY_NAME, documentId); 145 final int lastDot = documentId.lastIndexOf('.') [all...] |
WriteableArchiveTest.java | 91 final String documentId = mArchive.createDocument(dirDocumentId, "image/jpeg", "test.jpeg"); 92 assertEquals(createArchiveId("/dir/test.jpeg").toDocumentId(), documentId); 152 final String documentId = mArchive.createDocument(createArchiveId("/").toDocumentId(), 156 final Cursor cursor = mArchive.queryDocument(documentId, null); 158 assertEquals(documentId, 173 assertEquals(documentId, 202 final String documentId = mArchive.createDocument(createArchiveId("/").toDocumentId(), 206 final Cursor cursor = mArchive.queryDocument(documentId, null); 208 assertEquals(documentId, 219 mArchive.openDocument(documentId, "r", null) [all...] |
/cts/hostsidetests/appsecurity/test-apps/DocumentProvider/src/com/android/cts/documentprovider/ |
MyDocumentsProvider.java | 225 public boolean isChildDocument(String parentDocumentId, String documentId) { 227 if (doc.docId.equals(documentId)) { 231 if (isChildDocument(doc.docId, documentId)) { 250 public String renameDocument(String documentId, String displayName) 252 mDocs.get(documentId).displayName = displayName; 257 public void deleteDocument(String documentId) throws FileNotFoundException { 258 final Doc doc = mDocs.get(documentId); 266 public void removeDocument(String documentId, String parentDocumentId) 270 final Doc doc = mDocs.get(documentId); 300 public Path findDocumentPath(String parentDocumentId, String documentId) [all...] |
WebLinkActivity.java | 37 final String documentId = getIntent().getStringExtra(EXTRA_DOCUMENT_ID); 42 .setMessage(documentId)
|
/frameworks/base/core/java/android/provider/ |
DocumentsProvider.java | 209 * @param documentId child to verify. 213 public boolean isChildDocument(String parentDocumentId, String documentId) { 265 * @param documentId the document to rename. 274 public String renameDocument(String documentId, String displayName) 288 * @param documentId the document to delete. 294 public void deleteDocument(String documentId) throws FileNotFoundException { 353 * @param documentId the document to remove. 360 public void removeDocument(String documentId, String parentDocumentId) 410 * @param documentId the document to create a web link intent for. 419 public IntentSender createWebLinkIntent(String documentId, @Nullable Bundle options [all...] |
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/ |
AbstractActionHandlerTest.java | 119 Arrays.asList(TestEnv.FOLDER_1.documentId, TestEnv.FOLDER_2.documentId)); 169 TestEnv.FOLDER_0.documentId, 170 TestEnv.FOLDER_1.documentId, 171 TestEnv.FILE_GIF.documentId)); 195 TestEnv.FOLDER_0.documentId, 196 TestEnv.FOLDER_1.documentId, 197 TestEnv.FILE_GIF.documentId)); 202 TestProvidersAccess.HOME.authority, TestEnv.FOLDER_0.documentId); 204 treeBaseUri, TestEnv.FILE_GIF.documentId); [all...] |
/packages/apps/DocumentsUI/tests/common/com/android/documentsui/testing/ |
TestDocumentsProvider.java | 70 public Cursor queryDocument(String documentId, String[] projection) 82 public ParcelFileDescriptor openDocument(String documentId, String mode, 113 .add(Document.COLUMN_DOCUMENT_ID, doc.documentId)
|
/developers/build/prebuilts/gradle/StorageProvider/Application/src/main/java/com/example/android/storageprovider/ |
MyCloudProvider.java | 246 public AssetFileDescriptor openDocumentThumbnail(String documentId, Point sizeHint, 251 final File file = getFileForDocId(documentId); 260 public Cursor queryDocument(String documentId, String[] projection) 266 includeFile(result, documentId, null); 292 public ParcelFileDescriptor openDocument(final String documentId, final String mode, 301 final File file = getFileForDocId(documentId); 315 Log.i(TAG, "A file with id " + documentId + " has been closed! Time to " + 321 throw new FileNotFoundException("Failed to open document with id " + documentId + 333 public String createDocument(String documentId, String mimeType, String displayName) 337 File parent = getFileForDocId(documentId); [all...] |