Home
last modified time | relevance | path

Searched refs:mimeTypes (Results 1 – 18 of 18) sorted by relevance

/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/base/
DDocumentInfoTest.java119 final Set<String> mimeTypes = new HashSet<>(); in testFolderMimeTypeFromUri() local
120 DocumentInfo.addMimeTypes(mResolver, validUri, mimeTypes); in testFolderMimeTypeFromUri()
122 assertThat(mimeTypes.size()).isEqualTo(1); in testFolderMimeTypeFromUri()
124 assertThat(mimeTypes.contains(DocumentsContract.Document.MIME_TYPE_DIR)).isTrue(); in testFolderMimeTypeFromUri()
132 final Set<String> mimeTypes = new HashSet<>(); in testFileMimeTypeFromUri() local
133 DocumentInfo.addMimeTypes(mResolver, validUri, mimeTypes); in testFileMimeTypeFromUri()
135 assertThat(mimeTypes.size()).isEqualTo(1); in testFileMimeTypeFromUri()
137 assertThat(mimeTypes.contains("text/plain")).isTrue(); in testFileMimeTypeFromUri()
DStateTest.java111 final String[] mimeTypes = { "audio/mp3", "video/mp4" }; in testPhotoPicking_noImageType() local
112 mIntent.putExtra(Intent.EXTRA_MIME_TYPES, mimeTypes); in testPhotoPicking_noImageType()
121 final String[] mimeTypes = { "image/gif", "image/jpg", "audio/mp3" }; in testPhotoPicking_oneIsNotImageType() local
122 mIntent.putExtra(Intent.EXTRA_MIME_TYPES, mimeTypes); in testPhotoPicking_oneIsNotImageType()
139 final String[] mimeTypes = null; in testPhotoPicking_nullExrta() local
140 mIntent.putExtra(Intent.EXTRA_MIME_TYPES, mimeTypes); in testPhotoPicking_nullExrta()
/packages/providers/MediaProvider/src/com/android/providers/media/
DMediaDocumentsProvider.java297 String[] mimeTypes, long lastModifiedAfter, long fileSizeOver, String columnDisplayName, in buildSearchSelection() argument
325 if (mimeTypes != null && mimeTypes.length > 0) { in buildSearchSelection()
326 for (int i = 0; i < mimeTypes.length; i++) { in buildSearchSelection()
327 final String type = mimeTypes[i]; in buildSearchSelection()
353 private static boolean shouldFilterMimeType(String[] mimeTypes, String filter, in shouldFilterMimeType() argument
357 if (mimeTypes != null) { in shouldFilterMimeType()
358 for (int i = 0; i < mimeTypes.length; i++) { in shouldFilterMimeType()
361 if (TextUtils.equals(mimeTypes[i], "*/*") || in shouldFilterMimeType()
362 TextUtils.equals(mimeTypes[i], filter)) { in shouldFilterMimeType()
367 if (MimeTypeFilter.matches(mimeTypes[i], filter)) { in shouldFilterMimeType()
[all …]
DMediaProvider.java4108 final String[] mimeTypes = new String[deletedDownloadIds.size()]; in deleteInternal() local
4111 mimeTypes[i] = deletedDownloadIds.valueAt(i); in deleteInternal()
4114 extras.putStringArray(android.provider.Downloads.EXTRA_MIME_TYPES, mimeTypes); in deleteInternal()
/packages/apps/DocumentsUI/src/com/android/documentsui/base/
DRootInfo.java96 public String mimeTypes; field in RootInfo
121 mimeTypes = null; in reset()
145 mimeTypes = DurableUtils.readNullableString(in); in read()
165 DurableUtils.writeNullableString(out, mimeTypes); in write()
202 root.mimeTypes = getCursorString(cursor, Root.COLUMN_MIME_TYPES); in fromRootsCursor()
209 derivedMimeTypes = (mimeTypes != null) ? mimeTypes.split("\n") : null; in deriveFields()
DMimeTypes.java50 public static String findCommonMimeType(List<String> mimeTypes) { in findCommonMimeType() argument
51 String[] commonType = splitMimeType(mimeTypes.get(0)); in findCommonMimeType()
56 for (int i = 1; i < mimeTypes.size(); i++) { in findCommonMimeType()
57 String[] type = mimeTypes.get(i).split("/"); in findCommonMimeType()
DDocumentInfo.java385 public static void addMimeTypes(ContentResolver resolver, Uri uri, Set<String> mimeTypes) { in addMimeTypes() argument
390 mimeTypes.add(type); in addMimeTypes()
398 mimeTypes.addAll(Arrays.asList(streamTypes)); in addMimeTypes()
/packages/apps/UnifiedEmail/src/com/android/mail/compose/
DAttachmentsView.java277 final String[] mimeTypes = contentResolver.getStreamTypes(contentUri, "*/*"); in generateLocalAttachment() local
278 if (mimeTypes != null && mimeTypes.length > 0) { in generateLocalAttachment()
279 attachment.virtualMimeType = mimeTypes[0]; in generateLocalAttachment()
/packages/apps/DocumentsUI/src/com/android/documentsui/queries/
DSearchChipViewManager.java187 final String[] mimeTypes = chipData.getMimeTypes(); in initChipSets() local
188 final boolean isMatched = MimeTypes.mimeMatches(acceptMimeTypes, mimeTypes); in initChipSets()
211 final String[] mimeTypes = chipData.getMimeTypes(); in updateChips() local
212 final boolean isMatched = MimeTypes.mimeMatches(acceptMimeTypes, mimeTypes); in updateChips()
DSearchChipData.java29 public SearchChipData(int chipType, int titleRes, String[] mimeTypes) { in SearchChipData() argument
32 mMimeTypes = mimeTypes; in SearchChipData()
/packages/providers/DownloadProvider/src/com/android/providers/downloads/
DDownloadStorageProvider.java132 static void onMediaProviderDownloadsDelete(Context context, long[] ids, String[] mimeTypes) { in onMediaProviderDownloadsDelete() argument
134 final boolean isDir = mimeTypes[i] == null; in onMediaProviderDownloadsDelete()
1011 final String[] mimeTypes = queryArgs.getStringArray( in buildSearchSelection() local
1013 if (mimeTypes != null && mimeTypes.length > 0) { in buildSearchSelection()
1018 for (int i = 0; i < mimeTypes.length; ++i) { in buildSearchSelection()
1019 selection.append("?").append((i == mimeTypes.length - 1) ? ")" : ","); in buildSearchSelection()
1020 selectionArgs.add(mimeTypes[i]); in buildSearchSelection()
DDownloadProvider.java701 final String[] mimeTypes = extras.getStringArray(Downloads.EXTRA_MIME_TYPES); in call() local
703 deletedDownloadIds, mimeTypes); in call() local
/packages/apps/Messaging/src/com/android/messaging/datamodel/
DGalleryBoundCursorLoader.java45 private static String createSelection(final String[] mimeTypes, Integer[] mediaTypes) { in createSelection() argument
46 return Media.MIME_TYPE + " IN ('" + Joiner.on("','").join(mimeTypes) + "') AND " in createSelection()
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/queries/
DSearchViewManagerTest.java346 final String[] mimeTypes = queryArgs.getStringArray(QUERY_ARG_MIME_TYPES); in testBuildQueryArgs_hasMimeType() local
347 assertTrue(mimeTypes.length > 0); in testBuildQueryArgs_hasMimeType()
348 assertEquals("image/*", mimeTypes[0]); in testBuildQueryArgs_hasMimeType()
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/roots/
DProvidersAccessTest.java165 private static RootInfo buildForMimeTypes(String... mimeTypes) { in buildForMimeTypes() argument
167 root.derivedMimeTypes = mimeTypes; in buildForMimeTypes()
/packages/apps/CertInstaller/src/com/android/certinstaller/
DCertInstallerMain.java107 final String[] mimeTypes = MIME_MAPPINGS.keySet().toArray(new String[0]); in onCreate() local
110 openIntent.putExtra(Intent.EXTRA_MIME_TYPES, mimeTypes); in onCreate()
/packages/apps/Dialer/java/com/android/voicemail/impl/imap/
DImapHelper.java616 List<String> mimeTypes = new ArrayList<>(); in getVoicemailPayloadFromMessage() local
620 mimeTypes.add(bodyPartMimeType); in getVoicemailPayloadFromMessage()
627 LogUtils.e(TAG, "No audio attachment found on this voicemail, mimeTypes:" + mimeTypes); in getVoicemailPayloadFromMessage()
/packages/apps/DocumentsUI/src/com/android/documentsui/files/
DActionHandler.java373 final ArrayList<String> mimeTypes = new ArrayList<>(); in shareSelectedDocuments() local
376 mimeTypes.add(doc.mimeType); in shareSelectedDocuments()
380 intent.setType(MimeTypes.findCommonMimeType(mimeTypes)); in shareSelectedDocuments()