Home
last modified time | relevance | path

Searched refs:mimeTypes (Results 1 – 17 of 17) 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.java114 final String[] mimeTypes = { "audio/mp3", "video/mp4" }; in testPhotoPicking_noImageType() local
115 mIntent.putExtra(Intent.EXTRA_MIME_TYPES, mimeTypes); in testPhotoPicking_noImageType()
124 final String[] mimeTypes = { "image/gif", "image/jpg", "audio/mp3" }; in testPhotoPicking_oneIsNotImageType() local
125 mIntent.putExtra(Intent.EXTRA_MIME_TYPES, mimeTypes); in testPhotoPicking_oneIsNotImageType()
142 final String[] mimeTypes = null; in testPhotoPicking_nullExrta() local
143 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.java4109 final String[] mimeTypes = new String[deletedDownloadIds.size()]; in deleteInternal() local
4112 mimeTypes[i] = deletedDownloadIds.valueAt(i); in deleteInternal()
4115 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/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.java727 final String[] mimeTypes = extras.getStringArray(Downloads.EXTRA_MIME_TYPES); in call() local
729 deletedDownloadIds, mimeTypes); in call() local
/packages/apps/Messaging/src/com/android/messaging/datamodel/
DGalleryBoundCursorLoader.java49 private static String createSelection(final String[] mimeTypes, Integer[] mediaTypes) { in createSelection() argument
50 return MediaColumns.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.java259 final String[] mimeTypes = MIME_MAPPINGS.keySet().toArray(new String[0]); in startOpenDocumentActivity() local
262 openIntent.putExtra(Intent.EXTRA_MIME_TYPES, mimeTypes); in startOpenDocumentActivity()
/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()
/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()